Meaningless Drivel is fun!*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "hiding Watch "hiding New topic
Author

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
http://hostname/someServlet?
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 local.properties file I modified the settings for default and my app:
webapp.mapping./webAppPrefix=appname
to
webapp.mapping.=appname]
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.
server.xml:

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: http://jibbering.com/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: http://aspose.com/file-tools
 
subject: hiding 'web-app' in url for no particular reason...