EL Operators

The EL operations are necessary to handle data manipulations. All of the standard and common operators are available. Functionality is included in the EL for relational, arithmetic, and logical operators. These operators include , , lt , gt , lt , gt , eq, ne, lt, gt, le, and ge. The last six operators are made available to avoid having to use entity references in XML syntax. Entity references are sometimes required because, if you place a character like lt inside an XML element, the parser...

Action 17

No mystery here, the lt sql query gt action is used to query a database. There are a number of attributes that are used with this action. It is possible to specify a data source by using the dataSource attribute. If present, it will override the default data source using the algorithm we talked about in Configuring a Data Source, Section 7.3. If the dataSource is null after the algorithm, then a JspException is thrown. If a dataSource is specified, then the lt sql query gt action must be...

Encoding the Client Response

The last item to consider when doing I18N actions is how the response is returned to the client. The response needs to be encoded with the correct locale setting so that the browser renders it correctly. The responsibility for setting the response's locale lies with the I18N action. The only exception to this is if the localization context does not have a locale set. The way the action sets the locale is by calling the ServletResponse. setLocale and SerlvetResponse.setContentType methods with...

Accessing Data Structures

When a page author accesses data in a JSP, it's usually done by accessing objects. Actually, for the most part these objects have been JavaBeans or collections. There are two ways provided by the EL to access data structures. The operators are . and . Using these operators makes it easy to access encapsulated data. If fact, we've already seen this access in the example above using the conditional if tag. Using the . also called dot notation is a shortcut for accessing an object's property....

JSTL Quick Reference

The purpose of the JSTL quick reference is to help you look up syntax, actions, and attribute values or find the answer to simple questions you might have while in active development. It is not meant to be an in-depth description of the features. For details, refer to the chapter that covers the area you are interested in. The following conventions are used throughout this section. A represents variable A, which also might be referred to as varA in some samples. B represents variable B, which...

HTTP Status 1

The server encountered an internal error that prevented itfrom fulfilling this request javax. servlet. ServletExcepticn 1 dataSource is null at org. apache . jasper . runtime. PageContextIropl. handleFageException PageContextImp 1. Java 589 at jsp.Java 155 at 6 at at at org. apache . jasper . servlet. JspServlet . servicreJ3pFile JspServlet. Java 2 39 at 40 at J av x.aervlet- http , HttpServ let. service HttpServ let. J ava 853 at ut n rr, anmr-hm r-mf M tim r-a Innl innTi 1 t rriinin HnTH 1...