
struts
iteye_18969
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
tomcat + struts2 下配置404页面
今天在项目中配置404页面,最开始的配置是这样的,在web.xml中加入 <error-page> <error-code>404</error-code> <location>/notfound.jsp</location> </error-page> <%@ page la...2010-09-14 19:07:41 · 245 阅读 · 0 评论 -
maven 一键生成 struts2 工程
项目中新建struts web工程有一定的工作量。web.xml,struts.xml,jar 包引入等。 用maven可以一键生成struts框架的web工程,直接启动即可,很大的加快了开发效率。 mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate -B ^ ...2011-09-08 18:18:56 · 120 阅读 · 0 评论 -
strurts2 中的 ActionMapper的 作用
最近在项目中要做http api,要求提供的url是 http://***.domain.com/api/rest?sign={签名}&method={namespace}.{action名}.{调用方法名}&...... 类似淘宝的top api url 风格,一个url,根据参数不同,映射到不同的控制器。 实现方法详细: 1、实现自己的ActionMap...2011-09-13 14:59:42 · 329 阅读 · 0 评论 -
struts2 下分布式web环境Token改造
最近在看struts2源码,发现struts2下的token拦截是基于session的 核心类是org.apache.struts2.util.TokenHelper 在页面上用标签打入token标记 public static String setToken(String tokenName) { Map session = ActionContext....2010-07-23 09:44:57 · 229 阅读 · 0 评论 -
struts2中url静态化跳转
URL的静态化对SEO是非常友好的。有很多网站40%左右的流量都是来源于搜索引擎,特别是新网站。 动态URL:/common/detail.html?id=268789 静态URL:/common/detail-268789 一种方法:可以在apache或nginx中做配置。 二种方法:可以在sturts中处理 1、下载urlrewritefilter-3.1.0...2011-03-06 12:42:23 · 213 阅读 · 0 评论