Solved

JSTL Standard question

Posted on 2006-11-19
6
359 Views
Last Modified: 2013-11-24
Hi,
I see in a tutorial that I need to put this for example to use jstl Standard core libraries :

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

But this mean that when a request is done on this page, it will connect to sun website every time,
also I can't work offline ...

What can I do ?
0
Comment
Question by:matthew016
  • 3
  • 2
6 Comments
 
LVL 10

Accepted Solution

by:
jaggernat earned 500 total points
ID: 17976240
yes , you can work off-line
Instead of
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

you can have
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>

make sure u have standard.jar, jstl.jar in web-inf/lib  directory

also make sure that you put c.tld in /web-inf  folder .

0
 
LVL 10

Expert Comment

by:jaggernat
ID: 17976327
actually c.tld is in the standard.jar ,so dont worry about c.tld. just import standard.jar, jstl.jar and put them in web-inf/lib  directory

Go to   http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi   
Click on 1.1.2.zip which will download  jakarta-taglibs-standard-1.1.2.zip.
Once you Unzip it , you will find a lib folder and inside that you will find two jars  standard.jar and jstl.jar. copy- paste them into your web-inf/lib directory.
0
 
LVL 9

Author Comment

by:matthew016
ID: 17977598
Thank u, but it seems I need to use the <@taglib directive

"To use the Standard Taglib from its Jakarta Taglibs distribution, simply copy the JAR files in the distribution's 'lib' directory to your application's WEB-INF/lib directory. "
[...]
"Using the Standard Taglib libraries is simple; you simply need to import them into your JSP pages using the taglib directive. For instance, to import the 'core' JSTL library into your page, you would include the following line at the top of your JSP page, as follows:

    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>"

I tried without the taglib directive but then it doesn't work


I have several
c.tld
c-1_0.tld
c-1_0-rt.tld

How do I know which one to choose ?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 10

Expert Comment

by:jaggernat
ID: 17979190
c.tld  is the correct one
0
 
LVL 9

Author Comment

by:matthew016
ID: 17979404
I will try .
Thank u
0
 
LVL 9

Expert Comment

by:owenli27
ID: 17980226
Matthew,

-Just a reminder:  if you are still using old version, JSP 1.2 containers (such as Tomcat 4), You may need c-1_0.tld and c-1_0-rt.tld.  If you are using JSP 2.0, forget what I said.

Owen
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
JavaScript parse form with colon separated values 2 73
stringclean challenge 26 70
maven project error 5 48
eclipse shortcuts 9 45
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now