将遗留应用程序从 WebSphere v.6 迁移到 WebSphere v.8。应用程序的 web.xml 仅包含 servlet 的声明,但不包含 servlet-mappings。然而,所有没有 servlet 映射的 servlet 都可以通过默认的 url 模式 /servlet/[servlet name] 访问。但是,在 WAS8 上,如果 web.xml 更新为属性版本设置为“3.0”:
<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 模式?有用于 tomcat 的 InvokerServlet,是否有用于 WebSphere v.8 的版本?