[xmlc] Re: Re: Re: SSI and XMLC
"Jacob Kjome" <[email protected]> Thu, 31 Mar 2011 14:40:54 -0500
| Newsgroups | gmane.comp.java.enhydra.xmlc |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format... ------------=_1301600460-30467-16292 Content-Type: text/plain;charset=iso-8859-1; format="flowed" Content-Transfer-Encoding: quoted-printable I see.=A0 That makes more sense, as I don't recall anything having specif= ically=20 to do with SSI loading having changed between XMLC 2.3.1 and 2.3.2 (at le= ast=20 nothing that should affect this scenario). I suspect, ultimately, that this is a deficiency of JarURLConnection in=20 dealing with paths containing "/../", though I have yet to verify this.=A0= I=20 believe this works fine when it's a non "jar:" URL path, so I think the=20 problem is specific to JarURLConnection. You could probably work around this either in your custom classloader (wh= ere,=20 as I recall, you applied the fix for "jar:" URLs originally) or in a cust= om=20 document/resource loader.=A0 All you'd need to do is re-write the path of= the=20 URL to pre-resolve the ".." parts changing, for instance, this... jar:file:/D:/apache-tomcat-6.0.29/webapps/airSent/WEB-INF/lib/airSent.jar= !/com/lutris/airsent/presentation/customer/../media/TopBanner.ssi ...to this... jar:file:/D:/apache-tomcat-6.0.29/webapps/airSent/WEB-INF/lib/airSent.jar= !/com/lutris/airsent/presentation/media/TopBanner.ssi That said, this is probably something that XMLC could take care of=20 internally.=A0 I would certainly consider this for the next release if my= =20 assumptions pan out. Jake On Thu, 31 Mar 2011 21:11:06 +0200 =A0Sasa Bojanic <[email protected]> wrote: > Sorry...it doesn't work with XMLC 2.3-1 as well... >=20 > Yes, the com/lutris/airsent/presentation/media/TopBanner.ssi is the rig= ht=20 >location within the JAR. >=20 > You can try with the airSent.war from the ZIP file. However, if you use= this=20 >WAR as it is, everything works well both with XMLC2.3-1 (which is origin= ally=20 >inside the WAR) and with XMLC2.3-2 (when you replace the XMLC/GNUREGEXP = JAR=20 >files). The problem occurs when you pack everything from WEB-INF\classes= =20 >folder into the JAR file, and then put this JAR file into WEB-INF\lib fo= lder=20 >(and this is the change we are introducing in our new release). So the=20 >problem was here even in XMLC 2.3-1 but we didn't notice it. >=20 > Do you think it is an XMLC problem or...? >=20 > Sasa. >=20 > On 31-Mar-11 19:44, Jacob Kjome wrote: >> >> It looks like it's referencing the jar it should exist in, and clearly= it=20 >>found the markup file including the SSI, so I don't think this is a=20 >>classloader issue. >> >> Does the path seem right to you?=A0=A0That is, does the file in questi= on exist=20 >>in the following relative path within the airSent.jar file?.... >> >> com/lutris/airsent/presentation/media/TopBanner.ssi >> >> If you can confirm that, I can try to test things out at home tonight.= =A0=A0I=20 >>presume this jar is one of those in the zip file containing all the web= apps=20 >>which can be deployed under Tomcat Standalone? >> >> >> Jake >> >> On Thu, 31 Mar 2011 16:31:32 +0200 >>=A0=A0Sasa Bojanic <[email protected]> wrote: >>> Me again :-) >>> >>> Just a question...have you changed to XMLC related to Server Side Inc= ludes=20 >>>from HTML? >>> >>> The situation is the following: >>> >>> HTML file (processed by XMLC) includes another HTML file via relative= path: >>> >>> <!--#include virtual=3D"../media/TopBanner.ssi"--> >>> >>> When XMLC parses HTML file, I get the following exception (when all t= he=20 >>>resources are in the JAR file): >>> >>> java.io.FileNotFoundException: JAR entry=20 >>>com/lutris/airsent/presentation/customer/../media/TopBanner.ssi not fo= und in=20 >>>D:\apache-tomcat-6.0.29\webapps\airSent\WEB-INF\lib\airSent.jar >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.jav= a:122) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnect= ion.java:132) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.io.InputSourceOps.openSystemId(InputSourceOps.java:65) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at org.enhydra.xml.io.InputSourceOps.ope= n(InputSourceOps.java:85) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.misc.SSIParsedStream.readIntoBuffer(SSIParsedStre= am.java:198) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.misc.SSIParsedStream.<init>(SSIParsedStream.java:= 159) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.misc.SSIReader.openSSIInclude(SSIReader.java:153) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.misc.SSIReader.processSSIInclude(SSIReader.java:1= 69) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.misc.SSIReader.processSSIDirective(SSIReader.java= :179) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at org.enhydra.xml.xmlc.misc.SSIReader.r= ead(SSIReader.java:228) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.cyberneko.html.HTMLScanner$CurrentEntity.load(HTMLScanner.java:177= 2) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.cyberneko.html.HTMLScanner.skipNewlines(HTMLScanner.java:1522) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.cyberneko.html.HTMLScanner$ContentScanner.scanCharacters(HTMLScann= er.java:2227) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.cyberneko.html.HTMLScanner$ContentScanner.scan(HTMLScanner.java:19= 64) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.cyberneko.html.HTMLScanner.scanDocument(HTMLScanner.java:895) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:499) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.cyberneko.html.HTMLConfiguration.parse(HTMLConfiguration.java:452) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at org.apache.xerces.parsers.XMLParser.p= arse(Unknown Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at org.apache.xerces.parsers.DOMParser.p= arse(Unknown Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.parsers.xerces.XercesDOMParser.parse(XercesDOMPar= ser.java:113) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.parsers.xerces.XercesHTMLDOMParser.parse(XercesHT= MLDOMParser.java:64) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at org.enhydra.xml.xmlc.compiler.Parse.p= arse(Parse.java:291) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.parseDocument(= DocumentLoaderImpl.java:405) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getCacheEntry(= DocumentLoaderImpl.java:175) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.deferredparsing.DocumentLoaderImpl.getDocument(Do= cumentLoaderImpl.java:247) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>com.lutris.airsent.presentation.customer.LoginHTML.buildDocument(Unkno= wn=20 >>>Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>com.lutris.airsent.presentation.customer.LoginHTML.<init>(Unknown Sour= ce) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>com.lutris.airsent.presentation.customer.LoginHTML.<init>(Unknown Sour= ce) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at sun.reflect.NativeConstructorAccessor= Impl.newInstance0(Native=20 >>>Method) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructo= rAccessorImpl.java:39) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingCo= nstructorAccessorImpl.java:27) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at java.lang.reflect.Constructor.newInst= ance(Constructor.java:513) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.create= Object(XMLCDeferredParsingFactory.java:160) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.deferredparsing.XMLCDeferredParsingFactory.doCrea= te(XMLCDeferredParsingFactory.java:185) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.enhydra.xml.xmlc.XMLCStdFactory.create(XMLCStdFactory.java:139) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at com.lutris.airsent.presentation.custo= mer.Login.showPage(Unknown=20 >>>Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>com.lutris.airsent.presentation.customer.Login.handleDefault(Unknown S= ource) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at com.lutris.airsent.presentation.BaseP= O.handleEvent(Unknown=20 >>>Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at com.lutris.airsent.presentation.BaseP= O.run(Unknown Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>com.lutris.appserver.server.httpPresentation.HttpPresentationManager.r= unPresentationObj(Unknown=20 >>>Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>com.lutris.appserver.server.httpPresentation.HttpPresentationManager.R= un(Unknown=20 >>>Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationS= ervlet.serviceDirect(Unknown=20 >>>Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>com.lutris.appserver.server.httpPresentation.servlet.HttpPresentationS= ervlet.service(Unknown=20 >>>Source) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at javax.servlet.http.HttpServlet.servic= e(HttpServlet.java:717) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli= cationFilterChain.java:290) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi= lterChain.java:206) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa= lve.java:233) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa= lve.java:191) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja= va:127) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja= va:102) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv= e.java:109) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java= :298) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor= .java:861) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.pro= cess(Http11AprProtocol.java:579) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at=20 >>>org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:158= 4) >>>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0at java.lang.Thread.run(Thread.java:662) >>> org.enhydra.xml.xmlc.XMLCError: Couldn't load XMLC class >>> >>> >>> Just to mention, like always with XMLC2.3-1 it worked...maybe because= our=20 >>>"magical" classloader...but can't be sure. >>> >>> Greetings, >>> Sasa. >> >=20 ------------=_1301600460-30467-16292 Content-Type: text/plain; charset="UTF-8"; name="message-footer.txt" Content-Disposition: inline; filename="message-footer.txt" Content-Transfer-Encoding: quoted-printable -- You receive this message as a subscriber of the [email protected] mailing list= . To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=3Dhelp OW2 mailing lists service home page: http://www.ow2.org/wws ------------=_1301600460-30467-16292--