user595234
user595234

Reputation: 6259

java servlet url mapping doesn't work

In the java servlet, how to do mapping with this url :

http://localhost8080/myproject/client/1234 

the 'myproject' is my root context.

I have tried the /**/client/* , it doesn't work.

Please advise.

Upvotes: 0

Views: 864

Answers (1)

Rahul Borkar
Rahul Borkar

Reputation: 2762

You are doing it wrong

First of all URL should be

http://localhost:8080/myproject/client/1234 

then for doing mapping do it like

<servlet-mapping>
   <servlet-name>app</servlet-name>
   <url-pattern>/client/* </url-pattern>
</servlet-mapping>

Upvotes: 2

Related Questions