facebook

Struts quickstart doesn’t show how to display error on login

  1. MyEclipse Archived
  2.  > 
  3. Documentation
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #266665 Reply

    jayne
    Member

    Just a minor problem. I’m using Struts Quickstart Last Revision: August 6, 2006

    I’ve done the Struts quickstart which is great and works well. The Demo states at point 5.2 ‘Building the Application’

    As with most Struts apps, if something goes wrong during the login, we will send the user back to the userLogin.jsp page and display an error (which is why we don’t need to make a loginUserFailure.jsp page).

    However the quickstart doesn’t demonstrate or provide the code to display an error. It only returns me to the userLogin.jsp. I would like to see the code which passes an ActionMessage or ActionError (or whatever it does to show the error).

    Thanks.

    #266720 Reply

    Riyad Kalla
    Member

    Sorry for the omission Jayne,
    You will want to call “save” on an ActionMessages instance that contains 1 or more ActionMessage with the message key from your ApplicationResource.properties file that you can then use the tag bean:message to display in your JSP page.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Struts quickstart doesn’t show how to display error on login

You must be logged in to post in the forum log in