Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
m pa
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a Tiles Plugin bundled with Struts 2. If you copied different version of Tiles into your project there may likely be conflicts.
 
m pa
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9280
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic