I am looking to try some development in Strust 2 (2.1.6) with Hibernate 3 (3.3.2)
I have found a simple Struts2 example but when I create it and run it on Apache 6 I get the following error:
org.apache.jasper.JasperException: File "/struts-tags" not found
I have the following JSRs in the WEB-INF/lib folder and the struts-tags.tld is in the struts2-core-2.1.6.jar/META-INF as you would expect, but my app can not see it
lib:
- commons-logging-1.0.4.jar
- freemarker-2.3.13.jar
- hibernate3.jar
- mysql-connector-java-5.0.5-bin.jar
- ognl-2.6.11.jar
- struts2-core-2.1.6.jar
- xwork-2.1.2.jar
Any reasons why?
Cheers in advance
KS
-----
Just an update...
I can get this working if I drop the struts-tags.tld into the WEB-INF folder, but then I get a
org.apache.jasper.JasperException: /struts/WEB-INF/pages/displayEmployee.jsp(10,31) Unable to load tag handler class "org.apache.struts2.views.jsp.PropertyTag" for tag "s:property"
error, so it would seem my app can not see the struts2-core-2.1.6.jar at all!
Ranveer K Kumar wrote:did you check web.xml for proper tag defination..
That's not required as the container looks inside jars for tld files.
You said that the jars (including commons jars that David pointed out) are in /struts/WEB-INF/lib folder. You wrote /webapp/WEB-INF/lib but earlier you said the project folder name was struts. Please confirm this and that the commons jars are also in the lib folder...
Ranveer K Kumar wrote:did you check web.xml for proper tag defination..
That's not required as the container looks inside jars for tld files.
You said that the jars (including commons jars that David pointed out) are in /struts/WEB-INF/lib folder. You wrote /webapp/WEB-INF/lib but earlier you said the project folder name was struts. Please confirm this and that the commons jars are also in the lib folder...
Sorry, the webapp name is 'struts', I was beign generic when I wrote webapp.
The app is called 'struts' under it I have the /WEB-INF/lib folder, which has the JARs listed above including the two extra ones Dave mentioned. The TLD is in the struts2-core2.1.6.jar under /META-INF
I have the taglib directive of
<%@ taglib prefix="s" uri="/struts-tags" %>
My understanding from the example is that Struts2 will automatically look through the JARs for teh matching .tld file.