Return-Path: Delivered-To: apmail-forrest-dev-archive@www.apache.org Received: (qmail 88461 invoked from network); 18 Jul 2006 15:18:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Jul 2006 15:18:14 -0000 Received: (qmail 7782 invoked by uid 500); 18 Jul 2006 15:18:09 -0000 Delivered-To: apmail-forrest-dev-archive@forrest.apache.org Received: (qmail 7706 invoked by uid 500); 18 Jul 2006 15:18:08 -0000 Mailing-List: contact dev-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@forrest.apache.org List-Id: Delivered-To: mailing list dev@forrest.apache.org Received: (qmail 7644 invoked by uid 99); 18 Jul 2006 15:18:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jul 2006 08:18:08 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [81.80.55.87] (HELO daikiri.pcotech.fr) (81.80.55.87) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jul 2006 08:18:06 -0700 Received: by daikiri.pcotech.fr (Postfix, from userid 60001) id E444334476; Tue, 18 Jul 2006 17:17:42 +0200 (MEST) Received: from daikiri.pcotech.fr (localhost [127.0.0.1]) by daikiri.pcotech.fr (Postfix) with SMTP id 7DCA83444C for ; Tue, 18 Jul 2006 17:17:29 +0200 (MEST) Received: from b52.pcotech.fr ([192.168.101.124]) by daikiri.pcotech.fr (SMSSMTP 4.1.0.19) with SMTP id M2006071817172824480 for ; Tue, 18 Jul 2006 17:17:28 +0200 Received: from [192.168.106.42] (dhcp-tlse-42.pcotech.fr [192.168.106.42]) by b52.pcotech.fr (8.12.8/8.12.8) with ESMTP id k6IFHSQa001246 for ; Tue, 18 Jul 2006 17:17:28 +0200 Message-ID: <44BCFB7A.2000902@pcotech.fr> Date: Tue, 18 Jul 2006 17:17:14 +0200 From: Cyriaque Dupoirieux User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: dev@forrest.apache.org Subject: Re: [jira] Commented: (FOR-893) wildcard matcher such as **.xml when used in lm actions like {1} are not rewritten References: <25868014.1153124295574.JavaMail.jira@brutus> <1153125976.8132.17.camel@localhost.localdomain> <44BB5836.4060007@pcotech.fr> <1153145424.8132.45.camel@localhost.localdomain> In-Reply-To: <1153145424.8132.45.camel@localhost.localdomain> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on daikiri X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-5.7 required=3.5 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.0.4 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N le 17/07/2006 16:10 Thorsten Scherler a écrit : > El lun, 17-07-2006 a las 11:28 +0200, Cyriaque Dupoirieux escribió: > >> le 17/07/2006 10:46 Thorsten Scherler a écrit : >> >>> El lun, 17-07-2006 a las 01:18 -0700, Cyriaque Dupoirieux (JIRA) >>> escribió: >>> > [SNIP...] > > I am not sure. This is not a dispatcher problem but more a locationmap > one. The dispatcher transformer is coming into place later. However you > can do something like: > Index: > src/java/org/apache/forrest/dispatcher/acting/RecursiveDirectoryTraversalAction.java > =================================================================== > --- > src/java/org/apache/forrest/dispatcher/acting/RecursiveDirectoryTraversalAction.java (revisión: 422657) > +++ > src/java/org/apache/forrest/dispatcher/acting/RecursiveDirectoryTraversalAction.java (copia de trabajo) > @@ -96,6 +96,7 @@ > this.prepare(parameters, source); > String uri = this.getProjectDir() + this.getRequest() > + this.getProjectExtension(); > + getLogger().warn("RecursiveDirectoryTraversalAction trying to > use uri: "+uri); > Map returnMap = act(uri); > return returnMap; > } > @@ -116,6 +117,7 @@ > this.computeResponseURI(uri, src); > //src = resolver.resolveURI(uri); > if (this.map.containsKey("uri")) { > + getLogger().warn("RecursiveDirectoryTraversalAction > found at location: "+uri); > return this.map; > } else { > return null; > > For debug e.g the RecursiveDirectoryTraversalAction and see what the uri > is. > > You can see it with > tail -f build/webapp/WEB-INF/logs/*.log|grep > RecursiveDirectoryTraversalAction > > which should return something like: > WARN (2006-07-17) 16:08.49:702 [core.modules.mapper.lm] > (/search.html) PoolThread-4/RecursiveDirectoryTraversalAction: > RecursiveDirectoryTraversalAction trying to use > uri: /home/thorsten/src/x/blog/src/documentation/resources/structurer/url/search.fv > WARN (2006-07-17) 16:08.49:705 [core.modules.mapper.lm] > (/search.html) PoolThread-4/RecursiveDirectoryTraversalAction: > RecursiveDirectoryTraversalAction trying to use > uri: /home/thorsten/src/x/blog/src/documentation/content/xdocs/search.fv > WARN (2006-07-17) 16:08.49:705 [core.modules.mapper.lm] > (/search.html) PoolThread-4/RecursiveDirectoryTraversalAction: > RecursiveDirectoryTraversalAction found at > location: /home/thorsten/src/x/blog/src/documentation/content/xdocs/search.fv > > In any case please do > thorsten@cartman:~/src/apache/forrest/trunk/main$ ./build.sh clean > thorsten@cartman:~/src/apache/forrest/trunk/main$ ./build.sh > before you test. > Done, > Make sure that > forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher$ svn diff locationmap.xml > returns nothing. > Done, Now the results : ============ Example of my structure : xdocs/ |-- jeux |-- ultima2.xml `-- ultima2/ `-- mondes/ |-- mapx21.xml structurer/url/ |-- jeux/ | `-- ultima2/ | `-- mondes/ | |-- pelt.fv `-- pelt.fv The correct behaviour should be : - jeux/ultima2.xml uses structurer/url/pelt.fv - jeux/ultima2/mondes/mapx21 uses structure/url/jeux/ultima2/mondes/pelt.fv dispatcherErrorStack: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed. WARN (2006-07-18) 15:53.33:656 [cocoon.manager] (Unknown-URI) Unknown-Thread/SourceExistsSelector: Error reading from source 'lm://dispatcher.structurer.resourceType.document-v20': Could not resolve locationmap location. WARN (2006-07-18) 15:53.33:656 [cocoon.manager] (Unknown-URI) Unknown-Thread/RecursiveDirectoryTraversalAction: trying to use uri: D:\duc\viewSitePerso/src/documentation/resources/structurer/url/jeux/ultima2.fv WARN (2006-07-18) 15:53.33:656 [cocoon.manager] (Unknown-URI) Unknown-Thread/RecursiveDirectoryTraversalAction: found at location: D:\duc\viewSitePerso/src/documentation/resources/structurer/url/pelt.fv for [D:\duc\viewSitePerso/src/documentation/resources/structurer/url/jeux/ultima2.fv] WARN (2006-07-18) 15:53.35:453 [cocoon.manager] (Unknown-URI) Unknown-Thread/RecursiveDirectoryTraversalAction: trying to use uri: D:\duc\viewSitePerso/src/documentation/resources/structurer/url/.fv WARN (2006-07-18) 15:53.35:453 [cocoon.manager] (Unknown-URI) Unknown-Thread/RecursiveDirectoryTraversalAction: found at location: D:\duc\viewSitePerso/src/documentation/resources/structurer/url/pelt.fv for [D:\duc\viewSitePerso/src/documentation/resources/structurer/url/.fv] ERROR (2006-07-18) 15:53.37:000 [cocoon.manager] (Unknown-URI) Unknown-Thread/DispatcherTransformer: dispatcherError: 500 - Internal server error The contract "content-title" has thrown thrown an exception by resolving raw data from "cocoon://jeux/ultima2/mondes/mapx21.title.xml". So here, we can see that there is a problem with the uri of the second file which is jeux/ultima2/mondes/mapx21.xml Now, I replace the {../1} by {1} in the request - just to see : dispatcherErrorStack: org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed. WARN (2006-07-18) 16:48.36:312 [cocoon.manager] (Unknown-URI) Unknown-Thread/SourceExistsSelector: Error reading from source 'lm://dispatcher.structurer.resourceType.document-v20': Could not resolve locationmap location. WARN (2006-07-18) 16:48.36:312 [cocoon.manager] (Unknown-URI) Unknown-Thread/RecursiveDirectoryTraversalAction: trying to use uri: D:\duc\viewSitePerso/src/documentation/resources/structurer/url/.fv WARN (2006-07-18) 16:48.36:312 [cocoon.manager] (Unknown-URI) Unknown-Thread/RecursiveDirectoryTraversalAction: found at location: D:\duc\viewSitePerso/src/documentation/resources/structurer/url/pelt.fv for [D:\duc\viewSitePerso/src/documentation/resources/structurer/url/.fv] WARN (2006-07-18) 16:48.38:109 [cocoon.manager] (Unknown-URI) Unknown-Thread/RecursiveDirectoryTraversalAction: trying to use uri: D:\duc\viewSitePerso/src/documentation/resources/structurer/url/jeux/ultima2/mondes/mapx21.fv WARN (2006-07-18) 16:48.38:109 [cocoon.manager] (Unknown-URI) Unknown-Thread/RecursiveDirectoryTraversalAction: found at location: D:\duc\viewSitePerso/src/documentation/resources/structurer/url/jeux/ultima2/mondes/pelt.fv for [D:\duc\viewSitePerso/src/documentation/resources/structurer/url/jeux/ultima2/mondes/mapx21.fv] And now there is a problem with the uri of the first file which is jeux/ultima2.xml I think you are going to understand :-) since my logs are not identical to yours : I have [cocoon.manager] instead of [core.modules.mapper.lm] and (Unknown-URI) Unknown-Thread instead of (/search.html) PoolThread-4 Salutations, Cyriaque, > salu2 > > >> Salutations, >> Cyriaque, >> >>>> If I replace the {../1} by the previous {1} : >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> It works again. >>>> >>>> I reopen the FOR... >>>> >>>> >>> Hmm, it is hard to assist on this since it is working fine for me. >>> >>> Did you change the locationmap.xml or have implemented own matches in >>> your project lm? >>> >>> Can somebody else test the current changes? >>> >>> salu2 >>> >>> >>> >>>>> wildcard matcher such as **.xml when used in lm actions like {1} are not rewritten >>>>> ---------------------------------------------------------------------------------- >>>>> >>>>> Key: FOR-893 >>>>> URL: http://issues.apache.org/jira/browse/FOR-893 >>>>> Project: Forrest >>>>> Issue Type: Bug >>>>> Components: Locationmap, Dispatcher (aka views) >>>>> Reporter: Thorsten Scherler >>>>> Attachments: lm.log.xml >>>>> >>>>> >>>>> In the thread http://marc.theaimsgroup.com/?t=114682704400003&r=1&w=2 I found out the following. >>>>> I did a debug session with the RecursiveDirectoryTraversalAction and I >>>>> figured out that the {1} in the lm is not probably resolved (it is >>>>> always ""). >>>>> >>>>> ... >>>>> >>>>> >>>>> It seems to happen in all lm actions, I debugged the resourceTypeAction >>>>> and the same problem can be seen. >>>>> I attached the result of >>>>> svn log . -v --xml >~/src/apache/forrest/trunk/lm.log.xml >>>>> >>>>> >>> >>>