File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Android Security Essentials Live Lessons this week in the Android 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: 44


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> ...
 
Similar Threads
struts action
Cannot retrieve definition for form bean StudentBean on action /studentList?listAction=acceptRejectU
org.apache.jasper.JasperException
Not sure why I am not able to insert my data
struts action will not generate