cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From volker.schm...@basf-it-services.com
Subject [Proposal] Cocoon.getClassPath and Tomcat4
Date Fri, 15 Mar 2002 08:48:36 GMT


Hi,

is it posible to add the following 3 lines to
"org.apache.cocoon.servlet.Cocoon.getClassPath()"

 protected String getClassPath() throws ServletException {
         StringBuffer buildClassPath = new StringBuffer();

         File root = null;
         if (servletContextPath != null) {
            // Old method.  There *MUST* be a better method than this...

+            String classpath =
(String)this.servletContext.getAttribute("org.apache.catalina.jsp_classpath");
+            if (classpath != null)
+              return classpath;

Tomcat use this classpath compiling JSP pages.I know, this is only usefull using
Tomcat4, but it fixes a problem in my development environment where I have not
deployed all jar files/classes in WEB-INF/lib (very nice for debugging and
online code changes). I have configured my own Classloder in Tomcat which
extends the normal WebAppLoader. I use the "addRepository(path)" of WebAppLoader
to add extra directories to the WebApp classpath. This allows adding pojects of
my development workbench to add to the WebApp classpath without deploying them
to WEB-INF/classes. I am using Eclipse (www.eclipse.org).

Thanks, Volker



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


Mime
View raw message