https://issues.apache.org/bugzilla/show_bug.cgi?id=51418
Bug #: 51418
Summary: Allow more flexibility in adding webapps to
org.apache.catalina.startup.Tomcat
Product: Tomcat 7
Version: 7.0.16
Platform: PC
Status: NEW
Severity: enhancement
Priority: P2
Component: Catalina
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 27194
--> https://issues.apache.org/bugzilla/attachment.cgi?id=27194
A patch to Tomcat.java as described.
the Tomcat.addWebapp all create a context, set up the default realm, and set up
the surrogate global web.xml lifecycle listener. They differ according to
allowing more or less specific configuration of the new webapp. At the end,
they add the new context to the host.
Once the container is running, the act of calling addChild starts it. Some
configuration steps have to precede 'start' -- for example, setting the loader.
Thus, in a complex case, the user needs to take more control of the process.
As things are today, this requires subclassing the Tomcat class and then
copying code from the four-arg addWebapp.
The patch provided here allows non-subclasses to take complete control of the
process. It accomplishes this by providing methods to obtain three things that
are otherwise buried in the Tomcat class: the default in-memory realm, the
listener that serves as a surrogate global web.xml, and a dummy pathname to
allow the listener to work without conflicts.
Given these accessors, a user can simple create a the context (and its
ContextConfig) and configure it to their heart's content, and then pass it to
the addChild method of a Host.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]