This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes use of ..." title="" /> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "use of "scope" attribute in <action-mappings> ..." Watch "use of "scope" attribute in <action-mappings> ..." New topic
Author

use of "scope" attribute in <action-mappings> ...

Bhavesh Sangwan
Ranch Hand

Joined: Aug 08, 2012
Posts: 57
Dear All,
I'm doing struts validation using validate() method. that ok no prob....

But I'm trying to understand the use of "score" attribute in action-mappings tag...

Actually according to me ... it would be adding all ActionForm elements in session scope as session attribute. But when I try to print session attribute on my JSP, it prints 'null' .
The code is as follows...

struts-config.xml


My JSP

So what's the use of scope="session"....
And also tell me from where <bean:write property="xyz"> are getting their values.....

Please help me experts...


Ayan mallick
Ranch Hand

Joined: Nov 17, 2012
Posts: 45


looking at the code when we are accessing property value then first we are giving form name then the property name. so my understanding is it's first accessing the form instance from session then accessing particular property value.

You could try once with




Bhavesh Sangwan
Ranch Hand

Joined: Aug 08, 2012
Posts: 57
Yahooooooooooooo It's working............



Thanks a lot....!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: use of "scope" attribute in <action-mappings> ...