aspose file tools*
The moose likes JSP and the fly likes jsp without the .jsp extension. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp without the .jsp extension." Watch "jsp without the .jsp extension." New topic
Author

jsp without the .jsp extension.

Jeff Kinsey
Greenhorn

Joined: Jan 08, 2002
Posts: 19
I have a project that calls for jsp's to be served with an extension of ".po". I have tried creating an entry in the web.xml that looks like:
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.po</url-pattern>
</servlet-mapping>
I have also tried
<servlet-mapping>
<servlet-name>JSPServlet</servlet-name>
<url-pattern>*.po</url-pattern>
</servlet-mapping>
Neither of the above work with Weblogic 6.1 sp2.
I have searched high and low regarding this topic, including reading the servlet spec, but have been unable to find the answer. Any help would be appreciated.
Thanks.
lakshmi rajagopal
Greenhorn

Joined: Jun 22, 2002
Posts: 5
It is impossible to change the extension of a jsp page. because the server can only identify the jsp page by the extension only. so don't waste your effort on this


lakshmi
Jeff Kinsey
Greenhorn

Joined: Jan 08, 2002
Posts: 19
Originally posted by lakshmi rajagopal:
It is impossible to change the extension of a jsp page. because the server can only identify the jsp page by the extension only. so don't waste your effort on this

Not sure I agree, I have read that you are able to map other extensions using Tomcat. I'll have to try it using Tomcat.
L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Hi,
Your web.xml will be like this for this requirement
<servlet>
<servlet-name>myservlet</servlet-name>
<jsp-file>/myjsp.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/myservlet/*.po</url-pattern>
</servlet-mapping>

Hope this helps.
[ June 25, 2002: Message edited by: Lakshmeenarayana Goundalkar ]

SCJP, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp without the .jsp extension.