DamianFox DamianFox - 1 year ago 61
Java Question

Does JSTL library need to be configure on tomcat web.xml?

I'm doing a java web application for a coursework, and it is required the use of JSTL library;

so my questions are:

does JSTL need to be configured on tomcat web.xml? If so, how can I configure it?

I have already downloaded the jar file; where do I have to put it?

Thanks in advance!

Answer Source

no, you don't have to define it in web.xml.

You should put the jar into your WEB-INF/lib and declare it in your jsp. something like:

<%@ taglib prefix="c"       uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt"     uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn"      uri="http://java.sun.com/jsp/jstl/functions" %>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download