• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Bhavesh Sangwan
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


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
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yahooooooooooooo It's working............



Thanks a lot....!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic