wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Finding the appBase? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Finding the appBase?" Watch "Finding the appBase?" New topic
Author

Finding the appBase?

Andrei Hager
Greenhorn

Joined: Mar 06, 2007
Posts: 10
This is really an attempt to solve the same underlying need as this thread, but it seems worth it's own answer if I can get it.

From within a JSP file, I need to find out what the appBase property is of the current <Host>. Can I always just go down up one directory from the current Context? (I doubt it.)
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Originally posted by Andrei Hager:
Can I always just go down up one directory from the current Context? (I doubt it.)
No. Nothing says the context root needs to be relative to the host root.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Finding the appBase?
 
Similar Threads
Java Servlet - Unable to set root/main/default servlet in Tomcat 5.5
why .war file in webapps folder only
Tomcat,Eclipse and form data
Get Host appbase Path of a JSP in Tomcat
How to configure tomcat to map fxbird.com to localhost:8080/myweb on tomcat 5.5 server?