cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <Giacomo.P...@pwr.ch>
Subject Re: [Patch] allows xsp to compile under catalina & tomcat 3.3
Date Mon, 09 Oct 2000 06:38:49 GMT
Nishant Pant wrote:
> 
> I am sorry for asking this question. But how do u unsubscribe from this
> list. I accidentally deleted the original mail from this list.

Look at the mail headers (the normaly hidden ones)! There is all you
need to know. It's only two clicks to unsubscribe.

Giacomo

> 
> 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.
> _______________________________________________________________________________

-- 
PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1  856 2202
Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1  856 2201
Hintereichenstrasse 7                     Mobil: +41 (0)78 759 7703
CH-8166 Niederweningen                    Mailto:Giacomo.Pati@pwr.ch
                                          Web:   http://www.pwr.ch

Mime
View raw message