what is the difference between scope and toScope attributes in Bean define tag in struts ?
The books says: scope : Specifies the variable scope searched to retrieve the bean specified by name. If not specified, the default rules applied by PageContext.findAttribute() are applied.
toScope : Specifies the variable scope into which the newly defined bean will be created. If not specified, the bean will be created in page scope.
But the same is not clear to me. can anyone explain the same?
Let's say in your Action class you had the following line:
This gives you a request scoped variable with the name "AnswerToLife" and a value of 42. Then in your JSP, you have the following statement: This creates a new variable in session scope named UlitmateAnswer that takes as its value the value of the request scoped variable AnswerToLife. [ November 16, 2007: Message edited by: Merrill Higginson ]