File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

taglib uri failing me

 
Santiago Conde
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all

I'm trying to make a minimal application using Struts. Right now I'm having problems with the Struts taglibs. I'm working with Struts 1.2.4, Tomcat 4.1.29 and I'm a bit confused about how are the taglibs configured.

When I try to access to the entry page I get the following exception:



If I understood the documentation right, there's no need to write the <taglibs> elements in the web.xml descriptor, just using the directive inside every .jsp you need. I did so in my entry page



I also have the tlds in the path "/WEB-INF/tlds/struts-html.tld", although I think that this should not be necessary.

Any idea about this error?

Thanks in advance
Santi
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try specifying the taglib in the format:

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
[ May 09, 2005: Message edited by: Merrill Higginson ]
 
Santiago Conde
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Merrill

The change you suggested works well, but now I have problems with the path of my classes:
but I have that class inside a .jar archive in /WEB-INF/lib/TestStruts.jar. I have verified that using the command
(by the way, I'm not able to configure Ant to build the bundle with the first letter in lower case, but that's just a little detail).

As far as I know there should be no problem with that path since the classes are scanned inside both /WEB-INF/classes and /WEB-INF/lib paths.

Thanks for your response and your time
Santi
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't really know why Tomcat isn't finding this class. Are you positive the .class file is in the jar and not just the .java file? Try un-jarring it and putting it in the classes folder and see if it works.
 
Santiago Conde
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Merrill

I had the same idea and tried it without success. It's weird.

I guess I'll have to do some investigation about that. The access permissions are right, the paths seem right, I don't have any duplicates which could confuse the class loader´┐Ż Well, in this time zone is very late to do anything more. Perhaps my bed could give me some hints.

If I discover the source of the error I'll post it later.

Thanks again
Santi
 
Santiago Conde
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Going on with the research, I created a standard servlet (not controlled by Struts) and instantiated an EmpregadoForm object. It worked fine.

In addition to that, I implemented a main() method within the EmpregadoForm class and made a test from /WEB-INF/lib directory (I added /WEB-INF/lib/testStruts.jar to the CLASSPATH in a new terminal). It worked fine too. So, I'm running out of ideas.

Perhaps an initialization issue with the controller servlet?

Following is my struts-config file, for the sake of information.

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic