Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

JSTL Standard question

Posted on 2006-11-19
6
Medium Priority
?
377 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 2000 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
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.
Suggested Courses

885 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