摘要: struts2在配置web.xml时,会指定filter拦截路径,如*.action。当浏览器请求一个action时,默认调用的是该action中的execute()方法。想要调用其他方法,需要为action指定method属性。 例如以下的struts.xml的配置 当一个action中有多个方法 阅读全文
posted @ 2018-02-14 18:00 x_jingxin 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 属性驱动模型的作用: 因为struts2与servlet API 实现了解耦,无法直接使用HttpServlet Request对象获取表单提交的参数,但Struts2提供了属性驱动模型机制来解决这个问题。 struts2的属性驱动模型指的是在JSP页面的每一个form中的name都在action中 阅读全文
posted @ 2018-02-14 16:56 x_jingxin 阅读(250) 评论(0) 推荐(0) 编辑