ria
ria

Reputation: 7984

Using JSTL within JSP Pages in Struts based web app

I have a Struts 1.2 based Web App which uses lot of scriptlet code in the JSP page, I wish to clean up the code by using JSTL.The Servlet Specification Level: 2.3 and JSP Specification Level: 1.2. I am using WSAD 5.1.

I tried using <c:if></c:if> tag, but I get the following error on building the project. "JSP Translate: unable to load if tag"

I have included the taglibs element for this tag library and also the TLD file in the appropriate folder.

I guess the container is not able to locate the tag handler.

It would be great if someone could share their thoughts on this.

Upvotes: 0

Views: 1787

Answers (2)

Randall Kwiatkowski
Randall Kwiatkowski

Reputation: 895

Try using this:

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

instead of this or vise versa

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

Upvotes: 0

skaffman
skaffman

Reputation: 403611

Make sure you're using a version of JSTL compatible with your servlet container. For example, JSTL 1.1 is only compatible with JSP 2.0 and above.

Upvotes: 1

Related Questions