-
1. Re: WML output - error messages during HTTP connections
jasonbrome Oct 3, 2002 12:47 PM (in response to vity)Vity,
All you need to do is configure your WML error pages within your Web App's web.xml deployment descriptor. These custom error pages are defined by specifying error-page elements - e.g. To specify a custom 404 page -
error404.jsp would contain the WML file-not-found error page. If you are serving both HTML and WML browsers, error404.jsp could determine the type of browser, and serve the appropriate error message content.
Sample web.xml snippet:
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
<servlet-name>myservlet</servlet-name>
<servlet-class>org.somebody.MyServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- Error pages -->
<error-page>
<error-code>404</error-code>
/error404.jsp
</error-page>
</web-app>