views:

24

answers:

1

My JSF application works in my local tomcat for URL like http://localhost:8080/MyApp/admin, but not on the hosting server, the URL there is http://www.myapp.com/admin Do I need to do something with 'context.xml'/ put BocBase & AppBase. I got these things googling, but could not understand what exactly I have to do. Can anyone help me with the exact thing thats has to be done to get this working?

Thanks | Abhi

A: 

This is described in Tomcat's Configuration Reference - The Context Container

docBase

The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host.

The value of this field must not be set when the Context is configured using a META-INF/context.xml file as it will be inferred by the automatic deployment process.

Your URL indicates that you want to have it on a document base of root. So it should be set to /.

BalusC
@BalusC, Thanks! Can you give me an example?
Abhishek
An example of what? Setting docbase to root speaks for itself: `docBase="/"`. Do it in the associated `<Context>` element in the `context.xml` file.
BalusC