0

What url-pattern should we be putting in web.xml for making my servlet listen on this path, /{name}/servlet?

Here, name is a variable so I should be able to listen on http:8080//testproject/xyz/servlet

or

http:8080//testproject/abc/servlet.

Here xyz is a variable name. This is basically a REST URL with parameters, though i can use @Path and @PathParam, but I want to do it in web.xml only.

<servlet-name> A </servlet-name>
<url-pattern> /{}/sevlet </url-pattern> 

Any clues to what put for variable string in the url

Rupesh Yadav
  • 12,096
  • 4
  • 53
  • 70
rm21
  • 160
  • 1
  • 1
  • 7

1 Answers1

0

You can look into servlet filters

aditya_gaur
  • 3,209
  • 6
  • 32
  • 43