• Post Reply Bookmark Topic Watch Topic
  • New Topic

hiding the jsp extension for my pages.  RSS feed

 
nforchu cheka
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys. please can some one tell me how i can prevent the .jsp extension for my jsp pages from showing up in the address bar.

I have been trying to do that. that only thing i can think of right now is providing a servlet mapping for all the pages in my application. but sure that would be hell. if i have to do that for all pages in the application.
you have a wonderful time.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You shouldn't be addressing JSP pages directly in the first place. The URL should reflect the URL of the page controller.

Please see this article for information on properly structuring web apps.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use servlets. You would map it in your web.xml and then redirect it from there.

You may find a tutorial in my link that shows how to do a hello world with servlets.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!