struts2: avoiding hardcode in struts tags, jsp
When using struts2 I can access my session attributes inside struts2 tags using OGNL expression like this:

    #session['object_key']

The problem is that I use this expression on different pages, every time hardcoding that 'object_key' string. Is there any way I can use a named constant, so that I can easily change the key used to store my object in session map?
struts2: avoiding hardcode in struts tags, jsp
===

When using struts2 I can access my session attributes inside struts2 tags using OGNL expression like this:

    #session['object_key']

The problem is that I use this expression on different pages, every time hardcoding that 'object_key' string. Is there any way I can use a named constant, so that I can easily change the key used to store my object in session map?