Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 78280 invoked by uid 500); 4 Jun 2001 11:43:53 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 78237 invoked from network); 4 Jun 2001 11:43:52 -0000 Message-ID: <20010604114353.24154.qmail@web12803.mail.yahoo.com> Date: Mon, 4 Jun 2001 04:43:53 -0700 (PDT) From: Davanum Srinivas Reply-To: dims@yahoo.com Subject: [C2] ".." in WebLogic/WAR To: cocoon-dev@xml.apache.org In-Reply-To: <20010601154820.25548.qmail@web3707.mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N Jiri, NetUtils has a method called normalize which can remove ".." and "." from an URL. Can you try using this in the AbstractEnvironment.java to fix the problem? Thanks, dims --- Jiri Luzny wrote: > The Simple Internationalization didn't work because some other problem , BUT the real remaining > problem of the WAR deployment is that: > if you change the context path to a sub-site you cannot access resources that are located above > the sub-site > For instance the following sub sites: > i18n: > line: > If you try this you get this: > --------------------- > java.lang.RuntimeException: Problem in > getTransformer:zip:C:/bea/wlserver6.0sp1/config/mydomain/applications/.wl_temp_do_not_delete/wl_local_comp16144.war#i18n/../stylesheets/system/error2html.xsl > ----------------------- > > sub: > line > ------------------- > org.apache.cocoon.ProcessingException: Failed to execute > pipeline.:java.lang.RuntimeException: > Problem in > getTransformer:zip:C:/bea/wlserver6.0sp1/config/mydomain/applications/.wl_temp_do_not_delete/wl_local_comp26518.war#sub/stylesheets/system/error2html.xsl > ------------------- > > These are wrong URI, of course. > However, I'm not sure if it is a bug or proper behavior. If the protocol if "file:" the "../" > works, but with other protocols? If you want to access the "upper" resource, shouldn't you > switch > context back or to use a specific protocol like "context:///"? > > Jiri. > > > > --- Davanum Srinivas wrote: > > Oops...Sorry the Simple Internationalization is not working in WebLogic/WAR deployment (not > the > > sub-sitemap's...) > > > > Thanks, > > dims > > --- dims@apache.org wrote: > > > dims 01/05/31 13:37:05 > > > > > > Modified: src/org/apache/cocoon/environment AbstractEnvironment.java > > > Log: > > > Patch for Weblogic/WAR deployment - relative path issues > > > from Jiri Luzny (jiri_luzny@yahoo.com) > > > One problem left for WebLogic/WAR deployment. Sub-sitemaps are not working..... > > > > > > Revision Changes Path > > > 1.6 +17 -11 > xml-cocoon2/src/org/apache/cocoon/environment/AbstractEnvironment.java > > > > > > Index: AbstractEnvironment.java > > > =================================================================== > > > RCS file: > /home/cvs/xml-cocoon2/src/org/apache/cocoon/environment/AbstractEnvironment.java,v > > > retrieving revision 1.5 > > > retrieving revision 1.6 > > > diff -u -r1.5 -r1.6 > > > --- AbstractEnvironment.java 2001/05/29 17:04:54 1.5 > > > +++ AbstractEnvironment.java 2001/05/31 20:37:05 1.6 > > > @@ -117,19 +117,25 @@ > > > this.prefix.append(prefix); > > > uri = uri.substring(prefix.length()); > > > > > > + //if the resource is zipped into a war file (e.g. Weblogic temp > deployment) > > > + if (this.context.getProtocol().equals("zip")) { > > > + this.context = new URL(this.context.toString() + context); > > > + > > > // if we got a absolute context or one with a protocol resolve it > > > - if (context.charAt(0) == '/') { > > > - this.context = new URL("file:" + context); > > > - }else if (context.indexOf(':') > 1) { > > > - this.context = new URL(context); > > > - }else { > > > - this.context = new URL(this.context, context); > > > - } > > > - File f = new File(this.context.getFile()); > > > - if (f.isFile()) { > > > - this.context = f.getParentFile().toURL(); > > > } else { > > > - this.context = f.toURL(); > > > + if (context.charAt(0) == '/') { > > > + this.context = new URL("file:" + context); > > > + } else if (context.indexOf(':') > 1) { > > > + this.context = new URL(context); > > > + } else { > > > + this.context = new URL(this.context, context); > > > + } > > > + File f = new File(this.context.getFile()); > > > + if (f.isFile()) { > > > + this.context = f.getParentFile().toURL(); > > > + } else { > > > + this.context = f.toURL(); > > > + } > > > } > > > } else { > > > getLogger().error("The current URI (" > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > In case of troubles, e-mail: webmaster@xml.apache.org > > > To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org > > > For additional commands, e-mail: cocoon-cvs-help@xml.apache.org > > > > > > > > > ===== > > Davanum Srinivas, JNI-FAQ Manager > > http://www.jGuru.com/faq/JNI > > > > __________________________________________________ > > Do You Yahoo!? > > Get personalized email addresses from Yahoo! Mail - only $35 > > a year! http://personal.mail.yahoo.com/ > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > > For additional commands, email: cocoon-dev-help@xml.apache.org > > > > > __________________________________________________ > Do You Yahoo!? > Get personalized email addresses from Yahoo! Mail - only $35 > a year! http://personal.mail.yahoo.com/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org > For additional commands, email: cocoon-dev-help@xml.apache.org ===== Davanum Srinivas, JNI-FAQ Manager http://www.jGuru.com/faq/JNI __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org