aspose file tools*
The moose likes Struts and the fly likes integrating Tiles into Struts 2 project - which jars to I need? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "integrating Tiles into Struts 2 project - which jars to I need?" Watch "integrating Tiles into Struts 2 project - which jars to I need?" New topic
Author

integrating Tiles into Struts 2 project - which jars to I need?

m pa
Greenhorn

Joined: Apr 17, 2013
Posts: 17
I have a Struts 2 project set up with a few jsp that is running well but would like to integrate Tiles into it. I pulled down the jar files from Apache site as below:
asm-3.3.jar
asm-commons-3.3.jar
asm-tree-3.3.jar
commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar
commons-lang3-3.1.jar
freemarker-2.3.19.jar
javassist-3.11.0.GA.jar
log4j-1.2.14.jar
ognl-3.0.5.jar
struts2-core-2.3.4.1.jar
xwork-core-2.3.4.1.jar

Looking at a couple of Tiles tutorial, not surprisingly, additional jars are listed to those above. but the tutorials seem to use older jars than the ones I have.

My question is what jars do I need for Tiles to be compatible with the above?

I had taken Tiles Jars from Apache site but my app failed to deploy on JBoss ( was getting classNotFopundException - yet the class was there - googling indicates jar versions mismatch).
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8705
    
    6

There is a Tiles Plugin bundled with Struts 2. If you copied different version of Tiles into your project there may likely be conflicts.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
m pa
Greenhorn

Joined: Apr 17, 2013
Posts: 17
Thank you for repsonse. I do not see mentioned on the page how to get the plugin jar but a search for "struts 2 tiles plugin" takes me to:
http://mvnrepository.com/artifact/org.apache.struts/struts2-tiles-plugin/2.3.14

there are various versions of the jar plus it mentions:

so I understand that as saying there there are other jars needed?

the tiles tutorial I referred to before shows these jars:

now when I got those jars, exact same versions, my action class was not getting called and I could not see any logger information giving the reason as to why.

So I went back to my working Struts 2 project, jars shown below, and the "missing jars", but later versions namely tiles* , commons* etc but the app failed to deploy on Jboss due to classNotFoundException that I presume is jar version mismatch..... hence why I am asking about the jars and version I need for my project.

My Struts 2 project currently contains:



So it appears that I need the following, but which versions ???


Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8705
    
    6

The page I linked to above says:

Installation
This plugin can be installed by copying the plugin jar into your application's /WEB-INF/lib directory. No other files need to be copied or created.


So go to wherever you unzipped your Struts distribution, look in the lib directory and copy the struts-tiles-plugin JAR file into your web application
m pa
Greenhorn

Joined: Apr 17, 2013
Posts: 17
Well, I am not convinced that only struts-tiles-plugin jar is needed; info. on web says otherwise.

Anyway here are the jars I am using with struts2 and tiles 2 without any exceptions It is likely asm are not needed (not investigated into what happens if they are not present), likewise velocity not strictly necessay if you can lieve with velocity exceptions.

 
wood burning stoves
 
subject: integrating Tiles into Struts 2 project - which jars to I need?
 
Similar Threads
Chain-config in core struts and Tiles in Struts 1.3
Struts2 Jar Dependencies
Running unit tests and getting NoSuchMethodError: javax.persistence.OneToMany.orphanRemoval()Z
stupid 404 in setuping struts 2 project
Struts Simple Application with HTTP Status 500 Error