File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Custom Tag doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Custom Tag doubt" Watch "Custom Tag doubt" New topic
Author

Custom Tag doubt

sudha javvadi
Ranch Hand

Joined: Mar 23, 2007
Posts: 97

Hi all,
I am learning how to create a custom tag. I found an example and trying to implement . Iam getting an error: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/Heading.tld: (line 3, col 6).

My Heading.tld is as follows:


I am using struts1.3.8,Tomcat6. Is anything wrong with DOCTYPE?? Please help me in solving this error. I tried removing the DOCTYPE, now I am getting error: /pages/HeadingExample.jsp(11,0) Unable to load tag handler class "actions.HeadingTag" for tag "head:heading"


Thankyou,

Sudha.
SCJP1.5
sudha javvadi
Ranch Hand

Joined: Mar 23, 2007
Posts: 97
Hi all,

I am getting the error: /pages/HeadingExample.jsp(11,0) Unable to load tag handler class "actions.HeadingTag" for tag "head:heading" .

I am trying all the possible ways to solve this error. I noticed that there is no .class file for this HeadingTag.java. So I compiled this file separetly to check whether this file works correctly. But I got 13 errors. I really couldn't get why Iam getting all these errors. What's wrong with this java file.

HeadingTag.java


Please guide me what I am doing wrong.

Sudha.
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874



But I got 13 errors. I really couldn't get why Iam getting all these errors. What's wrong with this java file.


where is your Java file located and how do you compile and what are the 13 errors


import javax.servlet.*; // I am getting error as all these packages does not exist


What container are you using ? seems that your classpath not set correctly.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

That's the JSP 1.2 format. With Tomcat 6 you should be using JSP 2.0. See the JSP 2.0 Spec for details.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Bear Bibeault wrote: With Tomcat 6 you should be using JSP 2.0. See the JSP 2.0 Spec for details.


in tomcat6 ,jsp version is 2.1 for more details click here

sudha javvadi
Ranch Hand

Joined: Mar 23, 2007
Posts: 97
Hi all,

Thank you for all your replies. I am using Tomcat6.0. I thought JSP 2 will support JSP1.2. So JSP2.0 wont support classic tags(TagSupport)? I have to use SimpleTag handler?? Tell me the necessary changes I have to do for my code to work. Please send me a link or an example to learn.

Thankyou
Sudha.
SCJP5.0
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874


JSP 2.1 supports full bacward compatability. Hope this link helps you. ProJSP
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61437
    
  67

Of course it does, the point is that there is no need to be using a JSP 1.2 format in a more modern container. It also helps eliminate any possibility of error with mixing old with new.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom Tag doubt