Win a copy of OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815 this week in the Programmer Certification forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

JSTL not working

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as you can see i am playing with j2ee this weekend (hence the flurry of posts about servlets and jsps) and my most recent problem is that the jstl tags do not seem to be working. i looked through jsp faq and i dont see where i am going wrong. i am using tomcat 5.5. this is what i have done so far:

1. copied the jstl.jar and standard.jar files from $CATALINA_HOME/webapps/jsp-examples/WEB-INF/lib to my webapp's lib directory
2. created the following jsp page:



... that's it actually. i am sure that for loop doesn't do what i expect yet but the output is something else entirely:


<@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> ${param.test1} = a
:



what gives?
 
Marshal
Posts: 67300
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What gets sent to the browser? (In other words, what does a View Source show? Are the tags not getting evaluated before being sent to the browser? Or are you just getting unexpexted results?)
[ July 08, 2007: Message edited by: Bear Bibeault ]
 
Ra Carter
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that was what was displayed in the browser. the page source is this:



i was expecting to see the results of the foreach loop...
 
Bear Bibeault
Marshal
Posts: 67300
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Inspect this line carefully:

 
Ra Carter
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess it is time i take a rest from programming right now. thanks.
[ July 08, 2007: Message edited by: ra carter ]
 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<%@ taglib prefix="" uri="" %>

that works for me. I guess you forgot the % before @
 
Hot dog! An advertiser loves us THIS much:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!