It would be a GET method. If you want to post to a new site and
display the result to the user, you would probably need to render a
form that is submitted to the new site and then force the form to post
on load.
The other alternative, is to post it yourself on the back end using
HttpUrlConnection and then simply stream the output to the browser.
Note that this can be tricky with relative links in the page as well
as cookies (so that will not be an easy solution).
On 9/27/06, legolas wood <[EMAIL PROTECTED]> wrote:
Will that method (redirect and return null) post to that URL ?
the web site that i should pass the parameters just works with POST
method and no other mechanism.
thanks
Andrew Robinson wrote:
> Do you want to send him/her to that page or do you want to just post
> data and "ignore" the response from that website?
>
> If you want to send them, create a navigation rule with the full URL
> (if it is static) with a "redirect" set. Then return that action
> result.
>
> If you want to send them but the URL is dynamic:
> 1) create a custom navigation handler that performs a redirect
> -or-
> 2) redirect and return null:
>
> public String myAction()
> {
> // your business code
>
> FacesContext facesContext = FacesContext.getCurrentInstance();
> facesContext.getExternalContext().redirect(someURL);
> facesContext.responseComplete();
> return null;
> }
>
> On 9/26/06, Legolas Woodland <[EMAIL PROTECTED]> wrote:
>> Thank you for reply.
>> what about sending them from server side ?
>> if i send user to that url from serverside i can make my database change
>> and then send him/her to other web site.
>> can i have an action for outputlink and also send the user to other web
>> site?
>> for example in action binding i made database change and when he/she
>> clicked on it i post the parameter to that website?
>>
>> thanks
>>
>> Andrew Robinson wrote:
>> > Do you want to post from the client or the server? If from the client,
>> > just use the "normal" method. You can use h:outputLink with embedded
>> > f:param elements.
>> >
>> > On 9/26/06, Legolas Woodland <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Hi
>> >> Thank you for reading my post
>> >> I need to use post method to send some parameters to a web site,
>> >> now , in my web application which is based on jsf , i do not know
>> >> how i can
>> >> do this as parameters has their name and also i should compute their
>> >> values
>> >> before i post them to other web site.
>> >>
>> >> should we do this in button action method or there are some other
>> ways?
>> >> thanks
>> >>
>> >
>>
>>
>