Hello:
  "Just seems to be correct",but in fact, the webserver can't find the file 
E:\tomcat\webapps\cocoon\docs\samples\jsp\hello.jsp?test=abc,
the webserver treat the "E:\tomcat\webapps\cocoon\docs\samples\jsp\hello.jsp?test=abc" 
as file name, 
but not "E:\tomcat\webapps\cocoon\docs\samples\jsp\hello.jsp".


        Best regards.
        Bob Wang.

-----邮件原件-----
发件人: KOZLOV Roman [mailto:[EMAIL PROTECTED]] 
发送时间: 2002年3月22日 14:38
收件人: [EMAIL PROTECTED]
主题: Re: How to use the pattern


Hello,

    If you use "wildcard" matcher then you have to know that its pattern is matched to 
URL WITHOUT query string, i.e. URL part before "?" sign. Query string is passed in 
request object to your generator's src. So in your first example {1} is 
"jsp/hello.htm" and {2} is EMPTY.

    Your second example seems to be correct if you have removed first one from your 
sitemap or just put second one before the first, because "jsp/hello_abc.htm" matches 
to "jsp/*.htm*".

    Best regards.
        Roman

Íõºì±¦ wrote:

> Dear All:
>   when I use the cocoon, I config the xmap file like follows:
>
>  <map:match pattern="jsp/*.htm*">
>     <map:generate type="jsp" src="/docs/samples/jsp/{1}.jsp{2}"/>
>     <map:transform src="docs/samples/jsp/{1}.xsl"/>
>     <map:serialize type="html"/>
>    </map:match>
>
> I request the url http://localhost:8080/cocoon/jsp/hello.htm?test=abc
> the page http://localhost:8080/cocoon/jsp/hello.jsp?test=abc works 
> well.
>
> but I don't want the user feel this is a active page, so I change the 
> xmap to the follows:
>
>  <map:match pattern="jsp/*_*.htm">
>     <map:generate type="jsp" src="/docs/samples/jsp/{1}.jsp?test={2}"/>
>     <map:transform src="docs/samples/jsp/{1}.xsl"/>
>     <map:serialize type="html"/>
>    </map:match>
>
> but the webserver throw FileNotFound Exception.
>
> FileUtil: in safePath(E:\tomcat\webapps\cocoon, 
> /docs/samples/jsp/hello. jsp?test =abc),
> realPath=E:\tomcat\webapps\cocoon\docs\samples\jsp\hello.jsp?test=abc
> java.io.IOException: ϵͳÕÒ²»µ½Ö¸¶¨µÄ·¾¶¡£
>
> I want to know how to implement this.
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the 
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question has not already been answered in the FAQ before 
posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to