0

I'm using servlet java and mapping this in web.xml. I'm trying something like this

<servlet>
  <servlet-name>walmart-freight</servlet-name>
  <servlet-class>walmart.Freight</servlet-class>
</servlet>

<servlet-mapping>
  <servlet-name>walmart-freight</servlet-name>
  <url-pattern>/walmart/x/code/*/sku/*</url-pattern>
</servlet-mapping>

But does not find url mapped.

request example: /walmart/x/code/123/sku/457 method=getstrong text

Tiny
  • 27,221
  • 105
  • 339
  • 599
  • did you specify "walmart-freight" in web.xml? – Maksym Nov 13 '14 at 17:33
  • 1
    Not all regex are allowed in mapping. Only concrete mappings vor something like APP/* is allowed. Write a servlet which matches all and delegate the request according to the url – user Nov 13 '14 at 17:35
  • I can just do something like /walmart/x/code/* ? – user1021323 Nov 13 '14 at 17:42
  • @user1021323 yes. But in the servlet you can check the URL against a regex and delegate it to the correct servlet. – user Nov 13 '14 at 17:48

0 Answers0