Simulate post method in a servlet

Discussion in 'Java' started by delph, May 13, 2005.

  1. delph

    delph Guest

    Hello,

    I have a JSP with a form. The action of the form is a servlet. in my
    method doPost of my servlet, i want to redirect the client to a file
    ..fcc with the post data of my JSP. How can i do that? (i tried with
    httpurlconnection, i have the good post data but but my client is not
    redirect).

    Thanks,

    Delphine
     
    delph, May 13, 2005
    #1
    1. Advertising

  2. delph

    enrique Guest

    At the doPost method, you can do either a forward or a redirect, and do
    one of a couple of things to maintain the post data:

    * use querystring params, or
    * store session-scope data, if you can access the data server-side by
    the time the fcc is sent to the client ( I don't know what an FCC is )

    I hope that helps.
     
    enrique, May 13, 2005
    #2
    1. Advertising

  3. delph

    delph Guest

    Thanks for your reply.

    A fcc file is a file that contains directives used when executing a
    post operation on the fcc file. the directives are in the post data of
    a http request, so i can't use the querystring params. this type of
    file is used by SiteMinder.

    how do you store session-scope data?
     
    delph, May 13, 2005
    #3
  4. Use forward. The information in the request will be retained, and the
    request will be sent to a new page. The disavantages are that the
    destination page must be in your application, and you will not see the
    destination url in the browser.
    If that is not good for you, you can only build a new request copying
    all the parameters from the old request, which can be a bit annoying.

    delph wrote:
    > Hello,
    >
    > I have a JSP with a form. The action of the form is a servlet. in my
    > method doPost of my servlet, i want to redirect the client to a file
    > .fcc with the post data of my JSP. How can i do that? (i tried with
    > httpurlconnection, i have the good post data but but my client is not
    > redirect).
    >
    > Thanks,
    >
    > Delphine
    >
     
    Andrea Desole, May 13, 2005
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Al Cadalzo

    How to simulate a form post?

    Al Cadalzo, Feb 17, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    7,556
    Al Cadalzo
    Feb 17, 2004
  2. Sean Clarke
    Replies:
    1
    Views:
    1,900
    Sudsy
    Jan 7, 2004
  3. circuit_breaker
    Replies:
    2
    Views:
    2,014
    Jack Jia
    Apr 4, 2004
  4. Mitch
    Replies:
    2
    Views:
    555
    Mitch
    Mar 13, 2006
  5. dast

    Simulate post at webpage

    dast, Sep 15, 2005, in forum: C++
    Replies:
    2
    Views:
    322
    =?ISO-8859-1?Q?Stefan_N=E4we?=
    Sep 15, 2005
Loading...

Share This Page