This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
A newbie Struts question: I have a data processing action, which can update, insert, or delete a record, and forwards to a "success page", which contains a message indicating what happenened (= different message based on the type of action). What solution would you suggest to display this message, which is coming from a ResourceBundle (3 entries, one for insert, one for update, one for delete) ? I was trying for one bean:message, but the only solution I came up with was using Java scriptlet...
Thanks in advance, and sorry if the answer is obvious
You can do the same for other types of messages by changing "errormsg" to something else. What I did for my current project was to have a fixed set of message types, defined those types as constants and put all the code to display in one JSP. That way, other developers simply had to include the one JSP in the appropriate place in their page. This made the display of messages consistent throughout the application and also made maintenance a breeze: if we needed to change something, we just changed the one JSP.