Monthly Archives: December 2012

How To Save Struts Messages After a Redirect

If you’ve got an Action in Struts 1 that leaves an error or message for the view, it does it somewhere in the class like this: ActionMessages messages = getMessages(request); messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(“message.detail”, “Normality has been restored.”)); saveMessages(request, messages); However if your Action later selects an ActionForward that redirects (possibly unbeknownst to the Action, since […]

WARNING: Form ‘myForm’ not found for locale ‘en_US’

It looks like someone had this error in 2006, and it was never resolved. I am posting this, hoping that in 2018 someone will have the same issue again, and the wisdom of the ancients will not fail him. Dec 10, 2012 1:41:05 AM org.apache.commons.validator.ValidatorResources getForm WARNING: Form ‘myFormBean’ not found for locale ‘en_US’ In […]

Getting the last element in an array in JSF and JSTL

I’d love it if JSTL had some sort of way to get the last element in an array. Ruby conveniently makes negative indexes start from the end of the array: myarray[-1] For some reason, lists and arrays in Java have “.length” and “.size()” accessors, instead of either getLength() or getSize(), and there isn’t a convenience […]

Selecting Rows from the Last 5 Years in SAS

I was asked recently in a Q&A, “how to select the last 5 years worth of data from a table in SAS?” One way of doing it is by selecting the data with a Proc SQL query similar to the following, and something similar could also be done in a data step: PROC SQL; create […]

Two Common Struts Null Pointer Exceptions

The First Problem I have come across this problem at 2 times this weekend. Since I came across it twice, I assume a high likelihood that others will as well. Hopefully the people of the future will be able to Google the stack trace and find this post. The problem is that after mucking around […]