So, I have been researching struts-tiles for an existing java/jsp web application I am currently working on. I have found several sources on how to install/enable struts-tiles and they are all a little different. Here's what I have done so far:
Apparently in the version I downloaded from apache.org the .zip file has a struts-tiles-1.3.10.jar file which I placed in the /WEB-INF/lib folder of our application. Hopefully I am so far so good. What I am having trouble with is how to reference the struts-tiles tab library on my JSP pages. I've seen two ways to do this:
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %> OR <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
My dilema is I am not sure how the server on which our application runs would react to a uri reference to an outside server and there is no file under /WEB-INF called struts-tiles.tld. In the /WEB-INF folder we do have .tld files for struts - bean,html,logic,nested. Where do I find the file struts-tiles.tld. As mentioned the .zip file only had a struts-tiles-1.3.10.jar file but didn't contain a struts-tiles.tld.
Any help to resolve this would be greatly appreciated.
Joined: Mar 21, 2012
In addition to this, I just attempted to start my application and received an HTTP 404 Servlet action not available ERROR. Once I removed the <plug-in></plug-in> entry from the struts-config.xml the application worked fine. I am pretty new to apache struts only having worked with it here and there for the past month and a half. Very confused at the moment.
When I have done this long back, I got the tld from the jar I downloaded. I still have the download and the location of it as I see is struts-1.3.10-all\struts-1.3.10\lib\struts-tiles-1.3.10.jar\META-INF\tld\struts-tiles.tld. I dropped this in the WEB-INF and had the URI to point the same location and it worked like charm.
Later if you still have troubles with this, post the exception stack trace from your server log (something like 'HTTP 404 Servlet action not available' doesn't lead us in any direction). Also look into this post for the steps I followed.
Have Fun with Java
little,little.. little by little makes a lot..
Joined: Mar 21, 2012
thanks for posting a response. The day followig this post I figured out what I did was downloaded the wrong zip file. Instead of the Full Distribution I downloaded just the jar files. Your response is exactly what I did finally and it worked. I forgot to return and post a response since we did an update and all heck broke lose :-D.