According to the tutorials for Struts 2 I've come across, including the following line at the top of a given JSP will properly load the tag library:
The tag library is stored at "struts2-core.jar / META-INF / struts-tags.tld". My server, running JBoss 4.2.3 cannot find this file and throws the exception:
org.apache.jasper.JasperException: File "/struts-tags" not found error
The temporary solution, which seems to resolve the issue, is to extract the struts-tags.tld to the WEB-INF folder than change the call in the JSP to:
The problem is, this seems to go against every example I've seen, so I'm wondering if I'm doing something wrong such that my server cannot find and load the TLD file inside the jar. I can't imagine everyone using JBoss and Struts2 has had to do this therefore I'm assuming something's wrong with my Struts setup.
UPDATE: I did a test using the simplest possible configuration and I think the issue might have been that of Eclipse, not struts nor JBoss. I was adding my shared libraries into the EAR (not the WAR) and using Eclipse to establish the runtime dependencies by going to the WAR's "(Project Properties) --> J2EE Module Dependencies". It worked for resolving the runtime class-path (never got class not found error) but not for finding the TLD file. When I opened the EAR/WAR that Eclipse created manually, there wasn't anything in the WEB-INF\lib folder.
When I copied the struts-core jar file directly into the WEB-INF/lib folder instead of the EAR, all the issues went away. Guess I added another argument for why build scripts are better than IDE's any day of the week.
Joined: Apr 09, 2009
have you solved it?
I've put all the libraries inside the Jboss lib but it doesn't work anymore.
I'm looking for a solution but it's seems to be impossible to do.