HttpServletResponse.sendError

M

Mike Landis

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,
 
D

Dave Miller

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top