This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We have a mature application running struts 1.2 and velocity and I need to covert a page from a vm to a jsp.
So I modified my struts-config to change the forward to a new JSP file and in the JSP I try to display some data assigned to the form bean but all the form properties show empty in the JSP. When I look at the form itself I see that they are different objects. So somehow the form bean I used in my Action is not the same one that the JSP sees.
The "id" attribute is the instance name of the bean--if you aren't explicitly putting in to scope under that name (no way to tell if you are or not) then it's going to create a new instance of the form bean.
BTW, I recommend against using non-canonical taglib prefixes ("h" and "b" in your case), I can't even figure out why "h" would be chosen for XML tags. It also seems like you're using two different JSTL versions based on the core and XML taglib URIs--it might work, but it strikes me as risky.
Joined: Feb 22, 2004
How do I specify that "schedule" is the form ID? In the action somewhere?