El mar, 18-07-2006 a las 17:17 +0200, Cyriaque Dupoirieux escribió:
> 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
> > [EMAIL PROTECTED]:~/src/apache/forrest/trunk/main$ ./build.sh clean
> > [EMAIL PROTECTED]:~/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
To clarify, requesting "jeux/ultima2.html" should use
"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.
What is the whole error?
>
> 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.
This is the sourceType action.
>
> 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
>
Ok, we are requesting jeux/ultima2.html. Right?
> 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]
The primary structurer for the request would have been
"jeux/ultima2.fv". This file does not exist and the calculation of the
"RecursiveDirectoryTraversalAction" found D:\duc
\viewSitePerso/src/documentation/resources/structurer/url/pelt.fv as
responsible structurer.
Looks good.
> 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
This is the where the request <parameter value="{1} or {../1}"
name="request"/> does not get resolved.
Why is this request made anyway. We already found the right location. Or
is it a different one?
> 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]
>
fallback
> 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".
>
hmm, what does
http://localhost:8888/jeux/ultima2/mondes/mapx21.title.xml return?
> So here, we can see that there is a problem with the uri of the second
> file which is jeux/ultima2/mondes/mapx21.xml
The main question that is raising in my head is: do you use
jeux/ultima2/mondes/mapx21.xml from within jeux/ultima2.fv? If so can I
see the definition?
>
> 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
This is the where the request <parameter value="{1}" name="request"/>
does not get resolved.
> 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]
Fallback.
> 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]
>
The primary structurer for the request would have been
"jeux/ultima2/mondes/mapx21.fv". This file does not exist and the
calculation of the "RecursiveDirectoryTraversalAction" found D:\duc
\viewSitePerso/src/documentation/resources/structurer/url/jeux/ultima2/mondes/pelt.fv
as responsible structurer.
Looks good.
> And now there is a problem with the uri of the first file which is
> jeux/ultima2.xml
Yeah, I see. Is this one and the same request? Can you specify what you
are requesting for each log?
> 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
>
That is not the problem but I do not understand the requests. Why
(Unknown-URI)? Can you change it to the request like (/search.html)? It
looks like there is difference in dispatching the files.
Very weird.
We need to find the difference.
salu2
--
thorsten
"Together we stand, divided we fall!"
Hey you (Pink Floyd)