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

this doesn't work.

What is the new taglib import statement, and how can I find a reference of others to use, and what tags there are to use.

Thanks!

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
mjs
  • 21,431
  • 31
  • 118
  • 200
  • 1
    Put your mouse above the `[jstl]` tag below the question and click the *info* link in the popbox. – BalusC Apr 03 '12 at 13:53

2 Answers2

5

here's a good one to start, just put it at top of jsp :

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

Allows you to use these tags.

NimChimpsky
  • 46,453
  • 60
  • 198
  • 311
  • Thanks, that worked fine. Now I need to figure out how to create a link to a @Controller/action and with params ... c:url doesnt seem to do the trick :( – mjs Apr 03 '12 at 15:43
  • c:url does do the trick ... the docs are normally a good starting point http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-ann-responsebody – NimChimpsky Apr 03 '12 at 15:48
  • Ok, that link did not provide me with any info about c:url. I find that the doc is a bit messy and missing of detailed info. Here is a Jira about the topic, I do not belive it is possible: https://jira.springsource.org/browse/SPR-5779 And stackoverflow: http://stackoverflow.com/questions/6022980/how-can-i-create-a-url-based-on-controller-and-action-method-in-spring-mvc – mjs Apr 04 '12 at 08:12
1

What doesn't work? In jsp/servlet container, there are four built-in standard tag libraries: http://docs.oracle.com/javaee/1.4/tutorial/doc/JSTL3.html

evanwong
  • 5,054
  • 3
  • 31
  • 44
  • you still have to add them to your jsp's – NimChimpsky Apr 03 '12 at 13:50
  • OP didn't pay attention to markdown formatting rules. I made the missing code line to reappear again. – BalusC Apr 03 '12 at 13:54
  • @NimChimpsky, right, you do have to add them to your jsps using the taglib directive as in your answer. – evanwong Apr 03 '12 at 13:57
  • Not sure what you guys are discussing or recommending :S – mjs Apr 03 '12 at 14:25
  • 1
    http://docs.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/index.html try using <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> as @NimChimpsky suggested. I think the one you are using is old or incorrect. – evanwong Apr 03 '12 at 14:38