Java Reference
In-Depth Information
14.<url-pattern>/book</url-pattern>
15.</servlet-mapping>
16.<welcome-file-list>
17.<welcome-file>index.html</welcome-file>
18.</welcome-file-list>
19.</web-app>
Now the only key component that is missing in this web application is the JSP page, which is where
the EL code is actually written. Before we get to the JSP page, we will look at the two key operators
provided by EL to access encapsulated data: the [ ] and . (also called dot ) operators. After
learning about the [ ] and . operators, you will be able to write book.jsp . Figure 3-6 illustrates the
directory structure of the application.
Figure 3-6. Directory structure
The [ ] and . Operators
Using the . notation is shortcut for accessing an object's property. The dot operator was introduced
in Listing 3-5. For the sake of convenience, it is shown again in Listing 3-13.
Listing 3-13. Using the Dot Operator
1.<jsp:useBean id="user" class="com.apress.User"/>
2.User is: ${user.name}
 
Search WWH ::




Custom Search