A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
How to hide .jsp extension?
Joined: Apr 07, 2009
Jun 13, 2009 04:26:58
iam curious, is there any way to hide .jsp extension?
example i want to access an Url
is it possible to go that URL only by write
(Without .jsp extension)?..
(its look like
Thanks in advance..
Sorry, perhaps my english language isn't too good.. Prepare for SCJP 6, Please God help me.. ☼
References : [
Joined: Jun 04, 2007
Jun 13, 2009 04:34:30
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>
<servlet> <servlet-name>myFoo</servlet-name> <jsp-file>myJSPfile.jsp</jsp-file> </servlet> <servlet-mapping> <servlet-name>myFoo</servlet-name> <url-pattern>/main</url-pattern> </servlet-mapping>
Joined: Mar 22, 2005
Jun 13, 2009 05:10:38
I recommend you read
. 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.
Ping & DNS, my free Android app for network diagnostics
I agree. Here's the link:
subject: How to hide .jsp extension?
JBoss & Tomcat integration - endless problem
where to map the domain name in Tomcat?
Redirect and RedirectAction result types
How to hide action "extension" in URL? (Struts2)
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014