aspose file tools
The moose likes JSP and the fly likes How to hide .jsp extension? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to hide .jsp extension?" Watch "How to hide .jsp extension?" New topic
Author

How to hide .jsp extension?

Leonardo Carreira
Ranch Hand

Joined: Apr 07, 2009
Posts: 489

Hello friends..

iam curious, is there any way to hide .jsp extension?
example i want to access an Url http://localhost:8080/MyApplication/mypage.jsp ..
is it possible to go that URL only by write http://localhost:8080/MyApplication/mypage (Without .jsp extension)?..
(its look like servlet)..

Thanks in advance..


Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [Java.Boot] [JavaChamp] [JavaPrepare]
Vishwanath Krishnamurthi
Ranch Hand

Joined: Jun 04, 2007
Posts: 331
One way I can think of, is to register a jsp in web.xml, like you do for a servlet and specify 'mypage' in the <url-pattern>

Ex:


Blog
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42954
    
  73
I recommend you read this article. It explains how web apps should be structured in a way so that JSPs are never the primary targets of client accesses to begin with.
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: How to hide .jsp extension?