views:

350

answers:

2

I am taking my first steps with Spring and am doing a tutorial.

I am supposed to be redirecting to a page that displays some content using

< core:redirect url="/portfolio.htm"/>

However that page never gets displayed. By navigating directly to the page I can see that it is there and it looks ok.

I get the error in Eclipse "Uknown tag (core:redirect)

I suspect this is giving me the problem, however I have imported the JSTL library and cannot see what I am doing wrong. The only thing I can think of is that core:... has been superseded by something else.

+1  A: 

Did you specify the JSTL core taglib with the following statement at the top of your JSP?

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

Most of the time it's done with prefix="c", so referring to core wouldn't work.

Kaleb Brasee
If I change it to prefx="c" it still doesn't work?
Ankur
+1  A: 

You need to install and declare the taglib before you can use its tags.

  1. Download jstl-1.2.jar and place it in /WEB-INF/lib or /appserver/lib if not done yet.
  2. Declare <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> in top of your JSP.
  3. Now you can use <c:redirect />.
BalusC