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 / First Aid / August 2004

Tip: Looking for answers? Try searching our database.

Problem using JSP/Taglibs with TomCat

Thread view: 
Huzefa - 20 Aug 2004 15:02 GMT
I am trying to make a simple HelloWorld taglib. I am using Tomcat
5.0.27
and Ant 1.6.1 to compile the project.

The compilation goes fine, and I have created my web.xml and
taglibDemo.tld
file. The package is WAR file and I put this in the webapps directory.

When I try to view the JSP page from my browser, I get the error

C:\jakarta-tomcat-5.0.27\work\Catalina\localhost\taglibDemo-0.1-alpha\org\apache\jsp\index_jsp.java:91:
cannot resolve symbol
symbol  : class HelloWorldTag
location: class org.apache.jsp.index_jsp
   HelloWorldTag _jspx_th_test_hello_0 = (HelloWorldTag)
_jspx_tagPool_test_hello_nobody.get(HelloWorldTag.class);

It says that it cannot resolve my class HelloWorldTag. The class file
for this tag is in the /WEB-INF/classes directory.

The taglibDemo.tld and web.xml files are very simple and I created
them
from the ones given in the tutorials.

Isn't Tomcat supposed to look for my .class file in the
/WEB-INF/classes
directory? Or am I supposed to explicitly specify the location of my
*.class file?

Any help is much appreciated.

Huzefa
Chris Smith - 20 Aug 2004 16:04 GMT
> When I try to view the JSP page from my browser, I get the error
>
[quoted text clipped - 4 lines]
>     HelloWorldTag _jspx_th_test_hello_0 = (HelloWorldTag)
> _jspx_tagPool_test_hello_nobody.get(HelloWorldTag.class);

You need to put your tag implementation in a package.  In fact, all code
you write should be in a package.

Signature

www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation



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.