摘要:http://blog.sina.com.cn/s/blog_9ccec9e10101klu6.htmlSpring MVC和Struts2的区别:1. 机制:spring mvc的入口是servlet,而struts2是filter,这样就导致了二者的机制不同。(http://blog.csdn.net/hanzhou4519/article/details/7687951)2. 性能:spring会稍微比struts快。spring mvc是基于方法的设计,而sturts是基于类,每次发一次请求都会实例一个action,每个action都会被注入属性,而spring基于方法,粒度更细,但要
阅读全文
摘要:redirect: @Action(value="madeField",results={@Result(name="success", location="${referer}", type="redirect")})
阅读全文
摘要:Caused by: java.net.UnknownHostException: struts.apache.org如果将struts的版本号修改后还是不行,就是可以将dtd文件下载到本机,然后用相对路径的方式引用dtd文件。将stuts-..dtd 文件下载到tomcat6_01\webapps\extGanttMvc\WEB-INF\classes中,然后将struts.xml中的xml头修改为以下方式:<!DOCTYPEstrutsPUBLIC"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN
阅读全文
摘要:import java.io.InputStream;import java.io.UnsupportedEncodingException;import org.apache.struts2.ServletActionContext;import org.apache.struts2.convention.annotation.Result;import org.apache.struts2.convention.annotation.ResultPath;import org.apache.struts2.convention.annotation.Results;import com.o
阅读全文
摘要:从页面传到后台action中的参数可以用三种方式接收:1.声明一个变量,然后设置其getter和set方法private String username;public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}2.通过getParameterrequest.getParameter("username");3,通过getAttributerequest.getAttribute("usernam
阅读全文
摘要:1.添加jar包,一般只要把apps\struts2-blank例子中的所有jar包都加进去就行了2.在web.xml中加上拦截器, <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>st
阅读全文
摘要:流泪总结一个关于Content-Disposition的教训
阅读全文
摘要:http://sarin.iteye.com/blog/685354
阅读全文
摘要:http://www.cnblogs.com/taoxiaoji/archive/2011/03/12/Two_ways_to_integrate_Struts2_and_Spring.htmlstruts2与spring集成时,关于Action类中成员bean自动注入的问题http://1234jie.ok.blog.163.com/blog/static/774269932011106112525549/
阅读全文
摘要:http://blog.sina.com.cn/s/blog_57769b7b0100tnoh.html2009-03-31 11:48(zhuan)struts2—from标签中 theme="simple" 用法
阅读全文
摘要:<s:radio name="sfjj" list="#{'true':'是','false':'否'}" listKey="key" listValue="value" value="item.sfjj" ></s:radio>
阅读全文
摘要:<s:select name="wxrydj" list="#{'0801':'初级','0802':'中级','0803':'副高级','0804':'高级'}" listKey="key" listValue="value" value="item.wxrydj"></s:select>http://www.cnblogs.com/modou
阅读全文
摘要:http://www.kafeitu.me/2010/10/03/file-download-use-annotation-of-struts2.html
阅读全文
摘要:http://blog.sina.com.cn/s/blog_7c3328d70101282w.html
阅读全文
摘要:struts2文件下载 以下是注解方式的struts2文件下载@ResultPath("/")@Results(value={@Result(name="success",type="stream",params={"contentType","image/jpg","inputName","targetFile","contentDisposition","attachment;filename=123.jpg",
阅读全文
摘要:基于Struts2的文件上传struts2文件上传
阅读全文
摘要:ssh中jquery autocomplete使用示例jQuery.Autocomplete与struts2的整合以下是我的实践,不过不知道为什么autocomplete功能不能从返回的json对象中选择包含输入字段的一项,例如source:person!ajaxSelectPerson,这个时候person!ajaxSelectPerson返回的json,当输入wang时,当source: ["张三","李斯","王五","赵六","黑龙","白海","湘伦&qu
阅读全文
摘要:在Struts2的Action中获得request response session几种方法
阅读全文
摘要:http://www.cnblogs.com/jy02444453/archive/2011/08/27/2155427.html
阅读全文
摘要:http://blog.csdn.net/yezi77321660/article/details/3960771 http://wenku.baidu.com/view/91d38f4bcf84b9d528ea7ace.html
阅读全文