from: http://home.java.net/node/688191
I am new to the glassfish and the hype surrounding it, particularly the v3. Try googling for info on glassfish v2.x, and v3 gets in the way--forget even v2.1 (I, however, digress).
Here is what I have found:
If you deploy EAR jar, and try to render a jsp or jsf page; if there is error associated with the page, glassfish displays a HTTP Status 404. These errors might include:
1. [Wrongly reported] Invalid ejb jar
2. Missing shared libraries
3. Classes declared in web.xml but missing in the source path or one that simply contains error
3. etc.
In some cases, you might find the exact causes of the HTTP Status 404, if you look in your glassfish server.log but in most cases, NOTHING! For example after a succesfull verification and deployment, and you then do:
http://www.java.net/external?url=http://localhost:8080/foo-web/index.jsp
And there is error somewhere or some missing shared libraries, the browser will display a HTTP Status 404 error page, but if you then look inside your server.log, you would only find:
[#|2009-01-08T08:59:44.985+0000|SEVERE|sun-appserver9.1|org.apache.jasper.servlet.JspServlet|_ThreadID=27;_ThreadName=httpSSLWorkerThread-8080-0;_RequestID=1ff45167-4f60-4488-942b-bab781b97cf0;|PWC6117: File "/home/applications/glassfish/domains/domain1/docroot/foo-web/index.jsp" not found|#]
A few weeks ago, I posted this problem on this forum but with little response. I [still] occasional have this irritating problem. In glassfish, HTTP Status 404 error is meaningless, because it is used to catch all manners of errors--something you don't find in JBoss or Websphere.
It seem that when there is an error associated with a page, glassfish default to the glassfish/domains/domain1/docroot in search of the page and when it fails to find it there, it displays a HTTP Status 404. This is WRONG: what developers want is the sources of the problem and not a blank catch-it-all HTTP Status 404 page with no helpful info in the server.log.
Atleast in development mode, there should be a way to switch off this default (to glassfish/domains/domain1/docroot) to get a print stack of the real problem causing the page not to render.