Discussions

Web tier: servlets, JSP, Web frameworks: Displaying appropriate error page in Web application.

  1. Hi All,

    While desiging any Web based application number of times I faced a challenge in designing a framework for displaying error message to the end user.

    The requirements typically vary like -
    1. Any business error should be shown in the top of the same page where from user sent the original request.
    2. An error like stale request should take the user to some main menu.
    3. Invalid session should take the user at the login screen.
    4. A business error should always take the user to a specific screen where from user should be able to come back to the original screen.
    And many more like this.

    Could anyone please let me know whether there exists any design pattern for solving this design issue ?

    Thanks in advance.

    Regards,
    Sourav
  2. Check out the J2EE blueprints for PetStore.
    Their design takes care of all these.

    http://java.sun.com/blueprints/code/