Using webclient to send request to jsp page

Discussion in 'ASP .Net' started by =?Utf-8?B?S2V2aW4=?=, Oct 14, 2005.

  1. I need to send a request to a jsp with data added to the http request header.
    I am using Webclient to send the request and I am putting the returned string
    (html) into a label on my aspx page but the returned html has a relative
    redirect that is not working. I have tried using the <base> tag with out
    success, also tried chaning the url in the <meta> tag to an absolute address
    and neither worked. I still get an 404 error for the redirected page because
    the url is relative to my application server not the jsp server.

    Any ideas how to solve this issue? Is there a better way to get the values I
    need into the http request header and call the jsp page?
    =?Utf-8?B?S2V2aW4=?=, Oct 14, 2005
    #1
    1. Advertising

  2. =?Utf-8?B?S2V2aW4=?=

    Joerg Jooss Guest

    Kevin wrote:

    > I need to send a request to a jsp with data added to the http request
    > header. I am using Webclient to send the request and I am putting
    > the returned string (html) into a label on my aspx page but the
    > returned html has a relative redirect that is not working. I have
    > tried using the <base> tag with out success, also tried chaning the
    > url in the <meta> tag to an absolute address and neither worked. I
    > still get an 404 error for the redirected page because the url is
    > relative to my application server not the jsp server.


    That violates the HTTP 1.1 spec. Location headers (which are used for
    redirects) *must* be absolute URIs.

    If that cannot be fixed on the server-side, you need to use
    HttpWebRequest, set AutoAllowDirect to false and handle the appropriate
    30x HTTP status yourself.


    Cheers,
    --
    http://www.joergjooss.de
    mailto:
    Joerg Jooss, Oct 14, 2005
    #2
    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. =?Utf-8?B?ZXN3YW5zb24=?=

    asp.net form to send a request to a put request

    =?Utf-8?B?ZXN3YW5zb24=?=, Oct 29, 2004, in forum: ASP .Net
    Replies:
    9
    Views:
    591
    =?Utf-8?B?ZWpz?=
    Nov 9, 2004
  2. =?Utf-8?B?S2V2aW4gQnVydG9u?=

    Pre-Send Request Headers, Pre-Send Request Content

    =?Utf-8?B?S2V2aW4gQnVydG9u?=, Dec 31, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,028
    =?Utf-8?B?S2V2aW4gQnVydG9u?=
    Dec 31, 2004
  3. Replies:
    3
    Views:
    4,091
  4. Venkat
    Replies:
    2
    Views:
    341
    Andrea Desole
    Feb 28, 2005
  5. Replies:
    0
    Views:
    4,325
Loading...

Share This Page