You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by vo...@basf-it-services.com on 2002/03/15 09:48:36 UTC

[Proposal] Cocoon.getClassPath and Tomcat4


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