cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SAXESS - Hussayn Dabbous <dabb...@saxess.com>
Subject Re: matcher of a request
Date Thu, 06 Feb 2003 11:36:25 GMT
You can make this even more generic:

<map:match pattern="*.jsp">
   <map:act type="request">
      <map:generate type="file"
       src="http://anotherhost:8080/anotherApp{../1}.jsp{requestQuery}"
       mime-type="text/xml"/>
      <map:transform src="stylesheets/{../1}.xsl"/>
      <map:serialize type="xhtml"/>
    </map:act>
</map:match>

This will simply copy the GET-parameters from your original request ;-)
and i think it's slightly more performant ...
regards, Hussayn

Nesto wrote:
> Thank you Jan for your help!!
> Finally I wrote a matcher that works fine!
> I post it to the group because it could be interesting.
>  
> I wanted to write a matcher for an URI of this type:
> http://myhost.com:8080/cocoon/myApp/list.jsp?user=tom&password=tom 
> <http://myhost.com:8080/cocoon/myApp/list.jsp?user=tom&password=tom>
>  
> The matcher is:
> 
> <map:match pattern="*.jsp">
>   <map:act type="request">
>      <map:parameter name="parameters" value="true" />
>      <map:generate type="file" 
> src="http://anotherhost:8080/anotherApp{../1}.jsp?username={username}&amp;password={password}"

> mime-type="text/xml"/>
>      <map:transform src="stylesheets/{../1}.xsl"/>
>      <map:serialize type="xhtml"/>
>    </map:act>
> </map:match>
> 
> Hope this helps someone else!
> 
> Nesto!
> 
>  
> 
>     ----- Original Message -----
>     *From:* Jan Harms <mailto:jan.harms@vivai.de>
>     *To:* cocoon-users@xml.apache.org <mailto:cocoon-users@xml.apache.org>
>     *Sent:* Wednesday, February 05, 2003 3:29 PM
>     *Subject:* AW: matcher of a request
> 
>     Nesto,
>      
>     I´m not sure if this works, but try
>      
>     </map:match>
>        <map:match pattern="*.jsp">
>        <map:generate type="file"
>     src="http://anotherHost:8080/theApp/{1}.jsp?user={request:user}&password={request:password}
>     <http://anotherHost:8080/theApp/{1}.jsp?user={request:user}&password={request:password}>"
>     />
>        <map:transform src="{1}.xsl"/>
>        <map:serialize type="xhtml"/>
>     </map:match>
>      
>     The {request:yourparam} parts are so called input-modules. See:
>      
>     http://xml.apache.org/cocoon/userdocs/concepts/modules.html
>      
>     Be careful with the generator type you choose. The JSP generator
>     expects the location of a JSP-File. You are calling a jsp from
>     another server, that means you have to use a generator that matches
>     the *output* of this jsp. I.e if the jsp produces HTML you need the
>     HTML-generator. In your case you need the file-generator since the
>     jsp produces XML.
>      
>     Hope this helps,
>      
>     -Jan Harms
> 

-- 
Dr. Hussayn Dabbous
SAXESS Software Design GmbH
Neuenhöfer Allee 125
50935 Köln
Telefon: +49-221-56011-0
Fax:     +49-221-56011-20
E-Mail:  dabbous@saxess.com


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

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message