<% request.setAttribute("decorator", "none"); response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server %>

Print property value, using the property tag

On the OGNL demo you learned how to access values from the Value Stack using OGNL expressions. The property tag is used to print to the page the result of an OGNL expression. The expression is specified in the value attribute.

To print the value of the expression name to the page type:

<s:property value="name" />

on the JSP console and hit enter. Do it for me

As you saw in the OGNL demo, to print a property of an object that is not on top of the stack, use the #object.property notation.

To print the value for the key "struts.view_uri" in request to the page type:

<s:property value="#request['struts.view_uri']" />

on the JSP console and hit enter. Do it for me

Print property value, using the $ operator

Use the ${name} notation to print values from the Value Stack to the page.

To print the value of the expression name to the page type:

${name}

on the JSP console and hit enter. Do it for me

[More details]