You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Kiran Badi <ki...@poonam.org> on 2011/12/06 03:34:30 UTC

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

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


Re: How to I add JSTL Lib to Tomcat with Netbeans

Posted by Kiran Badi <ki...@poonam.org>.
Thanks Mark its working now.

Also I will make sure replies goes to the list. I must have used Reply 
all earlier by oversight.


On 12/8/2011 3:35 AM, Mark Eggers wrote:
> ----- Original Message -----
>
>> From: Kiran Badi<ki...@poonam.org>
>> To: Tomcat Users List<us...@tomcat.apache.org>
>> Cc: Mark Eggers<it...@yahoo.com>
>> Sent: Tuesday, December 6, 2011 3:51 PM
>> Subject: Re: How to I add JSTL Lib to Tomcat with Netbeans
>>
>> T hanks Mark, I have added the jars exactly the way you have given
>> suggestions.but for some reasons
>>
>> <%@ taglib uri="..." %>
>>
>> is not getting created for my pages.
>>
>> Let me try to create a simple test case outside the project and see if
>> it is installed correctly.
>>
>>
>>
>> On 12/6/2011 9:23 AM, Mark Eggers wrote:
>>>   ----- Original Message -----
>>>
>>>>   From: Kiran Badi<ki...@poonam.org>
>>>>   To: Tomcat Users List<us...@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/
>
> You actually have to type that in. However, Netbeans will auto-complete the URI for you, and suggest all of the possible URI combinations when you hit Ctrl-space.
>
> So, when you create a new JSP page, you will have to do the following (after you have the libraries added):
>
> 1. type in<%@ taglib u(ctrl-space)
>
> Netbeans will then auto-complete with uri="" and position the cursor in between the quotes
>
> 2. type ctrl-space again, and you will get a list of all the possible URIs
>
> 3. Pick the right URI (scroll down) and press enter.
>
> 4. Press ctrl-space again, and prefix="" will appear (since it's required)
>
> 5. Fill in the prefix (c is commonly used for the common tags)
>
> Done . . .
>
> Now Netbeans will auto-complete tags on that page, and Tomcat will use those tags in your application.
>
> As an aside - don't cc: me and mail to the list. I get everything on the list. I get tons of mail daily, and extra mail doesn't guarantee a faster or more personal response.
>
> just my two cents . . . .
> /mde/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


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


Re: How to I add JSTL Lib to Tomcat with Netbeans

Posted by Mark Eggers <it...@yahoo.com>.
----- Original Message -----

> From: Kiran Badi <ki...@poonam.org>
> To: Tomcat Users List <us...@tomcat.apache.org>
> Cc: Mark Eggers <it...@yahoo.com>
> Sent: Tuesday, December 6, 2011 3:51 PM
> Subject: Re: How to I add JSTL Lib to Tomcat with Netbeans
> 
>T hanks Mark, I have added the jars exactly the way you have given 
> suggestions.but for some reasons
> 
> <%@ taglib uri="..." %>
> 
> is not getting created for my pages.
> 
> Let me try to create a simple test case outside the project and see if 
> it is installed correctly.
> 
> 
> 
> On 12/6/2011 9:23 AM, Mark Eggers wrote:
>>  ----- Original Message -----
>> 
>>>  From: Kiran Badi<ki...@poonam.org>
>>>  To: Tomcat Users List<us...@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/


You actually have to type that in. However, Netbeans will auto-complete the URI for you, and suggest all of the possible URI combinations when you hit Ctrl-space.

So, when you create a new JSP page, you will have to do the following (after you have the libraries added):

1. type in <%@ taglib u(ctrl-space)

Netbeans will then auto-complete with uri="" and position the cursor in between the quotes

2. type ctrl-space again, and you will get a list of all the possible URIs

3. Pick the right URI (scroll down) and press enter.

4. Press ctrl-space again, and prefix="" will appear (since it's required)

5. Fill in the prefix (c is commonly used for the common tags)

Done . . .

Now Netbeans will auto-complete tags on that page, and Tomcat will use those tags in your application.

As an aside - don't cc: me and mail to the list. I get everything on the list. I get tons of mail daily, and extra mail doesn't guarantee a faster or more personal response.

just my two cents . . . .
/mde/

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


Re: How to I add JSTL Lib to Tomcat with Netbeans

Posted by Kiran Badi <ki...@poonam.org>.
Thanks Mark, I have added the jars exactly the way you have given 
suggestions.but for some reasons

<%@ taglib uri="..." %>

is not getting created for my pages.

Let me try to create a simple test case outside the project and see if 
it is installed correctly.



On 12/6/2011 9:23 AM, Mark Eggers wrote:
> ----- Original Message -----
>
>> From: Kiran Badi<ki...@poonam.org>
>> To: Tomcat Users List<us...@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
>
>


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


Re: How to I add JSTL Lib to Tomcat with Netbeans

Posted by Mark Eggers <it...@yahoo.com>.
----- Original Message -----

> From: Kiran Badi <ki...@poonam.org>
> To: Tomcat Users List <us...@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