tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41260] New: - [Contribution] WebAppLoader and DirContext implementations for handling with expanded webapp during development
Date Fri, 29 Dec 2006 14:16:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41260

           Summary: [Contribution] WebAppLoader and DirContext
                    implementations for handling with expanded webapp during
                    development
           Product: Tomcat 6
           Version: 6.0.2
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: fgiust@apache.org


Background:
Through the customization of the <Loader> and <Resources> elements in a context
definition tomcat allow to plug in custom implementations that can handle a
webapp also if not assembled in a standard way.
This is especially useful during development and I saw several implementations
of custom classloaders in the past (see for example the one used by the Sysdeo
tomcat plugin for Eclipse, or other implementations for eclipse Webtools
adapters): this makes possible for IDE users to develop and update classes
without the need for fully republishing jars in WEB-INF/lib. The addition of a
custom classloader also needs the modification of the server (or common) loader
in catalina.properties.
By using a custom DirContext is also possible to handle tld files that should be
placed in WEB-INF or in the META-INF directory of jars in the classpath by
"virtually publishing" them to the WEB-INF dir, making a webapp with unexpanded
jars behave like a standard one.

Since these "development versions" of a webapp classloader are fairly simple and
could be made very generic I think that it makes sense to add such a
customizable classloader directly to the tomcat distribution.

I have implemented two fairly simple extension that allow a "virtualClasspath"
element that can be used to configure additional classpath entries. This is a
sample context configuration:

<Context docBase="\webapps\mydocbase">
  <Loader className="org.apache.catalina.loader.VirtualWebappLoader"
              virtualClasspath="\dir\classes;\somedir\somejar.jar"/>
  <Resources className="org.apache.naming.resources.VirtualDirContext"
              virtualClasspath="\dir\classes;\somedir\somejar.jar"/>
</Context>


I would be happy to see them integrated in the tomcat codebase, so that any
development environment that needs a simplified way of loading webapps could
make use of it without having to reinvent them...

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message