By testing Glassfish 3.1 (b48) and Glassfish 3.1.1 (b11) I found that the deployment with precompile option doesn't work as expected.
I tried two different packaging:
1) providing utility JARs under EAR/lib
2) providing all utility JARs references on META-INF/MANIFEST.mf for all interested modules.
In both cases the deployment raises the following error that is asserting the JSP cannot resolve many class libraries that are actually visible and correctly packaged in the EAR.
The same packaged EARs are correctly deployed with Netbeans 7.0 in a GF 3.1 (developer profile)
Error occurred during deployment: Exception while preparing the app : JSP Compilation Error: org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP PWC6199: Generated servlet error: string:///download_jsp.java:8: package com.portal.util does not exist PWC6199: Generated servlet error: string:///download_jsp.java:9: package com.portal.util does not exist PWC6199: Generated servlet error: string:///download_jsp.java:12: package com.contshipitalia.broker does not exist PWC6199: Generated servlet error: string:///download_jsp.java:13: package com.contshipitalia.persistence does not exist PWC6199: Generated servlet error: string:///download_jsp.java:14: package com.contshipitalia.persistence does not exist PWC6199: Generated servlet error: string:///download_jsp.java:15: package com.contshipitalia.util does not exist PWC6199: Generated servlet error: string:///download_jsp.java:16: package com.contshipitalia.net does not exist PWC6197: An error occurred at li .... msg.seeServerLog
Using GF 3.1.1 errors are thousand and I do not list them here but I just can say the deployment is completely corrupted in this version using the admin GUI.
I had no time to test the asadmin command-line yet.
Using GF 3.1 I tried a deployement always using the asadmin GUI but without precompile option and I found that the EAR is deployed with no errors apparently.
Anyway the Application it doesn't work as I obtain always HTTP 404 when a jsp or servlet is requested.
The 404 is raised because pages are searched in the docroot location which is empty after deployment:
[#|2011-07-14T10:53:34.500+0200|SEVERE|glassfish3.1|org.apache.jasper.servlet.JspServlet|_ThreadID=23;_ThreadName=Thread-1;|PWC6117: File "D%3A%5Cglassfish3%5Cglassfish%5Cnodes%5Clocalhost-domain1%5Cinstance1%5Cdocroot%5Cnews%5Clatest_news.jsp" not found|#]
By inspecting the GF directories I found that under /domain1/applications/... the EAR has been deployed, and docroot is empty.
A request to a jsp or servlet do not trigger its compilation bacause it is not resolved under /docroot.
It is not clear the role of /docroot that should be optional (see when static pages in the root are installed on a web server)