解决方案 »

  1.   

    我在server.xml中的context是这样配置的 
    <Context path="/test" caseSensitive="false" reloadable="true" docBase="D:\java\wzrkWorkspace\TEST\src\main\webapp" workDir="D:\java\wzrkWorkspace\TEST" />
    用 http://localhost:8080/TEST/还是报的404
      

  2.   

    三楼的方法试了还是不行啊,我用的eclipse tomcat插件部署的。
      

  3.   

    来看看学习, url 重写是可以实现的 。
      

  4.   

    目前只能用傻办法来解决了在server.xml配置两个context,缺点是启应用的时候会启两个,哪位大神有更好的办法呢???
    <Context path="/test"  reloadable="true" docBase="D:\java\wzrkWorkspace\TEST\src\main\webapp" workDir="D:\java\wzrkWorkspace\TEST\work" />
    <Context path="/TEST"  reloadable="true" docBase="D:\java\wzrkWorkspace\TEST\src\main\webapp" workDir="D:\java\wzrkWorkspace\TEST\work" />
      

  5.   

    如果区分大小写  你可以通过 <Context path="/test"  reloadable="true" docBase="\tomcat\webapp" workDir="/\work" />  指定同一个目录
      

  6.   

    楼主先别结贴,再坚持几天。
    应该有更好的办法的,像我们平时访问百度时,www.baidu.com 和 WWW.BAIDU.COM 都一样可以得到结果。
    看看哪天有大牛路过时给一些好的提议,解决方案。
      

  7.   

    <context>里面caseSensitive="false"是个办法,不过:只针对6以下,7开始已经完全抛弃了这个参数,理由是有严重安全问题http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Standard_ImplementationDeprecated. This option is removed in Tomcat 7 onwards where the default of true is always used.If the value of this flag is false, all case sensitivity checks will be disabled. If not specified, the default value of the flag is true.NOTE: This flag MUST NOT be set to false on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems.注意:这个标志禁止在Windows(和其他不区分大小写的文件系统)上设置成false。因为这会导致JSP源代码的暴露和其他安全问题。
      

  8.   

    比如,人家可以通过index.JSP,来直接读取index.jsp源文件,而不是它生成的HTML。
      

  9.   

    <context>里面caseSensitive="false"是个办法,不过:只针对6以下,7开始已经完全抛弃了这个参数,理由是有严重安全问题http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Standard_ImplementationDeprecated. This option is removed in Tomcat 7 onwards where the default of true is always used.If the value of this flag is false, all case sensitivity checks will be disabled. If not specified, the default value of the flag is true.NOTE: This flag MUST NOT be set to false on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems.注意:这个标志禁止在Windows(和其他不区分大小写的文件系统)上设置成false。因为这会导致JSP源代码的暴露和其他安全问题。
     大牛,你太厉害了。难怪我昨晚在家试上面的方法,发现不起作用。原来7开始已经完全抛弃了这个参数了