解决方案 »

  1.   

    看了一下,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>
      

  2.   

    看了下你的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。你试试
      

  3.   

    这个属性已经加过了,现在项目能够正常使用,只是  进入项目的时候 需要ip/context_path/index.jsp
      

  4.   

    自己顶一下,  在没提问之前 ,那个属性值已经加好了,
     项目通过 http://IP/ms_batch/index.jsp  
         或者 http://IP/ms_batch/ 都能够正常访问到   index.jsp
     但是通过 http://IP/ms_batch   就不行,提示如题错误
      

  5.   

      <welcome-file-list>
          <welcome-file>ms_batch/index.jsp</welcome-file>
      </welcome-file-list>  在web.xml最后添加这个
      

  6.   

      <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>
      

  7.   

    这个  和
      <welcome-file>index.jsp</welcome-file>
    这个都没效果,感觉上应该是服务器的配置问题。  谢谢了。