Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Delivered-To: moderator for cocoon-dev@xml.apache.org Received: (qmail 25912 invoked from network); 9 Oct 2000 04:40:31 -0000 Received: from mx2.metamorgs.com (198.211.64.3) by locus.apache.org with SMTP; 9 Oct 2000 04:40:31 -0000 Received: from 192.168.90.19 by mx2.metamorgs.com (InterScan E-Mail VirusWall NT); Sun, 08 Oct 2000 21:32:59 -0700 (Pacific Daylight Time) Received: by exdel01.del.mgsl.com with Internet Mail Service (5.5.2448.0) id ; Mon, 9 Oct 2000 10:10:53 +0530 Message-ID: <275083FAA13FD411921A006008BF6FFD80476A@exdel01.del.mgsl.com> From: Nishant Pant To: cocoon-dev@xml.apache.org Subject: RE: [Patch] allows xsp to compile under catalina & tomcat 3.3 Date: Mon, 9 Oct 2000 10:10:49 +0530 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N I am sorry for asking this question. But how do u unsubscribe from this list. I accidentally deleted the original mail from this list. Thanks Nishant Pant -----Original Message----- From: Pier P. Fumagalli [mailto:pier@betaversion.org] Sent: Monday, October 09, 2000 10:09 AM To: cocoon-dev@xml.apache.org Subject: Re: [Patch] allows xsp to compile under catalina & tomcat 3.3 I thought Stefano took care of it a couple of weeks ago, but hey, thanks! We're trying to fix the problems with a more decent solution, but it's mostly a JavaC issue, neither Cocoon's or Tomcat/Catalina... Stay tuned... Pier Paul Lamb wrote: > > This allows the xsp compiler to use the classpath exposed by the latest > catalina or tomcat. I can't say that I really like this, but there doesn't > seem to be an alternative. > > Paul Lamb > > Index: xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPProcessor.java > =================================================================== > RCS file: > /home/cvspublic/xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPProcessor. > java,v > retrieving revision 1.25 > diff -u -r1.25 XSPProcessor.java > --- xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPProcessor.java > 2000/08/18 22:43:15 1.25 > +++ xml-cocoon/src/org/apache/cocoon/processor/xsp/XSPProcessor.java > 2000/10/09 03:16:53 > @@ -206,6 +206,15 @@ > + ". Make sure you have writing permissions."); > } > > + String classpath = (String) > this.servletContext.getAttribute("org.apache.catalina.jsp_classpath"); > + if (classpath == null) { > + classpath = (String) > this.servletContext.getAttribute("org.apache.tomcat.jsp_classpath"); > + } > + if( classpath == null ) { > + classpath = System.getProperty("java.class.path"); > + } > + > + > // Set repository for each language processor > Enumeration enum = this.languages.elements(); > while (enum.hasMoreElements()) { > @@ -215,6 +224,7 @@ > try { > languageProcessor.setEncoding(this.encoding); > languageProcessor.setRepository(this.repositoryFile); > + languageProcessor.setClassPath(classpath); > } catch (Exception e) { > throw new RuntimeException( > "Error setting repository for language processor: " + > > Index: > xml-cocoon/src/org/apache/cocoon/processor/xsp/language/XSPLanguageProcessor > .java > =================================================================== > RCS file: > /home/cvspublic/xml-cocoon/src/org/apache/cocoon/processor/xsp/language/XSPL > anguageProcessor.java,v > retrieving revision 1.5 > diff -u -r1.5 XSPLanguageProcessor.java > --- > xml-cocoon/src/org/apache/cocoon/processor/xsp/language/XSPLanguageProcessor > .java 2000/05/07 00:43:57 1.5 > +++ > xml-cocoon/src/org/apache/cocoon/processor/xsp/language/XSPLanguageProcessor > .java 2000/10/09 03:16:54 > @@ -52,8 +52,8 @@ > package org.apache.cocoon.processor.xsp.language; > > import java.io.File; > -import org.w3c.dom.Document; > -import javax.servlet.http.HttpServletRequest; > +//import org.w3c.dom.Document; > +//import javax.servlet.http.HttpServletRequest; > > import org.apache.cocoon.processor.xsp.*; > > @@ -70,6 +70,8 @@ > > public void setFormatOption(boolean format); > public String formatCode(String code) throws Exception; > + > + public void setClassPath(String classpath); > > public void compile(String filename) throws Exception; > > > Index: > xml-cocoon/src/org/apache/cocoon/processor/xsp/language/java/XSPJavaProcesso > r.java > =================================================================== > RCS file: > /home/cvspublic/xml-cocoon/src/org/apache/cocoon/processor/xsp/language/java > /XSPJavaProcessor.java,v > retrieving revision 1.11 > diff -u -r1.11 XSPJavaProcessor.java > --- > xml-cocoon/src/org/apache/cocoon/processor/xsp/language/java/XSPJavaProcesso > r.java 2000/08/18 22:43:59 1.11 > +++ > xml-cocoon/src/org/apache/cocoon/processor/xsp/language/java/XSPJavaProcesso > r.java 2000/10/09 03:16:54 > @@ -69,6 +69,7 @@ > protected String encoding; > protected XSPClassLoader classLoader; > protected JavaCompiler javac; > + protected String classpath; > > protected boolean format; > > @@ -112,6 +113,10 @@ > // or similar to allow easier XSP code debugging (SM) > return code; > } > + > + public void setClassPath(String classpath) { > + this.classpath = classpath; > + } > > public void compile(String filename) throws Exception { > String repositoryName = this.repository.getCanonicalPath(); > @@ -120,7 +125,7 @@ > ByteArrayOutputStream err = new ByteArrayOutputStream(256); > > javac.setEncoding(this.encoding); > - javac.setClasspath(repositoryName + File.pathSeparator + > System.getProperty("java.class.path")); > + javac.setClasspath(repositoryName + File.pathSeparator + > this.classpath); > javac.setOutputDir(repositoryName); > javac.setMsgOutput(err); > ________________________________________________________________________________ *Note : Our Emaildomain name has been changed from "metamorgs.com" to "psinetcs.com" However we will be receiving e-mails from both the domains. For more information please visit our website at http://www.psinetcs.com or call helpdesk at 1-800-815-1622. _______________________________________________________________________________