Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSTL not working

 
Ra Carter
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?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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 ]
 
Sverre Moe
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 @
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic