Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/JS2-104

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: JS2-104
    Summary: Embedded Tomcat context file support  for hot deployed war files
       Type: Improvement

     Status: Open
   Priority: Major

    Project: Jetspeed 2
 Components: 
             Deployment
   Fix Fors:
             2.0-dev/cvs
   Versions:
             2.0-dev/cvs

   Assignee: Ate Douma
   Reporter: Ate Douma

    Created: Thu, 5 Aug 2004 7:23 PM
    Updated: Thu, 5 Aug 2004 7:23 PM

Description:
For Portlet Applications which need special context configuration on Tomcat, like for 
jndi datasources or allowing crosscontext, the hot deployment will allow embedding a 
Tomcat context file in the war file.
This context file, which must be stored as META-INF/tomcat-context.xml, will be 
automatically put in the correct location (based on the version of Tomcat) with the 
same name as the context path of the portlet application.
The Context path and docBase attributes of the context definition will also be 
automatically (re)written.
If no context file is found the normal deployment behaviour will be performed.

To be able to determine the correct destination for the context file on Tomcat 5, a 
few properties in jetspeed.properties (located in jetspeed/META-INF/conf) have to be 
set correctly (with defaults based on a default Tomcat 5 installation):
  autodeployment.catalina.version.major=5
  autodeployment.catalina.base=${applicationRoot}/../../ 
  autodeployment.catalina.engine=Catalina
  
Important note:
The above property autodeployment.catalina.version.major as defined in the Jetspeed 2 
source (default value: 4) must *not* be modified because its value is automatically 
filtered by ant during deployment.
based on the build property org.apache.jetspeed.catalina.version.major.
A "normal" filter construction (like @CATALINA_VERSION_MAJOR@) cannot be used because 
the properties are also used during testing and in this specific case would lead to a 
failure of TestSpringEngine (NumberFormatException). 

Also important is that the Tomcat Host configuration (both on 4 and 5) should *not* 
have attribute autoDeploy="true" (which is the default) but be set to "false".
Otherwise Tomcat may interfer with the deployment by doing it itself before Jetspeed 
can initiate it.

Although Tomcat 5 officially supports embedding a context file in a war (stored as 
META-INF/context.xml), in practice this doesn't work flawlessly (major 
understatement!).
To prevent conflicts another file name (tomcat-context.xml) is choosen.

I've tested this enhancement on Tomcat 4.1.30 and 5.0.27.
  
The security portlet application contains a tomcat-context.xml as demonstration, 
allowing it to use crosscontext.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to