facing a problem while creating custom tag

Hi In the below example i want to use one custom tag, but i am facing one problem while i testing this application.
the error is like

"
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 5 in the jsp file: /index.jsp
Generated servlet error:
SimpleTagTest2 cannot be resolved to a type

An error occurred at line: 5 in the jsp file: /index.jsp
Generated servlet error:
SimpleTagTest2 cannot be resolved to a type


      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
"

and My JSP,tag handler class,tld mentioned in the code
u please verify the code and tell me where is the problem
MYJSP
 
<%@ taglib prefix="myTags" uri="simpleTags" %>
<html>
<body>
Simple Tag 2:
<myTags:simple2>
 This is The Body
 </myTags:simple2>
</body>
</html>
----------------------------------------------------------------
MY TLD
----
<?xml version="1.0" encoding="ISO-8859-1" ?>
<taglib 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" version="2.0">
 
<tlib-version>1.2</tlib-version>
<uri>simpleTags</uri>
<tag>
 <description>Hi I am Manually Generated Tag</description>
 <name>simple2</name>
 <tag-class>SimpleTagTest2</tag-class>
 <body-content>scriptless</body-content>
</tag>
</taglib>
-----------------------------------------------------------------
My TAGHANDLER CLASS
---
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;
import java.io.*;
public class SimpleTagTest2 extends SimpleTagSupport
{
	public void doTag()throws JspException,IOException
	{
		getJspBody().invoke(null);
	}
}

Open in new window

haneefnbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mahomeCommented:
Did you check if SimpleTagTest2 gets compiled in WEB-INF/classes?
You can try using a package, don't forget to update you tld for that. Sometimes that helps.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
haneefnbAuthor Commented:
ok. u please tell me what is the purpose of the doTag(),doStartTag(),doEndTag() in the Tag handler class
0
mahomeCommented:
Is the error gone? If yes, what did help?

For Tag Handler, look here: http://onjava.com/pub/a/onjava/2000/12/15/jsp_custom_tags.html
0
haneefnbAuthor Commented:
Thanks...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.