修改者: selfimpr. 博客: http://blog.csdn.net/lgg201 邮箱: lgg860911@yahoo.com.cn 更新内容: 在原来的版本中, 如果一个路径没有在struts-config.xml文件中配置, 返回的是一个404错误页面, 现在, 如果一个请求路径没有在<action-mapping />标签中配置, 我们可以自定义返回的错误页面. 使用示例: 如果你想要使用这个功能, 在struts-config.xml文件中, 你必须加入这些代码. 在<forward />标签中, name属性必须是"REQUEST_NOT_CONFIG", path属性可以配置为一个在你的应用中存在的页面路径. <global-forwards> <forward name="REQUEST_NOT_CONFIG" path="/error.jsp" /> </global-forwards> 如果还是不懂,请查看sample目录的示例. updater: selfimpr. blog: http://blog.csdn.net/lgg201 mail: lgg860911@yahoo.com.cn update content: in formerly version, if a path not config in the struts-config.xml file, response is the 404 page, now, if a path is not config in the <action-mapping /> tag , we can custom the error page. Use Example: if you want to use this function, in the struts-config.xml file, you must join these code. in the <forward /> tag, name must be "REQUEST_NOT_CONFIG", the path you can config a exist page in your application. <global-forwards> <forward name="REQUEST_NOT_CONFIG" path="/error.jsp" /> </global-forwards> if you didn't understand you can see the sample folder.
- 1
- 粉丝: 3339
- 资源: 63
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助