![]() |
VOOZH | about |
The Struts 2 OGNL determines that the data on the ValueStack may be referenced and altered using the powerful expression language known as the Object-Graph Navigation Language (OGNL). Additionally, OGNL facilitates type conversion and data transmission. The JSP Expression Language and the OGNL are quite similar. The foundation of OGNL is the notion of a root or default object in the context. The pound sign, or markup notation, can be used to access the attributes of the default or root object.
<s:property value="propertyName"/>Examining the subsequent action class, we are gaining access to valueStack and subsequently assigning a few keys that we will retrieve using OGNL in our view, which is the JSP page.
In the WebContent folder of your Eclipse project, create the HelloWorld.jsp JavaScript file below. If the action is successful, this view will be shown.
This XML file specifies an interceptor called jsonValidatorWorkflowStack and an additional result called input.
To test JstlView, we are generating a JSP file.
After clicking on "Click here", we will see the list values by using OGNL:
So, this is Struts 2 OGNL. The JSP Expression Language and the OGNL are quite similar. The foundation of OGNL is the notion of a root or default object in the context. The pound sign, or markup notation, can be used to access the attributes of the default or root object.