• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp without the .jsp extension.

 
Jeff Kinsey
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jeff Kinsey
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 395
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic