Solved

JSTL Standard question

Posted on 2006-11-19
6
373 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 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
Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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

627 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