Xavier MACHENAUD a écrit :
>
> Using C1, I can call a servlet passing parameters with an HTTP GET using
> the following code :
>
> <util:include-uri>
> <util:href>
> <xsp:expr>
> "http://<server>/<servlet-uri>?" +
> "techno=" + request.getParameter("techno") + "&" +
> "volt=" + request.getParameter("volt") + "&" +
> "arch=" + request.getParameter("arch") + "&" +
> "words=" + request.getParameter("words") + "&" +
> "bits=" + request.getParameter("bits") + "&"
> </xsp:expr>
> </util:href>
> </util:include-uri>
>
> I can then transform the returned XML data to present it to the user.
>
> But how can I do the same thing but passing parameters with an HTTP
> POST?
> I need this to be able to send a file to a servlet.
>
> Thanks.
>
> Xavier
>
The answer is unfortunately simple : you can't POST using
<util:include-uri> !
You'll have to write code that does the POST using a
java.net.HttpURLConnection and parse its result for inclusion into the
document.
--
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com
---------------------------------------------------------------------
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]>