1 Reply Latest reply on Oct 3, 2002 12:47 PM by Jason Brome

    WML output - error messages during HTTP connections

    vity Newbie

      Hello,
      I would like to know how to set up Jboss for this: WML output error messages during HTTP connections(eg. #404 - File not found)
      I use Java servlet.

      Thanks for help

      Vity
      (beginner)

        • 1. Re: WML output - error messages during HTTP connections
          Jason Brome Newbie

          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>