concept Struts 2 tag api in category java

This is an excerpt from Manning's book Struts 2 in Action.
This chapter also starts our two-part formal coverage of OGNL. OGNL is currently the default expression language used to reference data from the various regions of the framework in a consistent manner. We’ve already seen how to use OGNL expressions to point incoming form fields at the Java properties they should target when the framework transfers the request data. Accordingly, this chapter will cover OGNL from the point of view of incoming data transfer and type conversion. But OGNL is also going to be critical when we introduce the Struts 2 tag API in the next chapter. The tag is used to pull data out of the framework into the rendering response pages. We’ll thus divide the coverage of OGNL between this chapter and the next. To be specific, this chapter will focus on how OGNL fits into the framework, and the role it plays in binding data throughout the various regions of the framework. The next chapter, which introduces tags, will cover the OGNL expression language from a more syntactic perspective, which you will need when using the tags.
Now, we’ll focus on the OGNL expression language (EL) in the context of data exiting the framework through the Struts 2 tag API. While the previous chapter showed us how to map incoming request parameters to Java properties exposed on the ValueStack, this chapter will show you how to pull data off of those properties for the rendering of result pages. We’ll explore the syntax of the OGNL EL and study the locations from which it can pull data. In particular, we’ll look closely at the ValueStack and the ActionContext. These objects hold all of the data important to processing a given request, including your action object. While it may be possible to blissfully ignore their existence during much of your development, we think the benefits are too high not to spend a few minutes getting to know them.
But that won’t take long, and we’ll make the most of the remainder of the chapter. After we demystify these two obscure repositories, we’ll provide a reference-style catalog of the general-use tags in the Struts 2 tag API. These powerful new tags allow you to wield the OGNL expression language to feed them with values. But tags are tags, and they also won’t take long to cover. So, after covering the tags, we’ll provide a concise primer to the advanced features of the OGNL expression language. In the end, you’ll wield your OGNL expressions confidently as you navigate through the densest of object graphs to pull data into the dynamic rendering of your view pages. Bon appétit.