Forums Register Login

Doubt in SimpleTag

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
Nitya,
May be the jsp version you are runnnig is jsp1.2 and the SimpleTagSupport needs JSP2.0


Thanks
Raj
The longest recorded flight time of a chicken is 13 seconds. But that was done without this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 791 times.
Similar Threads
Error compiling SimpleTagSupport class
Doubt in Simple Tag
JSTL + help needed
Custome Tag Problem
JspContext.getOut
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 09:01:04.