随笔分类 -  Struts2

摘要:正常的spring与struts工程文件所需jar包及配置条件下,增加如下配置: struts.xml 增加:<constant name="struts.objectFactory" value="spring" /> 配置action的时候,class直接写spring配置文件(applicat 阅读全文
posted @ 2016-05-30 22:27 沙中世界 阅读(122) 评论(0) 推荐(0) 编辑
摘要:1、struts2是什么 struts2是用于企业级Web开发的框架,基于struts2开发Web应用程序,在开发效率、可扩展性、可维护性上都会大有提升。 2、struts2的优点 struts2框架是典型的实现了MVC架构的框架,使用struts框架,通过struts2.xml文件配置非常容易的将 阅读全文
posted @ 2016-04-17 11:22 沙中世界 阅读(319) 评论(0) 推荐(0) 编辑
摘要:1、OGNL 对象图导航语言 Object Graph Navigation Language 主要用于struts框架中(目前在别的地方还没接触到) 就是<s:property value="" /> value里面的内容,就叫ONGL表达式; 2、用途 使用ONGL语言,在前端页面中,访问act 阅读全文
posted @ 2016-04-11 22:07 沙中世界 阅读(1146) 评论(0) 推荐(0) 编辑
摘要:接上一篇文章 package test; import com.opensymphony.xwork2.ActionSupport; import javax.servlet.http.*; import org.apache.struts2.ServletActionContext; import 阅读全文
posted @ 2016-02-24 10:24 沙中世界 阅读(2555) 评论(0) 推荐(1) 编辑
摘要:1、客户端通过URL请求tomcat 2、URL找到对应站点的WEB.xml 发现里面有 struts2配置 3、执行StrutsPrepareAndExecuteFilter类的init方法 4、在init方法中,找到 struts.xml 文件 5、解析 struts.xml文件,根据URL找到 阅读全文
posted @ 2016-02-23 15:48 沙中世界 阅读(457) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示