You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by amolk <am...@mailjol.com> on 2002/08/20 07:58:15 UTC

separating status messages and error messages-Getting the design right.

Hi all,
I have just shifted from servlets to jsp + struts. I am still new to both.
I have to create some jsp pages corresponding to some user actions.
For example, the application administrator can click on add user link ( from left band menu which is in a separete frame ) and will be presented with a form which he can fill can click on add to add the user. On submit, the corresponding action class's perform is invoked and the same page has to be shown back to the user, this time, with a status message saying "user added successfully. Add another?" If the operation fails, an appropriate message is displayed using the <html:errors/>
My problem is the following:
Where do i handle these status messages? Each page is viewed by the user in two different scenarios. 1. When the user wishes to perform some task. This time, there is no status, error message to be shown. Just the jsp page, directly.
2. After the user fill out the form and submits it. The same form reappears with the appropriate status or error message.
Should i be mixing status and error messages? In that case, how do i handle different headers and footers for the two?
Or should i be using some custom tags?
Hve been trying out custom tags but since am still new to all this, ( jsp as well as struts. have been using only servlets till now!!! ) am not able to take design design decisions based on custom libraries, and stuff.
I would go for a design where maximum html code is present in the jsp file itself so that my page designers can freely modify/manage it.
Any suggestions? I am not using tiles or anything else. Too many new things to handle @ a time, specially since i am new to jsp itself!!


thnx in advance,
amol