Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

JSP custom tag library

  Asked By: Kevin    Date: Nov 27    Category: Java    Views: 792
  

I am tyring to make some of my JSP tags. I have a program which tell
me how to write very basic custom tag. I followed all the
instrucions and now I am try to compile. But, I some errors. Can
you please let me know where am i making mistake. I have also
include servlet.jar file in my classpath.

Here I put my FirstTag.java file.

Congif :

My firsttag.java file

c:\Program Files\jakarta\webapps\simple\WEB-
INF\classes\firsttag.java

Servlet.jar file is here

c:\Program Files\jakarta\webapps\simple\WEB-INF\lib\servlet.jar

Here is the errors

Thats how I compile :
C:\Program Files\jakarta-tomcat-4.0.4\webapps\simple\WEB-
INF\classes>javac FirstTag.java

Here is the errors I get :-

FirstTag.java:3: package javax.servlet.jsp does not exist
import javax.servlet.jsp.*;
^
FirstTag.java:4: package javax.servlet.jsp.tagext does not exist
import javax.servlet.jsp.tagext.*;
^
FirstTag.java:6: cannot resolve symbol
symbol : class Tag
location: class FirstTag
public class FirstTag implements Tag, Serializable {
^
FirstTag.java:8: cannot resolve symbol
symbol : class PageContext
location: class FirstTag
private PageContext pc = null;
^
FirstTag.java:9: cannot resolve symbol
symbol : class Tag
location: class FirstTag
private Tag parent = null;
^
FirstTag.java:12: cannot resolve symbol
symbol : class PageContext
location: class FirstTag
public void setPageContext(PageContext p) {
^
FirstTag.java:16: cannot resolve symbol
symbol : class Tag
location: class FirstTag
public void setParent(Tag t) {
^
FirstTag.java:20: cannot resolve symbol
symbol : class Tag
location: class FirstTag
public Tag getParent() {
^

Once Again Thank you very much for your help.

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on JSP custom tag library Or get search suggestion and latest updates.




Tagged: