?
Solved

JSTL Standard question

Posted on 2006-11-19
6
Medium Priority
?
375 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
RHCE - Red Hat OpenStack Prep Course

This course will provide in-depth training so that students who currently hold the EX200 & EX210 certifications can sit for the EX310 exam. Students will learn how to deploy & manage a full Red Hat environment with Ceph block storage, & integrate Ceph into other OpenStack service

 
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

Tutorials alone can't teach real engineering

So we built better training tools.

-Hands-on Labs
-Instructor Mentoring
-Scenario-Based Tests
-Dedicated Cloud Servers

All at your fingertips. What are you waiting for?

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…
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.

719 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