glassfish
  1. glassfish
  2. GLASSFISH-19066

A warning message is needed when error-page location file doesn't exist

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0_b54
    • Component/s: web_container
    • Labels:
      None

      Description

      When error-page location file doesn't exist, GF just displays a blank page without any warning message. This leads users to think that error-page mechanism is not working property when they have a typo in their web.xml.

      <error-page>
      <error-code>404</error-code>
      <location>/wrong_file_name.html</location>
      </error-page>

        Activity

        Hide
        Amy Roh added a comment -

        Fixed to display a warning message when error-page location file doesn't exist. Revision 55858

        Show
        Amy Roh added a comment - Fixed to display a warning message when error-page location file doesn't exist. Revision 55858
        Hide
        alejandro88 added a comment -

        Hi Amy,
        I use the web.xml to map error-page to a servlet and manage all the exception through that servlet:
        <servlet>
        <servlet-name>ErrorHandlerServlet</servlet-name>
        <servlet-class>org.ibt.gct3Reload.controller.ErrorHandlerServlet</servlet-class>
        </servlet>

        <servlet-mapping>
        <servlet-name>ErrorHandlerServlet</servlet-name>
        <url-pattern>/ErrorHandlerServlet</url-pattern>
        </servlet-mapping>

        <error-page>
        <exception-type>java.lang.Throwable</exception-type>
        <location>/ErrorHandlerServlet</location>
        </error-page>

        Now, as there is no ErrorHandlerServle page I get the warning, is there any way to avoid this warning? maybe it will be great if the validation is also at servlet scope.
        Thanks for your feedback

        Show
        alejandro88 added a comment - Hi Amy, I use the web.xml to map error-page to a servlet and manage all the exception through that servlet: <servlet> <servlet-name>ErrorHandlerServlet</servlet-name> <servlet-class>org.ibt.gct3Reload.controller.ErrorHandlerServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>ErrorHandlerServlet</servlet-name> <url-pattern>/ErrorHandlerServlet</url-pattern> </servlet-mapping> <error-page> <exception-type>java.lang.Throwable</exception-type> <location>/ErrorHandlerServlet</location> </error-page> Now, as there is no ErrorHandlerServle page I get the warning, is there any way to avoid this warning? maybe it will be great if the validation is also at servlet scope. Thanks for your feedback

          People

          • Assignee:
            Amy Roh
            Reporter:
            Amy Roh
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: