You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Gunter D'Hondt <gu...@sofico.be> on 2004/07/23 13:54:29 UTC
forward to another servlet (on another machine)
Hi,
I've got the following situation: if the user requests
http://webserver/getpdf/1 then I need to call a webservice on
http://appserver/pdfServlet?id=1. This webservice doesn't send XML back
but directly the PDF-document. I can ofcoz easily do this:
<map:match pattern="getpdf/*">
<map:redirect-to uri="http://appserver/pdfServlet?id={1}"/>
</map:match>
But this does a clientside redirect (which I don't want since the
appserver-machine won't be connected to the Internet). How can I solve
this in Cocoon (something like the forward method of plain servlets) ?
Any help is welcome!
Regards,
Gunter D'Hondt
SOFICO NV Belgium.
Re: forward to another servlet (on another machine)
Posted by Gunter D'Hondt <gu...@sofico.be>.
Andreas,
Yep that did it! Thnx!
PS: mime-type is "application/pdf"
Regards,
Gunter
Andreas Hartmann <an...@apache.org>
Sent by: news <ne...@sea.gmane.org>
23/07/2004 14:02
Please respond to
users@cocoon.apache.org
To
users@cocoon.apache.org
cc
Subject
Re: forward to another servlet (on another machine)
Gunter D'Hondt wrote:
> Hi,
>
> I've got the following situation: if the user requests
> http://webserver/getpdf/1 then I need to call a webservice on
> http://appserver/pdfServlet?id=1. This webservice doesn't send XML back
> but directly the PDF-document. I can ofcoz easily do this:
>
> <map:match pattern="getpdf/*">
> <map:redirect-to uri="http://appserver/pdfServlet?id={1}"/>
> </map:match>
>
> But this does a clientside redirect (which I don't want since the
> appserver-machine won't be connected to the Internet). How can I solve
> this in Cocoon (something like the forward method of plain servlets) ?
I think you can just read the PDF from your servlet:
<map:match pattern="getpdf/*">
<map:read mime-type="..." src="http://appserver/pdfServlet?id={1}"/>
</map:match>
(I don't know the PDF mime type at the moment)
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: forward to another servlet (on another machine)
Posted by Andreas Hartmann <an...@apache.org>.
Gunter D'Hondt wrote:
> Hi,
>
> I've got the following situation: if the user requests
> http://webserver/getpdf/1 then I need to call a webservice on
> http://appserver/pdfServlet?id=1. This webservice doesn't send XML back
> but directly the PDF-document. I can ofcoz easily do this:
>
> <map:match pattern="getpdf/*">
> <map:redirect-to uri="http://appserver/pdfServlet?id={1}"/>
> </map:match>
>
> But this does a clientside redirect (which I don't want since the
> appserver-machine won't be connected to the Internet). How can I solve
> this in Cocoon (something like the forward method of plain servlets) ?
I think you can just read the PDF from your servlet:
<map:match pattern="getpdf/*">
<map:read mime-type="..." src="http://appserver/pdfServlet?id={1}"/>
</map:match>
(I don't know the PDF mime type at the moment)
-- Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org