• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

tld file not found

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI

learning the concepts of caustom tags. I got an error in jsp page that :"WEB-INF/tlds/taglib.tld "not found
below are the files
1.teglib.tld
2.sample.jsp
3.taghandler file
4.xml file

1.<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd">
<tlib-version>1.0</tlib-version>
<short-name>taglib</short-name>
<uri>/WEB-INF/tlds/taglib</uri>
<tag>
<name>myTag</name>
<tagclass>Testpac.MyCustomTag</tagclass>
</tag>

2.<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
<%@ taglib uri="/myTLD" prefix="easy"%> *** Im getting error at this point.
<easy:myTag>hi this is lokesh</easy:myTag>
</head>
<body>
<h1>JSP Page</h1>
</body>
</html>

3.package Testpac;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;


/**
*
* @author stupa002
*/
public class MyCustomTag extends TagSupport {

public int doEndTag() throws JspException {
JspWriter out = pageContext.getOut();
try {
out.println("Hello from the custom tag.");
}
catch (Exception e) {
}
return super.doEndTag();
}
}


4.
<web-app>
<display-name>template</display-name>
<taglib>
<taglib-uri>/myTLD</taglib-uri>
<taglib-location>/WEB-INF/tlds/taglib.tld</taglib-location>
</taglib>
</web-app>
[ January 24, 2008: Message edited by: lokesh rajarathnam ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

"weg-ing/tlds/taglib.tld not found"



weg-ing? really?
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
teglib.tld ?
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

In an effort to help you get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here.

Since your question has sat here for three days without getting any responses other than two people pointing out spelling errors, it might a good idea to see if any of the tips on that page apply here.

I, personally didn't respond because I saw a lot of unformatted code dumped into your post and never bothered reading it.
See UseCodeTags] to find out how to preserve your code's indentation which will make it easier to read.

The two people who did respond pointed out spelling errors that would keep your code from working. They may have figured that your code was so sloppy that it would take forever to help you debug it on a web forum like this and decided not to bother.
If the real code on your server doesn't contain these spelling errors but was mistyped when you posted it here, you might want to see AvoidRedHerrings].
It has links to other articles that show you how to cut and paste things like file structures and environment variables.

At this point, if you want to improve the quality of this question, you can do one of two things.

1.) Edit your original post. The '' icon, will open your original post in an edit screen that will allow you to fix up and format your question and code.

2.) Start over. Just ask, and I'll close or delete this thread for you so you can ask again with well formatted, clean code. A thread with zero respones has a better chance of being read so this might be the better of the two options.

Let me know,
-Ben
[ January 26, 2008: Message edited by: Ben Souther ]
 
Anderson gave himself the promotion. So I gave myself this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic