Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Custom Tag doubt

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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.
 
Sheriff
Posts: 67651
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 5575
Eclipse IDE Windows XP Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 874
Android VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

JSP 2.1 supports full bacward compatability. Hope this link helps you. ProJSP
 
Bear Bibeault
Sheriff
Posts: 67651
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic