Mete Kural

Greenhorn
+ Follow
since Aug 28, 2003
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Mete Kural

I'm happy for you that you were able to fix it. That problem took some of my time too.
>How did you manually set another bean in the request scope with the same name as the name you gave to your form-bean in struts-config.xml? Could you please paste the code for that portion here?
request.setAttribute("registrationForm" registerationBean);
where "registrationForm" is the same as the name property of the form-bean element.
-Mete
20 years ago
Hi Bruce,
By default form bean, I mean the form bean that I specified for that action-mapping in struts-config.xml by setting the name property of the action mapping element to point to the form-bean that I specified under form-beans in struts-config.xml. What I realized was that in my action class I was manually setting another bean in the request scope with the same name as the name I gave to my form-bean in struts-config.xml. So my form bean specified in struts-config was being overwritten by the other bean that I set in the request scope in my action class. For that reason, any changes that I made to my bean specified in struts-config was not being reflected to my JSP page. That is why when I was trying to access new bean properties that I have added in my JSP page I was getting no getter errors, since those new properties are not reflected to the JSP page. I suggest that you check your action classes to make sure you are not overwriting your bean with another bean before it gets to the JSP page.
Please don't hesitate to ask more questions.
May God help you,
Mete
20 years ago
Hello again,
Figured out why my problem occurs. It's because somewhere down the line in the request handling, I overwrite the default form bean that is specified in struts-config.xml by another bean that I save in the request scope under the same attribute name, therefore any changes that I made to struts-config.xml did not affect the bean that was in the request scope during the JSP processing. Changing the name of the form bean fixed the problem because the bean that I was saving to the request scope was no more overwriting the default form bean that is specified in struts-config.xml. I had been pondering over this problem over several weeks. Thank God now it is completely resolved.
-Mete
20 years ago
Thank God I could fix the problem by changing the name of the form bean. For some reason the older version of the form bean was getting cached somewhere in the application (I don't know how that could possibly happen, I have no explanations). When I changed the form bean's name, I could add new properties and the jsp page found the getters for those properties. So now it works. I hope this may be helpful for any other who may be having the same problem.
All praise be to God!
Mete
20 years ago
Hello,
I have the same exact problem now and I was wondering if any of you ever got around to fixing that problem. Do you have any suggestions on what is the source of the problem?
Thanks much,
Mete
20 years ago