aspose file tools*
The moose likes JSP and the fly likes JSTL not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSTL not working" Watch "JSTL not working" New topic
Author

JSTL not working

Ra Carter
Ranch Hand

Joined: Jul 30, 2005
Posts: 96
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

Joined: Jan 10, 2002
Posts: 61648
    
  67

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 ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ra Carter
Ranch Hand

Joined: Jul 30, 2005
Posts: 96
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

Joined: Jan 10, 2002
Posts: 61648
    
  67

Inspect this line carefully:

Ra Carter
Ranch Hand

Joined: Jul 30, 2005
Posts: 96
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

Joined: Jul 10, 2007
Posts: 110
<%@ taglib prefix="" uri="" %>

that works for me. I guess you forgot the % before @
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSTL not working