...
Code Block | ||||
---|---|---|---|---|
| ||||
<init-param> <param-name>development</param-name> <param-value>true</param-value> </init-param> <init-param> <param-name>modificationTestInterval</param-name> <param-value>10</param-value> </init-param> |
modificationTestInterval is time in seconds.
Persist JSP Compilation
If your Tomcat server is configured to persist JSP compilation between server restarts than you can configure geronimo as well for the same configuration. However there are two ways you can configure this in geronimo.
Server scoped
Using this you can retain the compiled JSPs of all Web applications running in the server across server restarts. Edit <geronimo_home>/var/catalina/conf/web.xml. Search for org.apache.jasper.servlet.JspServlet and add the following elements
Code Block | ||||
---|---|---|---|---|
| ||||
<init-param>
<param-name>scratchdir</param-name>
<param-value>
../var/catalina/temp
</param-value>
</init-param>
<init-param>
<param-name>keepgenerated</param-name>
<param-value>false</param-value>
</init-param>
|
Create a directory <geronimo_home>/var/catalina/temp. All the web applications will be compiled and stored in temp directory. These will persist over server restarts.
Application scoped
Configure the web deployment descriptor web.xml in application as follows
Code Block | ||||
---|---|---|---|---|
| ||||
<servlet>
<servlet-name>jsp</servlet-name>
<servlet-class>
org.apache.jasper.servlet.JspServlet
</servlet-class>
<init-param>
<param-name>development</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>fork</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>scratchdir</param-name>
<param-value>
../var/catalina/temp
</param-value>
</init-param>
<init-param>
<param-name>keepgenerated</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>xpoweredBy</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>engineOptionsClass</param-name>
<param-value>
org.apache.geronimo.jasper.JspServletOptions
</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>jsp</servlet-name>
<url-pattern>*.jspx</url-pattern>
</servlet-mapping>
|
You need to create the temp directory in this case as well.
References
Following resources can be useful while migrating from Tomcat to Geronimo
1) http://geronimo.apache.org/schemas-2.1/docs/geronimo-module-1.2.xsd.html- Look for inverse-classloading. You may also want to know more on dependencies, hidden-classes, non-overridable-classes. These all elements will be helpful in modifying the geronimo-web.xml.
2) Learn how to configure JMS with apache geronimo - http://cwiki.apache.org/GMOxDOC21/web-application-for-jms-access.html
3) Learn how to configure JDBC with apache geronimo- http://cwiki.apache.org/GMOxDOC21/web-application-for-jdbc-access.html
4) For security related configurations you can refer- http://cwiki.apache.org/GMOxDOC21/configuring-security.html
5) More on configuring various services- JMS, JDBC http://cwiki.apache.org/GMOxDOC21/configuring-services.html