• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

OGNL session & http header

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know how to get sessions with OGNL <s:property value="#session.myValue"/>

Is there any way to set a session value and header value?

I am assuming to set a session value you would use something like this.
<s:set name="sessionName" value="SessionValue" scope="session" />

This could then be retrieve that value in any page during a session with a scriptlet something like this:
<%
out.print( (String)session.getAttribute("sessionName") );
<%


Assuming this is correct is there something similar I could use in OGNL to say set response headers similar to:
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setDateHeader("Expires", -1);

Thanks,
Earl

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic