aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Doubt in Simple Tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Doubt in Simple Tag" Watch "Doubt in Simple Tag" New topic
Author

Doubt in Simple Tag

Nithya Venkatraman
Ranch Hand

Joined: Apr 11, 2004
Posts: 39
Hi

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

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:
SimpleTag1.java:6: cannot resolve symbol
symbol : class SimpleTagSupport
location: class myclasses.SimpleTag1
public class SimpleTag1 extends SimpleTagSupport{
^
SimpleTag1.java:8: 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)
Nitish Bahadur
Ranch Hand

Joined: Aug 25, 2003
Posts: 118
Include servlet-api.jar AND jsp-api.jar in your classpath.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in Simple Tag
 
Similar Threads
JspContext.getOut
JSTL + help needed
Doubt in SimpleTag
Error compiling SimpleTagSupport class
Custome Tag Problem