Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 15106 invoked from network); 21 Feb 2001 15:09:29 -0000 Received: from fw.infoplanning.net (HELO infoplanning.com) (@209.8.58.131) by h31.sny.collab.net with SMTP; 21 Feb 2001 15:09:29 -0000 Received: (qmail 9296 invoked from network); 21 Feb 2001 15:11:50 -0000 Received: from unknown (HELO apache.org) (192.168.0.189) by inet with SMTP; 21 Feb 2001 15:11:50 -0000 Message-ID: <3A93D96A.658D8453@apache.org> Date: Wed, 21 Feb 2001 10:06:18 -0500 From: Berin Loritsch X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: [C2] Regression in classpath generation References: <3A925EDA.7000401@promca.com> <3A92722A.EB91EBF@apache.org> <3A92DFD2.6080704@promca.com> <3A92E21E.2EAD98A2@apache.org> <3A93CEBB.7070402@promca.com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Robert Marcano wrote: > > Berin Loritsch wrote: > > > > > There are other ways of implementing security.... > > Anyhoo, I added two intial parameters for you: > > > > class-dir > > lib-dir > > > > They represent _absolute_ paths to the directory, and are _only_ available in > > the ParanoidCocoonServlet. Please let me know if they work ok for you. > > I tested these parameters, and didn�t worked for two reasons > WebSphere 3.5.2 doesn�t support yet ServletContext init > parameters :-( (I changed it to use Servlet init parameters) > The two "if" used to detect if the parameters were defined uses a > bad condition > > I�m attaching the diff file Thanks. I caught one more bad condition, and committed the changes. > > > > > ------------------------------------------------------------------------------------------------------------------------------------ > Index: ParanoidCocoonServlet.java > =================================================================== > RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/servlet/Attic/ParanoidCocoonServlet.java,v > retrieving revision 1.1.2.2 > diff -u -r1.1.2.2 ParanoidCocoonServlet.java > --- ParanoidCocoonServlet.java 2001/02/20 21:30:30 1.1.2.2 > +++ ParanoidCocoonServlet.java 2001/02/21 13:57:49 > @@ -136,18 +136,18 @@ > private String getClassPath(final ServletContext context, RepositoryClassLoader classloader) > throws ServletException { > StringBuffer buildClassPath = new StringBuffer(); > - String classDirPath = context.getInitParameter("class-dir"); > - String libDirPath = context.getInitParameter("lib-dir"); > + String classDirPath = getInitParameter("class-dir"); > + String libDirPath = getInitParameter("lib-dir"); > String classDir; > File root; > > - if (classDirPath != null && classDirPath.equals("")) { > + if (classDirPath != null && !classDirPath.trim().equals("")) { > classDir = classDirPath; > } else { > classDir = context.getRealPath("/WEB-INF/classes"); > } > > - if (libDirPath != null && classDirPath.equals("")) { > + if (libDirPath != null && !classDirPath.trim().equals("")) { > root = new File(libDirPath); > } else { > root = new File(context.getRealPath("/WEB-INF/lib")); > > ------------------------------------------------------------------------------------------------------------------------------------ > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > For additional commands, email: cocoon-dev-help@xml.apache.org