tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harry Mantheakis <>
Subject Re: Hiding Implementation using Tomcat 5
Date Thu, 03 Jun 2004 09:07:31 GMT

You can register your JSPs (just like you can servlets) in the deployment
descriptor, and then map them to a URL pattern of your choice.

Have a look at this link:

If you only register a JSP (but do not define a mapping for it) you can
invoke it using the ServletContext.getNamedDispatcher( String ) method where
'String' is the registered name of the JSP.

The getNamedDispatcher method is useful when you do not want clients to be
able to access JSPs directly - but only via 'controller' servlets which
process requests before invoking any JSPs.

Good luck.

Harry Mantheakis
London, UK

> Hi,
>  I'm in the process of rebuilding the website for the company I work
> for, with JSP using Tomcat 5.  Is there a way to hide the implementation
> from the URI, so that the extension does not need to be typed to get the
> resource.
> eg.
> If I have a file:
>  /foo/bar.jsp
> How can I set up the server, so that if I type in the URI
> I actually get bar.jsp delivered, rather than a 404 Not Found error.
>  From what I've been able to find and read, it seems possible to do
> this using Apache HTTP Server content negotiation, so is it possible
> using Apache Tomcat 5?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message