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. Advertisements

  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. Advertisements

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. Brian Birtle
    Replies:
    2
    Views:
    2,582
    John Saunders
    Oct 16, 2003
  2. =?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:
    804
    =?Utf-8?B?ZWpz?=
    Nov 9, 2004
  3. =?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,370
    =?Utf-8?B?S2V2aW4gQnVydG9u?=
    Dec 31, 2004
  4. Replies:
    3
    Views:
    4,359
  5. Kai Grossjohann
    Replies:
    2
    Views:
    914
    Anton Spaans
    Dec 8, 2003
  6. Quick Function

    jsp send parameter to next page

    Quick Function, Jul 15, 2004, in forum: Java
    Replies:
    1
    Views:
    4,244
    Tor Iver Wilhelmsen
    Jul 15, 2004
  7. Venkat
    Replies:
    2
    Views:
    397
    Andrea Desole
    Feb 28, 2005
  8. Replies:
    0
    Views:
    4,962
Loading...