Redirecting a http POST request, without loosing data?

Discussion in 'Java' started by basic, Jan 26, 2005.

  1. basic

    basic Guest

    I have a web service that has moved to another server, but clients
    still use the old server.
    What i need to do is simply redirect their requests to the new server,
    and keep all data in the redirect process. simple http redirect looses
    data, and the servlet dispatcher mechanism works only for redirecting
    to local resources.
    Is there anything i can do to redirect the request?

    Here is the POST request:

    POST http://oldserver/service HTTP/1.1
    Host: xxx.xxx.xxx.xxx
    Proxy-Connection: Keep-Alive
    Connection: TE
    TE: trailers, deflate, gzip, compress
    User-Agent: RPT-HTTPClient/0.3-3
    SOAPAction: ""
    Accept-Encoding: gzip, x-gzip, compress, x-compress
    Content-type: text/xml; charset=utf-8
    Content-length: 606

    <?xml version = '1.0' encoding = 'UTF-8'?>
    <SOAP_XML>...</SOAP_XML>

    Thanks!
    basic, Jan 26, 2005
    #1
    1. Advertising

  2. basic

    Steve Sobol Guest

    basic wrote:
    > I have a web service that has moved to another server, but clients
    > still use the old server.
    > What i need to do is simply redirect their requests to the new server,
    > and keep all data in the redirect process. simple http redirect looses
    > data, and the servlet dispatcher mechanism works only for redirecting
    > to local resources.


    Have you considered JSP's "forward" functionality?

    --
    JustThe.net - Apple Valley, CA - http://JustThe.net/ - 888.480.4NET (4638)
    Steven J. Sobol, Geek In Charge / / PGP: 0xE3AE35ED

    "In case anyone was wondering, that big glowing globe above the Victor
    Valley is the sun." -Victorville _Daily Press_ on the unusually large
    amount of rain the Southland has gotten this winter (January 12th, 2005)
    Steve Sobol, Jan 26, 2005
    #2
    1. Advertising

  3. basic

    basic Guest

    On Wed, 26 Jan 2005 13:04:40 -0800, Steve Sobol <>
    wrote:

    >basic wrote:
    >> I have a web service that has moved to another server, but clients
    >> still use the old server.
    >> What i need to do is simply redirect their requests to the new server,
    >> and keep all data in the redirect process. simple http redirect looses
    >> data, and the servlet dispatcher mechanism works only for redirecting
    >> to local resources.

    >
    >Have you considered JSP's "forward" functionality?


    This functionality emulates servlet's dispatcher mechanism, which
    means that it can only forward to local servlets and jsps, and not to
    any outside url.
    basic, Jan 26, 2005
    #3
  4. basic

    Wendy S Guest

    > I have a web service that has moved to another server, but clients
    > still use the old server.
    > What i need to do is simply redirect their requests to the new server,
    > and keep all data in the redirect process. simple http redirect looses
    > data, and the servlet dispatcher mechanism works only for redirecting
    > to local resources.
    > Is there anything i can do to redirect the request?


    Not a redirect, that tells the client to make a new request to the URL you
    provide. (Unless you can get all the data into the URL as request
    parameters.)

    You could sit in the middle as proxy. You've got all the data, so you POST
    it to the new server, receive the response, and hand the response back to
    the client. On the old server, replace the web service with a Servlet that
    handles this. (I'd also keep a log of who's still using the old server, and
    work towards converting them.

    --
    Wendy S
    Wendy S, Jan 27, 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. arc

    Redirecting HTTP request

    arc, Feb 2, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    461
    Joerg Jooss
    Feb 2, 2005
  2. Replies:
    6
    Views:
    4,839
    Tor Iver Wilhelmsen
    Aug 29, 2005
  3. James
    Replies:
    3
    Views:
    16,323
    Roedy Green
    Nov 25, 2005
  4. arc

    Redirecting HTTP request

    arc, Feb 2, 2005, in forum: ASP .Net Security
    Replies:
    1
    Views:
    129
    Joerg Jooss
    Feb 2, 2005
  5. ChrisM

    ASP post loosing the data

    ChrisM, Sep 26, 2005, in forum: ASP General
    Replies:
    3
    Views:
    111
Loading...

Share This Page