Download Sun GlassFish Enterprise Server 21 Release Notes

Transcript
Web Container
The Servlet 2.4 schema for web.xml no longer supports an empty <load-on-startup>, meaning
that an integer must be specified when using a Servlet 2.4 based web.xml. If specifying an empty
<load-on-startup>, as in <load-on-startup/>, the web.xml will fail validation against the
Servlet 2.4 schema for web.xml, causing deployment of the web application to fail.
Backwards compatibility issue. Specifying an empty <load-on-startup> still works with Servlet
2.3 based web.xml.
Solution
Specify <load-on-startup>0</load-on-startup> when using a Servlet 2.4 based web.xml to
indicate that servlet load order does not matter.
Unable to compile JSP page on resource constrained servers (6184122)
Description
The JSP page is accessed but fails to compile, and the server log contains the error message
"Unable to execute command" with the following stack trace:
at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.
exec(Execute.java:655) at org.apache.tools.ant.taskdefs.Execute.
launch(Execute.java:416)
at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:427)
at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.
executeExternalCompile(DefaultCompilerAdapter.java:448)
at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute
(JavacExternal.java:81)
at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:842)
at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:396)
Solution
Set the JSP compilation switch "fork" to "false."
This can be done either of two ways:
■
Globally, by setting the fork init parameter of the JspServlet in
domain-dir/config/default-web.xml to false:
<servlet> <servlet-name>jsp</servlet-name>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
.... <init-param>
<param-name>fork</param-name> <param-value>false</param-value>
</init-param> .... </servlet>
■
62
On a per-web application basis, by setting the fork JSP configuration property in
sun-web.xml to false:
Sun GlassFish Enterprise Server 2.1 Release Notes • December 2008