alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Struts example source code file (ognl_0.jsp)

This example Struts source code file (ognl_0.jsp) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Struts tags/keywords

do, http, http, in, in, jsp, map, ognl, ognl, pragma, references, the, the, to

The Struts ognl_0.jsp source code

<%
    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
%>
<p>
    <b>Accessing properties
</p>
<p>
    The framework uses a standard naming context to evaluate OGNL expressions. 
    The top level object dealing with OGNL is a Map (usually referred as a context map or context).
    OGNL has a notion of there being a root (or default) object within the context. 
    In OGNL expressions, the properties of the root object can be referenced without any special "marker" notion.
    References to other objects are marked with a pound sign (#).
    
    In this example (and in your JSP pages) the last action executed will be on the top of the stack. 
</p>
<p>    
    <a href="#" onclick="selectClassSrcTab()">This action is available on the third tab above. 
    To access the <i>name field type:
</p>
<p>
    <i id="example">
        name
    </i>
</p>
<p>
    on the OGNL console and hit enter. <a href="#" onclick="execOgnl()">Do it for me
</p>

Other Struts examples (source code examples)

Here is a short list of links related to this Struts ognl_0.jsp source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.