Strutsrequestwrapper source//Core code: public class Strutsrequestwrapper extends Httpservletrequestwrapper {/** * Note the following comment : Get object, if not found, go to valuestack inside to find * Gets the object, looking in the value of the stack if not found * * @param s the att Ribute Key */public Object getattribute (String s) {if (s! = null && s.startswith ("Javax.servlet")) {return Super.getattribute (s); } Actioncontext CTX = Actioncontext.getcontext ();//* * * * * * Call the parent class's GetAttribute () method to get the properties in the request scope * * * * obje CT attribute = Super.getattribute (s); if (CTX! = null) {if (attribute = = null) {Boolean alreadyin = false; Boolean B = (Boolean) ctx.get ("__requestwrapper.getattribute"); if (b! = null) {Alreadyin = B.booleanvalue (); } if (!alreadyin && s.indexof ("#") = = =-1) {try {//* * * * * * * * * * If not found in request, go to Valu Estack Find * * * * * If not found, then try the Valuestack ctx.put ("__requestwrapper.getattribute", Boolean.true); Valuestack stack = Ctx.getvaluestack (); if (stack! = null) {//* * * * Call Findvalue () method, find in Valuestack [first from the object stack (Value stack Contents), if not found, go to the map stack (stack Context) to find] attribute = Stack.findvalue (s); }} finally {Ctx.put ("__requestwrapper.getattribute", Boolean.false); }}}} return attribute; }} So: Using the El expression in a JSP page also gives you access to the contents of the Valuestack inside the Struts2: page-to---valuestack.findvalue () Session--Application
STRUTS2 Source Analysis (i) 111 Strutsrequestwrapper