• 大小: 1.69MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-08-31
  • 语言: Java
  • 标签: ssh2  

资源简介

基于SSH2架构的论坛系统,《JAVA WEB》最后一章源代码。

资源截图

代码片段和文件信息

package action;

import com.opensymphony.xwork2.*;

import java.util.*;

import javax.servlet.ServletContext;
import javax.servlet.http.*;
import common.*;
import service.*;

public class baseAction extends ActionSupport implements
org.apache.struts2.interceptor.ServletRequestAware
org.apache.struts2.interceptor.ServletResponseAwareorg.apache.struts2.util.ServletContextAware
{

protected ServiceManager serviceManager;
protected UserInfo userInfo;
protected String result;
protected Map cookies;
protected javax.servlet.http.HttpServletResponse response;
protected javax.servlet.http.HttpServletRequest request;
protected ServletContext servletContext;



public void setServletResponse(HttpServletResponse response)
{
this.response = response;

}
public void setServletContext(ServletContext servletContext)
{
this.servletContext = servletContext;
}

protected String getCookieValue(String name)
{
javax.servlet.http.Cookie cookies[] = request.getCookies();
if (cookies != null)
{
for (Cookie cookie : cookies)
{

if (!cookie.getName().equals(name))
continue;
return cookie.getValue();
}

}
return null;
}

public void setServletRequest(HttpServletRequest request)
{
this.request = request;

userInfo.setCookieUser(getCookieValue(“user“));
}

/**
 * result属性的getter方法
 */
public String getResult()
{
return result;
}

/**
 * result属性的setter方法
 */
public void setResult(String result)
{
this.result = result;

}

public void setServiceManager(ServiceManager serviceManager)
{
this.serviceManager = serviceManager;
}

/**
 * userInfo属性的setter方法
 */
public void setUserInfo(UserInfo userInfo)
{
this.userInfo = userInfo;

}

protected void saveCookie(String name String value int maxAge)
{
javax.servlet.http.Cookie cookie = new javax.servlet.http.Cookie(name
value);
cookie.setMaxAge(maxAge);
response.addCookie(cookie);
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1562  2008-10-09 15:54  forum\script.txt

     文件       2068  2008-10-10 22:39  forum\src\action\baseAction.java

     文件        632  2008-10-10 20:41  forum\src\action\LoginAction-validation.xml

     文件       1323  2008-10-10 20:58  forum\src\action\LoginAction.java

     文件        545  2008-10-10 20:29  forum\src\action\MainAction.java

     文件        455  2008-10-11 11:10  forum\src\action\PostReviewAction.java

     文件        562  2008-10-11 10:50  forum\src\action\PostTopicAction.java

     文件       2030  2008-10-10 20:35  forum\src\action\RegisterAction-validation.xml

     文件       1117  2008-10-10 20:34  forum\src\action\RegisterAction.java

     文件        446  2008-10-08 12:57  forum\src\action\ReloginAction.java

     文件        418  2008-10-11 15:01  forum\src\action\UploadAction.java

     文件       3735  2008-10-05 09:56  forum\src\action\ValidationCodeAction.java

     文件        690  2008-10-10 23:13  forum\src\action\ViewTopicAction.java

     文件       9626  2008-10-11 15:45  forum\src\com\fredck\FCKeditor\connector\ConnectorServlet.java

     文件       3129  2008-07-06 20:32  forum\src\com\fredck\FCKeditor\connector\package.html

     文件       8462  2008-07-06 20:32  forum\src\com\fredck\FCKeditor\FCKeditor.java

     文件       1744  2008-07-06 20:32  forum\src\com\fredck\FCKeditor\FCKeditorConfigurations.java

     文件       1475  2008-07-06 20:32  forum\src\com\fredck\FCKeditor\package.html

     文件      22233  2008-07-06 20:32  forum\src\com\fredck\FCKeditor\tags\FCKeditorTag.java

     文件       1882  2008-07-06 20:32  forum\src\com\fredck\FCKeditor\tags\package.html

     文件       4179  2008-07-06 20:32  forum\src\com\fredck\FCKeditor\uploader\package.html

     文件       7881  2008-10-11 18:35  forum\src\com\fredck\FCKeditor\uploader\SimpleUploaderServlet.java

     文件       1805  2008-07-05 16:59  forum\src\common\Encrypter.java

     文件        930  2008-07-13 23:12  forum\src\common\MyFormat.java

     文件       1298  2008-10-11 13:52  forum\src\common\UploadFile.java

     文件       4069  2008-10-11 11:39  forum\src\common\UserInfo.java

     文件        840  2008-10-09 16:50  forum\src\common\WebEditor.java

     文件        253  2008-10-04 20:24  forum\src\dao\impl\DAOSupport.java

     文件        497  2008-10-11 10:11  forum\src\dao\impl\ReviewDAOImpl.java

     文件       1369  2008-10-13 14:23  forum\src\dao\impl\TopicDAOImpl.java

............此处省略680个文件信息

评论

共有 条评论