
J2EE
dawnming
这个作者很懒,什么都没留下…
展开
-
[Struts2]取页面参数的方法
作用领域对象接收用户输入 JSP: User类 public class User implements Serializable{ private String username; private String password; //get set 方法 }Action: public class LoginAction implements Actio原创 2011-10-29 09:57:45 · 755 阅读 · 0 评论 -
[Struts2]访问request,session和application对象
与Servlet API解耦的访问方式 Structs2对HttpServletRequest,HttpSession,和ServletContext进行了封装,构造了三个Map对象来替代这三种对象,在Action中,直接使用HttpServletRequest,Httpsession,ServletContext对应的Map对象来保存和读取数据。 要获取这三个Map对象,可以使用com.op原创 2011-10-29 17:05:39 · 4267 阅读 · 0 评论 -
[Struts2]配置 web.xml文件
The web.xml web application descriptor file represents the core of the Java web application, so it is appropriate that it is also part of the core of the Struts framework. In theweb.xml file, Struts d转载 2011-10-29 19:44:53 · 755 阅读 · 0 评论 -
[struts2]Struts2.2 Annotation 注解配置Action
Struts2.2 Annotation 注解配置也叫Zero Configuration(零配置),它省去了写xml文件的麻烦,可以直接在类叫进行配置,不用在java文件和xml文件中来回切换。 annotation所需要的包,在Struts2.2中是struts2-convention-plugin-2.2.1.jar 这个包原创 2011-10-31 15:40:48 · 462 阅读 · 0 评论 -
[struts2] 乱码
在做lnln的fp2sp时,本地测试全OK,放到日本的Linux上,所以的日语 整个工程全是默认设置为UTF-8 后来在escape="false" 解决问题。 但原创 2011-12-13 14:16:20 · 307 阅读 · 0 评论 -
Cookie的操作
1.设置Cookie Cookie cookie = new Cookie("key", "value"); cookie.setMaxAge(60); //设置60秒生存期,如果设置为负值的话,则为浏览器进程Cookie(内存中保存),关闭浏览器就失效。 cookie.setPath("/test/test2"); //设置Cookie路径,不设置的话为当前路径(对于Servlet来说为req原创 2012-07-10 10:06:04 · 532 阅读 · 0 评论