In servlet we can do this.


But how to do it for jsp file ?


7 Years
Discussion Span
Last Post by rizza_f

I just wondering, if servlet can why jsp can not.

I like mapping because it can manipulating the pattern.

Anyway, I think I can do this with RequestDispatcher, but in the second thought, it's not a good idea. It will makes a lot of servlet. :)

Thanks javaAddict for you comment. So the conclusion is only servlet can mapping.


So the conclusion is only servlet can mapping.

Actually, I've never seen JSPs being mapped. From what I know you map servlets because, the servlet you define, is just the class name. But you cannot call class names, you need to map it to a url. So it is like saying what is the url of the java-servlet-class you created.
But for JSPs, they can go directly to the url. No mapping is needed.
Now if it can be done I don't know, but I am sure that it is not needed

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.