jQuery in Action, 3rd edition
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "use of "scope" attribute in <action-mappings> ..." Watch "use of "scope" attribute in <action-mappings> ..." New topic

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...



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: 46

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> ...
It's not a secret anymore!