JAVA
文章平均质量分 61
xuying198702
msdn
展开
-
Maven管理下的Struts2+Spring+Mybatis框架搭建
Maven管理的Strut2、Spring、Mybatis框架搭建大概思路,初学者用,有想要源码的可以留下邮箱。原创 2015-11-06 10:37:12 · 2013 阅读 · 0 评论 -
拦截器Interceptor的使用
1、编写拦截器类,继承AbstractInterceptor抽象类,并实现Intercept方法。或者实现Interceptor接口,并实现该接口的三个方法:init,intercept,destroy或者继承MethodFilterInterceptor抽象类,并实现doIntercept方法。2、spring中注入定义的拦截类,这里列出了不被检查的action,原创 2015-11-06 11:10:37 · 548 阅读 · 0 评论 -
struts2 国际化
1、全局国际化在struts.xml中配置: 在src目录下新建message_en_US.properties 和message_zh_CN.properties资源文件,文件名格式message_语言_国家。使用标签显示信息. s:text name="资源文件中定义的key">s:text> neme = 资源文件中定义的key2、类原创 2015-11-06 11:06:06 · 278 阅读 · 0 评论 -
JSP页面问题
1、PWC6199: Generated servlet error:Date cannot be resolved to a type原因:pageContext.setAttribute("birth",new Date(2005,03,10),PageContext.REQUEST_SCOPE); %> 用到java的类未引入响应的包。解决方法:jsp页面添加2、原创 2015-11-06 11:00:01 · 299 阅读 · 0 评论 -
Struts2文件上传
<s:form action="doPassTmComplaint" namespace="/tmall" theme="simple" enctype="multipart/form-data"> file <input type="button" value="Add More.." onclick="addMore()">原创 2015-11-06 15:03:58 · 447 阅读 · 0 评论 -
文件下载 Servlet实现
1、定义下载文件的Servletpublic class DownloadServlet extends HttpServlet { private static final long serialVersionUID = 1L; public DownloadServlet() { super(); } // 完成下载功能 public void doGet(HttpSer原创 2015-11-06 15:51:35 · 300 阅读 · 0 评论