随笔分类 - struts2
用myeclipse搭建S2SH struts2 spring hibernate
摘要:step1: 在myeclipse上新建一个web项目step2: 加入struts2所需的包freemarker-2.3.16ognl-3.0struts2-core-2.2.1struts2-dojo-plugin-2.2.1struts2-json-plugin-2.2.1struts2-spring-2.2.1xwork-core-2.2.1step3:加入spring2.5右键点击工程名称,MyEclipse->Add Spring Capabilities。选择Spring version为Spring 2.5,选中Spring 2.5 AOP Libraries、Sprin
阅读全文
struts2 中值栈内容
摘要:值栈中的对象构成及其排列顺序如下所示:1. 临时对象——在执行过程中,临时对象被创建出来并放到了值栈中。举个例子来说,像JSP标签所遍历的对象容器中,当前访问到的值就是临时对象2. 模型对象——如果模型对象正在使用,那么会放在值栈中action的上面3. Action对象——正在被执行的action4. 固定名称的对象(Nam...
阅读全文
struts2 过滤器
摘要:在struts.xml中,关于interceptor相关的节点定义如下:1.定义interceptor<interceptors>…<interceptor name="autowiring"class="…xwork2.spring.interceptor.ActionAutowiringInterceptor"/></interceptor...
阅读全文
struts2 Aware 接口
摘要:SessionAware ——通过Map来提供对所有session属性的访问ServletRequestAware——提供对HttpServletRequest对象的访问RequestAware ——通过Map来提供对所有request属性的访问ApplicationAware ——通过Map来提供对所...
阅读全文
struts2 AJAX
摘要:添加json 包:json-lib-2.1-jdk15.jar在jsp页面中,加入jquery库jquery-1.4.2.js1. JSP代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--<%@pagelanguage="java"impor...
阅读全文
struts2 + servlet
摘要:在struts2下发现servlet的请求全部被struts2的 /* 所截获,为了使struts2下能正常使用servlet,将struts2的xml配置改为如下: <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.Filt...
阅读全文
浙公网安备 33010602011771号