Solved

JSTL Standard question

Posted on 2006-11-19
6
356 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
withoutTen challenge 14 88
mergeTwo  challenge 13 72
count7 challenge 12 70
groovy example issue 10 67
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 second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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.

758 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

18 Experts available now in Live!

Get 1:1 Help Now