Recommended web.xml configuration for the JSTL tag libs.

I always recommend using the following in the web deployment descriptor (web.xml) for the JSTL (Java Standard Tag Libraries). This will enforce the JSP authors to use the standard URI when including the tag libs.

Problems can occur if shared JSP's are going to be included in various applications. If the taglib descriptor include uses the path to the tld then pages must either be modified between apps (increasing maintenance costs) or apps will need to ensure they match directory structures.

For instance, I prefer to create a tlds directory in the WEB-INF directory, to keep my tlds away from the other configuration code. I am aware that many people like to simply place the tld files in the WEB-INF directory.
By using a standard URI, then page authors don't have to concern themselves with configuration details. And configurators, do not need to worry about the pages.

Update: For J2EE 1.4 and EE5, make sure to create a jsp-config tag in the web.xml and place all of the taglib tags inside of it because, there is a change in the schema.

Questions, comments, just send a message to


About willCode4Beer