views:

740

answers:

2

I have a war file that I have to deploy as root on glassfish. Deploying the application with "/" as its context root happens successfully. But when I try to run that application by http://localhost/, it throws a 503 saying the requested service() is not currently available. The log file server.log has an error saying "javax.servlet.ServletException: Site tree is not in the root web application's servlet context". I dont have the source code of this application. Is it a configuration issue that I can try to solve?

A: 

I can't guarantee this, but try undeploying, then renaming the ROOT folder and then deploying again.

kinjal
This is how it works on Apache Tomcat
+1  A: 

Deploying to "/" is correct for placing a webapp in the root context. The other way to depoy to the root is setting your webapp as the "default-web-module" in your "virtual-server" entry. The 503 error is a problem with your servlet. Assuming glassfish v2, you need to turn up your logging levels in your glassfish domain.xml. Look for the tag "module-log-levels" and set the "root", "server", and "web-container" elements to "ALL".

John Ellinwood