0

http://localhost:8080/pvPreet/index.jsp

Hi all, I want to remove extension from the above link. Exactly i want a solution which is applicable for all the jsp files available in my project. Right now i am using the below code for this purpose and it is working fine as well but using this code for each and every file is not an good idea. That's why i was looking for an standardize way for this purpose. So please help!

<servlet>
    <servlet-name>index</servlet-name>
    <jsp-file>/index.jsp</jsp-file>
</servlet>
<servlet-mapping>
    <servlet-name>index</servlet-name>
    <url-pattern>/index</url-pattern>
</servlet-mapping>
Anuj Balan
  • 7,629
  • 23
  • 58
  • 92
Vivek
  • 1

1 Answers1

0

You might want to consider using jsp-servlet instead of just using jsp to do it all. When using jsp-servlet you can using annotation to specify your servlet path and do not need the mapping. Here is an example

TuyenNTA
  • 1,194
  • 1
  • 11
  • 19