File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes How to use JSTL? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to use JSTL?" Watch "How to use JSTL?" New topic
Author

How to use JSTL?

umar hathab
Ranch Hand

Joined: Aug 20, 2001
Posts: 52
Hi,
Friends,I am new tag libs.I am trying to use the core tags like (forEach).I have downloaded the jstl.jar and standard.jar and put in WEB-INF/lib of JRun3.1.My .tld file contains
<tablib>
<taglib-uri>/jstl-c</taglib-uri>
<taglib-location>/WEB_INF/c.tld</taglib-location>
</taglib>
And I am referring as
<%@ taglib uri="/jstl-c" prefic="c" %>

My page has this only one line.
Helpful if some one helps at the earliest.
A.Umar


Sun Certified Java Programmer for Java 2.0 (93%) <p>----Winners always make the learning a habit
Shawn Bayern
Author
Ranch Hand

Joined: May 06, 2002
Posts: 160
Originally posted by umar hathab:
Hi,
Friends,I am new tag libs.I am trying to use the core tags like (forEach).I have downloaded the jstl.jar and standard.jar and put in WEB-INF/lib of JRun3.1.My .tld file contains
<tablib>
<taglib-uri>/jstl-c</taglib-uri>
<taglib-location>/WEB_INF/c.tld</taglib-location>
</taglib>
And I am referring as
<%@ taglib uri="/jstl-c" prefic="c" %>

My page has this only one line.
Helpful if some one helps at the earliest.
A.Umar

Hi there. I'd be happy to try to help, but I'd need more information to address the problem. What's the error you get when you try to use the <c:forEach> tag? What does all of your page look like?
Thanks!


Shawn Bayern<br />"JSTL in Action" <a href="http://www.jstlbook.com" target="_blank" rel="nofollow">http://www.jstlbook.com</a>
umar hathab
Ranch Hand

Joined: Aug 20, 2001
Posts: 52
Hi,
Actually I am using Jrun3.1
My jsp page just contains one line.
<%@ taglib uri="/jstl-c" prefix="c" %>
I am getting the error
The taglib uri '/jstl-c' used on page '/Tag1.jsp' resolved to '/jstl-c' which could not be located.
This is the part of .tld
<tablib>
<taglib-uri>/jstl-c</taglib-uri>
<taglib-location>/WEB_INF/c.tld</taglib-location>
</taglib>
I have created an application in Jrun and have an alias like /appname will refer to c:\Jrun\Servers\Default\appname\.
I have my jsp files under this directory.
I assume there are some prblms with alias
A.Umar
Shawn Bayern
Author
Ranch Hand

Joined: May 06, 2002
Posts: 160
Originally posted by umar hathab:
My jsp page just contains one line.
<%@ taglib uri="/jstl-c" prefix="c" %>
I am getting the error
The taglib uri '/jstl-c' used on page '/Tag1.jsp' resolved to '/jstl-c' which could not be located.
This is the part of .tld
<tablib>
<taglib-uri>/jstl-c</taglib-uri>
<taglib-location>/WEB_INF/c.tld</taglib-location>
</taglib>

Just for argument's sake, try using the published URI for the JSTL core library:
http://java.sun.com/jstl/core
in both your <%@ taglib %> directive and your web.xml file. It's possible that JRun is somehow misinterpreting "/jstl-c"; I've seen containers that get confused by hyphens, for instance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to use JSTL?