tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <its_toas...@yahoo.com>
Subject Re: How to I add JSTL Lib to Tomcat with Netbeans
Date Tue, 06 Dec 2011 03:53:05 GMT
----- Original Message -----

> From: Kiran Badi <kiran@poonam.org>
> To: Tomcat Users List <users@tomcat.apache.org>
> Cc: 
> Sent: Monday, December 5, 2011 6:34 PM
> Subject: How to I add JSTL Lib to Tomcat with Netbeans
> 
> Hi
> 
> I have jstl-api-1.2 and jstl-impl-1.2 jars in web/lib folder for my project 
> setting.Is this the right setting to add JSTL jars or I need to add this to 
> tomcats's lib directory ?
> 
> I am using netbeans 7.01 with tomcat 7.0.11 on windows 7.For some reasons I feel 
> that jstl lib is not used by my app and jstl tags are getting ignored.
> 
> Can someone point me to right way to add jstl lib with tomcat ?
> 
> Thanking you
> Kiran Badi


In Netbeans, you don't add jar files directly to WEB-INF/lib of your project. Netbeans does
this for you when you build the war file.

If you're running a regular Netbeans (ant) project, then do the following:

1. Right-mouse click on the Libraries node of your project
2. Select Add libraries
3. Scroll down until you see the JSTL library
4. Select it and add it

This will add both the standard tag jar and jstl jar to your project. Netbeans will complete
<%@ taglib uri="..." %> for you as well as all the tags once you add the taglib line
to your JSP file.

If you're running a Maven project, then you need to edit your pom.xml file. The two dependencies
go in the dependencies element and will be built into your war file under the target directory.

Again, once Netbeans knows the libraries are a part of your project (sometimes you have to
refresh the project) code completion will work as expected.

In both cases, everything works as expected on the server.

This is my normal (occasional) development environment:

Platform:  Windows/XP Professional SP 3 or Fedora 15
JVM:       JRE/JDK 1.6.0_29
Maven:     3.0.3
Servers:   Tomcat 5.5.34, Tomcat 6.0.33, Tomcat 7.0.22, Glassfish 3.1

Given my limited use, this works pretty well.

just my two cents . . . .
/mde/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message