Based from what I've researched, I've seen that tags such as <s:set>
, <s:push>
or by creating an <s:bean>
are able to insert references directly to the ActionContext
or ValueStack
. This confuses me a lot because why can't you just have one dedicated place to store everything? Probably just put everything in the ActionContext
since it's basically acts as a ServletContext
.
To make it even more confusing, if you wanted to access values in the ValueStack
, you'll have to use Struts tags such as <s:property>
but if the value's just stored in the ActionContext
, you just use the #value
prefix provided by OGNL.
Can someone please clear this up for me? When I used Spring, I believe everything that I needed (request, session, applicationContext) was inside the ServletContext
and to access these values on my webpage, I could just use the $
prefix to access anything within context.