将旧版应用程序从WebSphere v.6迁移到WebSphere v.8。应用程序的web.xml只包含servlet的声明,但不包含servlet映射。然而,没有servlet映射的所有servlet都可以通过缺省的url pattern/servlet/[servlet name]访问。然而,在WAS8,如果web.xml文件中有属性的版本更新设置为“3.0”:WebSphere 8,web.xml版本=“3.0”,默认servlet映射?
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
**version="3.0"**>
宽松的servlet默认映射,需要明确映射,否则它的404页未找到。
在servlet 3.0或至少是WebSphere 8中有没有一种方法来为所有servlet定义默认的url模式? InvokerServlet for tomcat是否有针对WebSphere v.8的版本?