This blog entry talked about some great issues with session scoped struts forms. I found another one the hard way today:
When I added some properties to my session scope form in struts today, I modified my action to pass those properties to the business logic, recompiled, redeployed. But I ended up with:
StandardWrapperValve[action]: Servlet.service() for servlet action threw exception
java.lang.NoSuchMethodException: Unknown property 'foo'
I checked and rechecked things, but I still got the same error.
It turned out that because I was using a DynaBean for my ActionForm, combined with Tomcat 5's Restart Persistence. The old configuration for my form was still cached in the session. The solution was either delete $CATALINA_HOME/work/Catalina to remove the cached session or just logoff and login again.
Normally I love the fact that I don't need to re-login after restarting, but this was a pain.
<< Home