关于default-action-ref失效的问题 楼主参考一下http://blog.sina.com.cn/s/blog_62d3ddc00100z4vy.html和http://blog.sina.com.cn/s/blog_4f92b1870100rbr9.html 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 看了一下,websphere对web.xml的读取顺序还有要求?能具体点吗?<?xml version="1.0" encoding="UTF-8"?><web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/classes/applicationContext.xml; /WEB-INF/classes/applicationContext-bs.xml; /WEB-INF/classes/applicationContext-action.xml; </param-value> </context-param> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <listener> <listener-class>com.hime.batch.BatchListener</listener-class> </listener> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/classes/log4j.properties</param-value> </context-param> <filter> <filter-name>loginFilter</filter-name> <filter-class>com.hime.common.other.interceptor.LoginFilter</filter-class> </filter> <filter-mapping> <filter-name>loginFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> <dispatcher>FORWARD</dispatcher> <dispatcher>INCLUDE</dispatcher> <dispatcher>REQUEST</dispatcher> </filter-mapping> <servlet> <servlet-name>dwr</servlet-name> <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class> <init-param> <description></description> <param-name>debug</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>crossDomainSessionSecurity</param-name> <param-value>false</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>dwr</servlet-name> <url-pattern>/dwr/*</url-pattern> </servlet-mapping> <context-param> <param-name>webAppRootKey</param-name> <param-value>ms_batch.root</param-value> </context-param></web-app> 看了下你的web.xml没什么问题。在网上查了下:要将Struts2部署到WAS上,需要在WAS上添加一个参数com.ibm.ws.webcontainer.invokeFiltersCompatibility=true. 默认情况下,WAS是不处理用户自定义的filter中的URI映射,而Struts2需要org.apache.struts2.dispatcher.FilterDispatcher拦截所有的请求并且处理Struts2标签。所以不作处理的话你会发现Struts2的项目发布在WAS上无效。设置过程:在WAS Console -> Application Servers -> <server> -> Web Container Settings -> Web Container -> Custom Properties里,增加一个custom property,名字为com.ibm.ws.webcontainer.invokefilterscompatibility,值为true。你试试 这个属性已经加过了,现在项目能够正常使用,只是 进入项目的时候 需要ip/context_path/index.jsp 自己顶一下, 在没提问之前 ,那个属性值已经加好了, 项目通过 http://IP/ms_batch/index.jsp 或者 http://IP/ms_batch/ 都能够正常访问到 index.jsp 但是通过 http://IP/ms_batch 就不行,提示如题错误 <welcome-file-list> <welcome-file>ms_batch/index.jsp</welcome-file> </welcome-file-list> 在web.xml最后添加这个 <welcome-file-list> <welcome-file>ms_batch/index.jsp</welcome-file> </welcome-file-list> 在web.xml最后添加这个错了,应该是 <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> 这个 和 <welcome-file>index.jsp</welcome-file>这个都没效果,感觉上应该是服务器的配置问题。 谢谢了。 hibernate和JDBC的区别。 SQL外键关联问题! 一个暴简单问题,就是始终没调对 关于SSH Eclipse 下中文乱码问题 20分求解 菜鸟请教:cmp的find方法和select方法有什么区别?使用场合的区别是怎样? 菜鸟问题:在运行中 command prompt 指令启动德类似DOS窗口是个什么窗口???? 关于Struts的一个部署的问题 深切同情我吧:总值超过5000升大米,于昨晚不幸遇难失窃 求助:JAVA获取WINDOW下磁盘IO信息 spring 匹配所有action 实现aop编程问题 急:关于事务超时死锁的处理
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/classes/applicationContext.xml;
/WEB-INF/classes/applicationContext-bs.xml;
/WEB-INF/classes/applicationContext-action.xml;
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>com.hime.batch.BatchListener</listener-class>
</listener>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/classes/log4j.properties</param-value>
</context-param>
<filter>
<filter-name>loginFilter</filter-name>
<filter-class>com.hime.common.other.interceptor.LoginFilter</filter-class>
</filter> <filter-mapping>
<filter-name>loginFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>dwr</servlet-name>
<servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
<init-param>
<description></description>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>crossDomainSessionSecurity</param-name>
<param-value>false</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dwr</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>ms_batch.root</param-value>
</context-param>
</web-app>
要将Struts2部署到WAS上,需要在WAS上添加一个参数com.ibm.ws.webcontainer.invokeFiltersCompatibility=true. 默认情况下,WAS是不处理用户自定义的filter中的URI映射,而Struts2需要org.apache.struts2.dispatcher.FilterDispatcher拦截所有的请求并且处理Struts2标签。所以不作处理的话你会发现Struts2的项目发布在WAS上无效。设置过程:在WAS Console -> Application Servers -> <server> -> Web Container Settings -> Web Container -> Custom Properties里,增加一个custom property,名字为com.ibm.ws.webcontainer.invokefilterscompatibility,值为true。你试试
项目通过 http://IP/ms_batch/index.jsp
或者 http://IP/ms_batch/ 都能够正常访问到 index.jsp
但是通过 http://IP/ms_batch 就不行,提示如题错误
<welcome-file>ms_batch/index.jsp</welcome-file>
</welcome-file-list> 在web.xml最后添加这个
<welcome-file>ms_batch/index.jsp</welcome-file>
</welcome-file-list> 在web.xml最后添加这个错了,应该是 <welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<welcome-file>index.jsp</welcome-file>
这个都没效果,感觉上应该是服务器的配置问题。 谢谢了。