Struts2 welcome-file-list 设置的路径不能是Action地址
来源:互联网 发布:阿里旺旺旧版本mac 编辑:程序博客网 时间:2024/06/08 00:54
在welcome-file-list 设置的路径是要去web应用根目录下去找,比如,设置了<welcome-file>index.jsp</welcome-file>,那么,首先不输入具体访问文件的时候,它就会去WEB应用根目录去找index.jsp文件,如果没有这个文件的话,自然页面不会有任何显示,所以,直接写这个action地址是不可行的,因为,建不了这样一个action的文件。但是<welcome-file-list> 里可以配置servlet 没法配置action。
在 tomcat 中配置的 <welcom-file> 是基于servlet 的,struts2 的运行机制却是filter .
解决办法: 新增一个中转页面,让welcome-file-list指向它.
doPreIndex.jsp
<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="GBK"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<jsp:forward page="/organization/organization_doPreIndex.action" />
- Struts2 welcome-file-list 设置的路径不能是Action地址
- struts2 welcome-file-list 设置的路径不能是Action地址
- 为何web.xml中的welcome-file-list不能是Action地址
- welcome-file 不能配置action的解决方法
- <welcome-file>index.action</welcome-file>直接设置action,404和struts2中的解决方案
- <welcome-file>index.action</welcome-file>直接设置action,404和struts2中的解决方案()
- Struts2 welcome-file 使用 action
- <welcome-file-list>action配置
- struts2 welcome-file-list原理
- default-action-ref 和 welcome-file-list 标签的区别
- default-action-ref 和 welcome-file-list 标签的区别
- Struts2 welcome-file 使用 index.action
- jetty8+struts2导致 welcome-file-list 失效
- 关于web.XML文件的welcome-file设置成 .do/.action问题
- 在webx.ml中 配置struts2 后 welcome-file-list 失效的解决办法
- welcome-file-list 引发的血案
- jetty + struts2 导致welcome-file-list失效解决办法
- welcome-file-list
- ASP.NET数据绑定和的区别
- Struts2 空指针异常
- Android Export aborted because fatal lint errors were found.
- Java 防范XSS攻击
- Java基础知识——JNI入门经典
- Struts2 welcome-file-list 设置的路径不能是Action地址
- java获取当前路径【转】
- 类与结构体
- Rational Rose 2003
- 空虚
- .net控件与IDL函数之间的数据传递(字符串)
- 全国省市拼音简称、全称,数据库
- SQL Server现场优化纪实(一):通过重建索引提高性能
- Java JDK环境变量配置