General J2EE: Hiding the jsp name from addressbar
- Posted by: Uma Maheswar Kalluru
- Posted on: August 30 2004 08:43 EDT
My weblogic.xml file is configured this way. Please let me know if I have done some wrong any where.
I do not want to display the full url. e.g http://localhost:7001/test/index.jsp I wanted to display only http://localhost:7001/test/ and hide the jsp name.
I tried all possible combinations, e.g removing <url-pattern>/</url-pattern> and adding only <url-pattern>*.jsp</url-pattern> but nothing is working.
Any helps would be great.
- Hiding the jsp name from addressbar by Scott Carlson on August 30 2004 11:02 EDT
Your best bet is to move your JSPs under WEB-INF, and use a controller (such as Struts, or a simple servlet) to forward to your JSPs.
Thank you for your reply.
iPlanet has this feature embeded in their configuration files. You can have a look at this website http://www.novanthealth.org which on load doesn't show you any index.jsp and when you click on any link it does not display the releavent jsp file name.
I wanted to achieve this feature using Weblogic 8.1. Any ideas would be great.
When I visit, http://www.novanthealth.org I don't see the index.jsp, but that just means that index.jsp is marked as a welcome page. In a Servlet container you need at least Servlet 2.3 spec compliance before that can be set in your web.xml (I believe)
However, every link I click after that I do see the JSP in the URL. As I said, if you really want to accomplish that in WebLogic, you'll need to use a controller servlet that can forward to the JSP internally. You also need to realize that you need something to tell it which JSP to choose, which is part of the URL or data posted to the server.
Thanks for the reply. Please have a look at this link http://www.novanthealth.org/employer_services/
the actual JSP page that is being using is default.jsp in both the links. We are not using any controller here. It works with iPlanet. There must be some configuration to be done with weblogic too to achieve this feature.
I tried editing the web.xml file too but in use.
FYI: I am trying to deploy the same website in Weblogic which is currently running on iPlanet.
Any help please?