0 Replies Latest reply on Sep 19, 2006 5:13 PM by dalingxu

    Invalid <url-pattern> in servlet mapping

    dalingxu

      Hi,

      I am trying to migrate my enterprise application to JBoss 4.0.4.

      In my web.xml, there is a servlet mapping like:
      <servlet-mapping>
      <servlet-name>MyServlet</servlet-name>
      <url-pattern>/MyApp/package1/package2/1.2/ServiceName</url-pattern>
      </servlet-mapping>

      When I deploy the ear (which enclosing the war file), the Jboss gave me this error message:

      java.lang.IllegalArgumentException: Invalid <url-pattern> /MyApp/package1/package2/1.2/ServiceName in servlet mapping.

      And the deploy failed.

      After I comment out the <servlet-mapping> it deployed succeed.

      But the same ear file deployed succeed on OC4J 10.1.2.

      What's the possible reason? Is it because Jboss doesn't like the dot ('.') in the url-pattern? How can I fix this issue? (Change the original source code may not be a solution to me now).

      Thanks