• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

c:forEach, c:out are being ignored event though jar are present

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've placed following jars in WEB-INF\lib folder.

C:\Users\vgarg\work2\apache-tomcat-7.0.27\webapps\Beer-v1\WEB-INF\lib\jstl.jar
C:\Users\vgarg\work2\apache-tomcat-7.0.27\webapps\Beer-v1\WEB-INF\lib\standard.jar

in servlet I'm setting as below


in Jsp I've below code and I've verified using EL that values are reaching JSP.


Output being received:


After trying different things I reached the conclusion that c:forEach and and c:out tags are simply not working and the text is being displayed just once.

Any suggestions what's going wrong please?
 
Vineet Kumar Garg
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
(May be I should have posted the question an hour back itself as I found the solution after 5 minutes of posting it. :))

I found the problem. I didn't include the taglib in the JSP.



It solved the problem and everything is running good now.
Thanks
-Vineet
 
Greenhorn
Posts: 5
IntelliJ IDE jQuery Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Vineet Kumar Garg

have you ever put this line under <html> ?

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




when put this line in your jsp,you jsp file should like



<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<head>
<title>tsaowe</title>
</head>
<body>



when i put this, i got your expected result

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

tsaowe cao wrote:hi Vineet Kumar Garg have you ever put this line under <html> ?


Where the directive goes in relation to HTML markup is irrelevant. It's usually placed at the top of the file.
 
reply
    Bookmark Topic Watch Topic
  • New Topic