File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes hiding 'web-app' in url for no particular reason... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "hiding Watch "hiding New topic

hiding 'web-app' in url for no particular reason...

Matt Horton
Ranch Hand

Joined: Feb 06, 2002
Posts: 107
Hi is it possible for
http://hostname/webAppPrefix/someServlet to
be evaluated at
I don't find this to be particularly important (though my web-app name is the same name as my controller, so it reads silly/silly).
I am not sure if this is simply an application server issue, but in JRun, I have played around w/ the referring URL Map, and set it to "" [actually the JMC does not allow this, because the ui was written to believe that the default application is ""... so as a workaround in the file I modified the settings for default and my app:
Unfortunately, having done this, the web server simply intercepts any and all calls to http://hostname
It is evident that JRun does not evaluate "" as the web app name when calls to the controller servlet, ie http://hostname/someServlet return a 404 error.
Thanks as always.
Garrett Smith
Ranch Hand

Joined: Jun 27, 2002
Posts: 401
This is probably implementation specific, but I am using root context.

I suppose if you were using apache with a tomcat connector, you could use apache mod rewrite.
[ October 26, 2002: Message edited by: Garrett Smith ]

comp.lang.javascript FAQ:
Matt Horton
Ranch Hand

Joined: Feb 06, 2002
Posts: 107
Thanks for your help Garrett...
I've currently put this on backburner, but my suspicion is that jrun should implement this in the same manner, when I get the opportunity to duplicate, I'll reply with more information.
Thanks again...
I agree. Here's the link:
subject: hiding 'web-app' in url for no particular reason...
It's not a secret anymore!