File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes Doubt in SimpleTag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Doubt in SimpleTag" Watch "Doubt in SimpleTag" New topic

Doubt in SimpleTag

Nithya Venkatraman
Ranch Hand

Joined: Apr 11, 2004
Posts: 39

This is my tag handler class:
package myclasses;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.*;

public class SimpleTag1 extends SimpleTagSupport{
public void doTag() throws IOException{
getJspContext().getOut().print("Hi This is a Simple Tag example");

When I try to compile the .java class I am getting the foll: errors: cannot resolve symbol
symbol : class SimpleTagSupport
location: class myclasses.SimpleTag1
public class SimpleTag1 extends SimpleTagSupport{
^ cannot resolve symbol
symbol : method getJspContext ()
location: class myclasses.SimpleTag1
getJspContext().getOut().print("Hi This is a Simple Tag example"
2 errors

Why am I getting this error?

Nithya<br />SCJP(1.2), SCWCD(1.4)
Rajendar Goud
Ranch Hand

Joined: Mar 06, 2002
Posts: 220
May be the jsp version you are runnnig is jsp1.2 and the SimpleTagSupport needs JSP2.0

wood burning stoves
subject: Doubt in SimpleTag
Similar Threads
Doubt in Simple Tag
Error compiling SimpleTagSupport class
JSTL + help needed
Custome Tag Problem