Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Tomcat 5 and JSTL 1.1. Configure Problem

Tomcat 5 and JSTL 1.1. Configure Problem
Thread Tools
depolitic
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Aug 31, 2004, 05:46 AM
 
Hi - I have the latest of everything Tomcat + JSTL. I am having problems get JSTL to run/work.

I placed my jars in my /WEB-INF/lib/ and my c.tld in my /WEB-INF/tld and I am calling it this way <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>

and this is what my web.xml in /WEB-INF/ looks like:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>

</web-app>

However my tags do not work, at all what am I doing wrong?
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Sep 2, 2004, 10:16 AM
 
bump - come on some one must know.

I did a new install of tomcat 5 and the new JTSL 1.1.x from Jakarta. - And reconfigured my Intelij IDEA which is now recognizing my tags and all seems fine. No errors, all green and go in IDEA.

However when I add a <c:out value="${someValue}" /> the tag is never parsed and is simple passed through.

What could cause tomcat not to parse my tag???? Tomcat logs are looking good and with no errors.

Any help... please.... As I urgently need to get this up and running.
( Last edited by depolitic; Sep 2, 2004 at 10:25 AM. )
     
Kristoff
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status: Offline
Reply With Quote
Sep 2, 2004, 10:30 AM
 
There's no errors or exceptions in the tomcat log?

That's odd.

The only thing I can suggest is to read this if you haven't already, and make sure you did every step.

BTW, is that your whole web.xml, or are you just showing us the specific entry?
signatures are a waste of bandwidth
especially ones with political tripe in them.
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Sep 2, 2004, 11:32 AM
 
Fixed - it turns out I was being to smart for my own good and forgot the basics, I was using a jsp include to include a staticHeader.jspf that called all my tags into the page. however the path was just plain wrong once the tags were included ito the page. It is always the way with me.

The question is how do now resolve the url for my includes - I once saw this trick were a guy had a tag or servlet that would change "/myPath" to this "http://www.mysite/myPath" and always made it correct regardless of were it sat in the site structure.
     
beamso
Fresh-Faced Recruit
Join Date: Nov 2001
Location: Melboune, Australia
Status: Offline
Reply With Quote
Sep 5, 2004, 06:40 PM
 
I found that you have to be careful with JSTL versions and what DTD you reference in your web.xml. I recall JSTL 1.1 not working well unless you specified that you were working with a version 2.4 web.xml.

About the other question, I'm confused. Do you mean that it's able to link to itself even if it's not at the first directory structure depth?

A question for you, depolitic: how's IntelliJ IDEA? Would you rate it above Eclipse?
     
depolitic  (op)
Registered User
Join Date: Feb 2003
Status: Offline
Reply With Quote
Sep 6, 2004, 08:29 PM
 
IntelliJ IDEA kicks ass as far as a Java IDE goes their is good reason why it keeps winning developer awards. If you can afford it and even if you cannot it is worth it. It is a Java app, however I have always found its performance to be above the rest. Plus it has so many cool features I would not use any others and trust me I have. IntelliJ IDEA has also good mac support with every version becoming more native in its LAF. Unlike some other we Mac users do not need to wait with IntelliJ IDEA.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:59 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,