struts2配置2.5版

时间:2021-09-04 10:47:17
【文件属性】:
文件名称:struts2配置2.5版
文件大小:4.46MB
文件格式:ZIP
更新时间:2021-09-04 10:47:17
javaEE <?xml version="1.0" encoding="UTF-8"?> /result.jsp /login.jsp <!--1.使用 struts2.5.16 版本 2.lib 文件夹下放置:工程所需jar包 3.xml标签库为远程获取,路径:http://struts.apache.org/dtds/struts-2.5.dtd 可设置为本地【xml输入语法快捷提示】,就不用远程获取了:window-->preference-->输入Catalog-->xml下的Catalog-->Add-->location:解压缩struts-core-2.5.16.jar 后,文件struts-2.5.dtd文件路径。 4.设置开发者模式: 每次HTTP请求系统都重新加载资源文件,有助于开发 5.struts配置文件改动后,是否重新加载 6.查看源码:Build path 后的类库中,奶瓶图标找到struts-core-2.5.16.jar 右键-->properties-->java Source Attachment-->External location :源码路径 7.查看文档API:Build path 后的类库中,奶瓶图标找到struts-core-2.5.16.jar 右键-->properties-->javadoc location :输入网址 或选择源码DOC目录 8.拦截器:web.xml 配置拦截器 struts2.5的filter-class 与struts2.5以前版本有所不同 <!-- 浏览器访问 http://localhost:8080/MyWeb/helloworld --> --> <?xml version="1.0" encoding="UTF-8"?> Struts 2 index.jsp <!-- 配置核心拦截器 --> struts2 <!-- Filter的实现类 struts2.5 --> org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter <!-- 拦截所有的url --> struts2 /*
【文件预览】:
MyWeb
----WebContent()
--------META-INF()
--------WEB-INF()
--------result.jsp(783B)
--------login.jsp(615B)
--------index.jsp(369B)
----.settings()
--------org.eclipse.wst.jsdt.ui.superType.name(6B)
--------org.eclipse.wst.common.project.facet.core.xml(345B)
--------org.eclipse.core.resources.prefs(69B)
--------org.eclipse.wst.common.component(467B)
--------org.eclipse.wst.jsdt.ui.superType.container(49B)
--------.jsdtscope(567B)
--------org.eclipse.jdt.core.prefs(364B)
----src()
--------com()
--------struts.xml(1KB)
----.project(905B)
----.classpath(841B)
----build()
--------classes()

网友评论