HttpServletResponse.sendError

Discussion in 'Java' started by Mike Landis, Aug 8, 2003.

  1. Mike Landis

    Mike Landis Guest

    Hello,

    Does HttpServletResponse.sendError allways return HTML to client?
    I have a third part vendor's MVC framework that uses
    HttpServletResponse.sendError when an exception occurs. If I have
    browser client everytgunh is ok.
    When I have a WAP client it seems to be so that
    HttpServletResponse.sendError
    is not suitable because it does not return WML/UTF-8 and does not use
    error-page tags defined in Web.xml file.

    Are there any other ways to invoke errorpage defined to web.xml than
    HttpServletResponse.sendError when exception occurs?
    RequestDispatcher's forward is not good because it needs programming
    and I liked to use container's
    automatic errorpage calling mechanism.

    Best regards,
     
    Mike Landis, Aug 8, 2003
    #1
    1. Advertising

  2. Mike Landis

    Dave Miller Guest

    In article <>,
    says...
    > Hello,
    >
    > Does HttpServletResponse.sendError allways return HTML to client?
    > I have a third part vendor's MVC framework that uses
    > HttpServletResponse.sendError when an exception occurs. If I have
    > browser client everytgunh is ok.
    > When I have a WAP client it seems to be so that
    > HttpServletResponse.sendError
    > is not suitable because it does not return WML/UTF-8 and does not use
    > error-page tags defined in Web.xml file.
    >
    > Are there any other ways to invoke errorpage defined to web.xml than
    > HttpServletResponse.sendError when exception occurs?
    > RequestDispatcher's forward is not good because it needs programming
    > and I liked to use container's
    > automatic errorpage calling mechanism.
    >
    > Best regards,
    >

    It sends an int for the error code and a String for the message (not
    html). If you need the String in UTF-8, run it through URLEncoder first
    and you should be OK.

    DM
     
    Dave Miller, Aug 9, 2003
    #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. Joerg Mueller-Tolk
    Replies:
    2
    Views:
    1,036
    Joerg Mueller-Tolk
    Dec 3, 2003
  2. Naresh Agarwal
    Replies:
    0
    Views:
    428
    Naresh Agarwal
    May 28, 2004
  3. Naresh Agarwal
    Replies:
    1
    Views:
    1,091
    ExGuardianReader
    May 29, 2004
  4. Tim
    Replies:
    0
    Views:
    649
  5. HttpServletResponse

    , Dec 8, 2004, in forum: Java
    Replies:
    2
    Views:
    489
    Steve Sobol
    Dec 8, 2004
Loading...

Share This Page