资源简介
修正说明:
1. 登录页面只保留英文、简体中文、繁体中文切换,去掉其他语种
2. 主标签去除没用的首页、RSS和Chat
3. 选项对话框中去除RSS、Chat设置
4. 增加修改账号密码的功能,配合Apache James邮件服务器使用,密码加密采用SHA
5. 修复Notes中的一个缺陷,由于MySQL不支持Timestamp空值导致出错的问题
安装说明:
1. Intouch2和James共享同一个数据库
2. 数据库连接要加上zeroDateTimeBehavior=convertToNull参数
jdbc:mysql://127.0.0.1/maildb?autoReconnect=true&characterEncoging=utf8&zeroDateTimeBehavior=convertToNull
3. 完整的配置参数参考intouch2.war!\WEB-INF\config\config.xml
4. 配置文件config.xml中的mail.upflow.com换成实际的服务器域名
代码片段和文件信息
package org.claros.chat.ajax;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.claros.chat.controllers.TrafficController;
import org.claros.chat.threads.ChatListener;
import org.claros.chat.threads.ChatSender;
import org.jivesoftware.smack.GoogleTalkConnection;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
public class Authenticate extends HttpServlet {
private static Log log = LogFactory.getLog(Authenticate.class);
/**
*
*/
private static final long serialVersionUID = 6002125607784963740L;
/**
* Constructor of the object.
*/
public Authenticate() {
super();
}
/**
* The doPost method of the servlet.
*
* This method is called when a form has its tag value method equals to post.
*
* @param request the request send by the client to the server
* @param response the response send by the server to the client
* @throws ServletException if an error occurred
* @throws IOException if an error occurred
*/
public void doPost(HttpServletRequest request HttpServletResponse response)
throws ServletException IOException {
response.setHeader(“Expires““-1“);
response.setHeader(“Pragma““no-cache“);
response.setHeader(“Cache-control““no-cache“);
response.setContentType(“text/html“);
PrintWriter out = response.getWriter();
String username = request.getParameter(“username“);
request.getSession().setAttribute(“user“ username);
String password = request.getParameter(“password“);
String server = request.getParameter(“server“);
request.getSession().setAttribute(“defaultDomain“ null);
try {
XMPPConnection connection = null;
if (server == null || server.equals(“Google Talk“)) {
request.getSession().setAttribute(“defaultDomain“ “gmail.com“);
try {
connection = new GoogleTalkConnection();
if (username.indexOf(“@“) > 0) {
username = username.substring(0 username.indexOf(“@“));
}
} catch (Exception e1) {
throw e1;
}
} else {
try {
request.getSession().setAttribute(“defaultDomain“ server);
connection = new XMPPConnection(server 5222);
} catch (Exception e1) {
throw e1;
}
}
try {
connection.login(username password);
log.debug(“connection established for user: “ + username);
} catch (XMPPException e) {
log.info(e);
// maybe user doesn‘t exist so try to create one.
try {
connection.getAccountManager().createAccount(username password);
connection.login(username password);
} catch (Exception e1) {
log.info(e1);
throw e1;
}
}
request.getSession().setAttribute(“conn“ connection);
// start the user‘s chat listener thread
String user = c
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 825 2015-07-27 14:05 intouch2变更说明.txt
文件 27686 2007-06-06 23:29 license.html
目录 0 2015-07-25 17:07 intouch2\
文件 23357 2007-06-10 23:10 intouch2\chat.jsp
文件 7932 2007-06-10 23:10 intouch2\compose.jsp
文件 18855 2007-06-10 23:10 intouch2\contacts.jsp
文件 2125 2007-06-10 23:10 intouch2\contact_import.jsp
文件 1492 2007-06-10 23:10 intouch2\contact_import_if
目录 0 2015-07-21 13:21 intouch2\css\
文件 37807 2007-06-10 23:10 intouch2\css\all.css
文件 232 2007-06-10 23:10 intouch2\css\body.css
文件 3855 2007-06-10 23:10 intouch2\css\chat.css
文件 238 2007-06-10 23:10 intouch2\css\editor.css
文件 232 2007-06-10 23:10 intouch2\css\ie6.css
文件 0 2007-06-10 23:10 intouch2\css\other.css
文件 622 2007-06-10 23:10 intouch2\css\panel.css
文件 1113 2007-06-10 23:10 intouch2\css\preview.css
文件 1831 2015-07-25 17:07 intouch2\header.jsp
文件 2657 2015-07-25 13:08 intouch2\home.jsp
目录 0 2015-07-25 15:18 intouch2\images\
文件 152 2007-06-10 23:10 intouch2\images\accordion-header-bg.gif
文件 771 2007-06-10 23:10 intouch2\images\add-contact.gif
文件 806 2007-06-10 23:10 intouch2\images\add-group.gif
文件 1877 2007-06-10 23:10 intouch2\images\ajax-load-mini.gif
文件 534 2007-06-10 23:10 intouch2\images\apply.gif
文件 1061 2007-06-10 23:10 intouch2\images\arrowdown.gif
文件 1052 2007-06-10 23:10 intouch2\images\arrowup.gif
文件 229 2007-06-10 23:10 intouch2\images\attach-bg-left.gif
文件 232 2007-06-10 23:10 intouch2\images\attach-bg-right.gif
文件 54 2007-06-10 23:10 intouch2\images\attach-bg.gif
文件 477 2007-06-10 23:10 intouch2\images\attach-download-ico.gif
............此处省略1869个文件信息
评论
共有 条评论