Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

Failed to load or instantiate TagExtraInfo class

Thread view: 
Christine Mayer - 26 Oct 2007 11:52 GMT
I am using struts-1.3.8 tiles together with Spring, now I wanted to
implement my own custom tag. Following a book example, I wrote a
TagHandler that extends "SimpleTagSupport". Eclipse told me I needed
to import the jsp-api.2.0.jar from tomcat, so I did.

However, this always results in the error:

org.apache.jasper.JasperException: /WEB-INF/jsp/myjsp.jsp(1,1) Unable
to read TLD "META-INF/tld/struts-tiles.tld" from JAR file
"file:myFileLocation": org.apache.jasper.JasperException: Failed to
load or instantiate TagExtraInfo class:
org.apache.struts.tiles.taglib.UseAttributeTei

I did some research on the web, there it's said not to include the jsp-
api.2.0.jar (but not why not to), and yes, this solves the problem -
but how can I implement my Tag handler without using this jar file?
Eclipse doesn't find the required classes otherwise...

Thanks in advance,

Christine
Owen Jacobson - 26 Oct 2007 19:19 GMT
> I am using struts-1.3.8 tiles together with Spring, now I wanted to
> implement my own custom tag. Following a book example, I wrote a
[quoted text clipped - 13 lines]
> but how can I implement my Tag handler without using this jar file?
> Eclipse doesn't find the required classes otherwise...

There are actually two classpaths relevant to a program, not one.

To compile your taglib, you do need to have jsp-api.2.0.jar on the
compiler classpath.  However, you must not package that JAR with your
application; Tomcat makes it part of the run-time classpath for you.
Christine Mayer - 30 Oct 2007 11:25 GMT
I use Maven 1.x for deploying my application. When I add jsp-api.
2.0.jar to my Eclipse classPath, but don't add jsp-api.2.0.jar to the
projects project.xml as a dependency, Maven throws this exception:

java:compile:
   [echo] Compiling to C:\myFolder/classes
   [javac] Compiling 61 source files to C:\myFolder\classes
C:\myFoldert\otherFolder\MyClass.java:8: package
javax.servlet.jsp.tagext does not exist
import javax.servlet.jsp.tagext.SimpleTagSupport;

SimpleTagSupport requires jsp-api.2.0.jar.

However, when I add jsp-api.2.0.jar as a Maven dependency, compiling
and deploying works, but then Tomcat throws the error
org.apache.jasper.JasperException: /WEB-INF/jsp/myjsp.jsp(1,1) Unable
to read TLD "META-INF/tld/struts-tiles.tld" from JAR file
"file:myFileLocation": org.apache.jasper.JasperException: Failed to
load or instantiate TagExtraInfo class:
org.apache.struts.tiles.taglib.UseAttributeTei

As described above...

What can I do???

Thanks in advance,

Christine


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.