Hi,

On Tue, Nov 15, 2011 at 8:45 PM, Alberto <[email protected]> wrote:
>
> Hi,
>  I have to call an external url (a rest web service) from onSubmit of a
> form.
> I found this solution:
>
> |throw new RedirectToUrlException(
>    "http://www.facebook.com/login.php?api_key="+ _apiKey + "&v=1.0",
>    HttpServletResponse.SC_MOVED_PERMANENTLY);
>
>
> but it is just a redirect and I cannot post form data and set the accept 
> header. The web service return different type of data (csv, xml, html, json) 
> depending on the accept header.
>
> How can I handle that?

Use Apache HttpClient or pure UrlConnection instead.

>
> Best regards
>
> Alberto
> |
>
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to