struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Gilday" <>
Subject Re: Velocity dependency
Date Mon, 24 Sep 2007 15:30:32 GMT
Hi Leon,
Sorry I think I wasn't clear.  I do not wish to use Velocity, all my
views are Freemarker or JSP based.  I have found that it seems to be the
Struts2 Sitemesh plugin that causes problems.  As soon as I declare it
then I get NoClassDefFound problems until I manually add the Velocity
dependencies?  Are they needed to run the Sitemesh plugin?  They are
marked as optional in the plugin POM and I would rather not have to
include them.


----- Original message -----
From: "Leonidas Papadakis" <>
To: "Struts Users Mailing List" <>
Date: Mon, 24 Sep 2007 17:38:16 +0300
Subject: Re: Velocity dependency

Hi there,

i had to do the following things in order to add full velocity support. 
The issue is that in struts2 even if you have to parse a velocity file, 
it has to be a result of an action. So in order to be able to parse 
velocity files even if they are not result of an action :

Add the following to web.xml:



    <!-- if you want another file mapping -->

Add the following jar files to lib folder :




Martin Gilday wrote:
> I am porting a WebWork application over to Struts2.  I have added a
> dependency to struts2-core to my Maven POM.
> <dependency>
>   <groupId>org.apache.struts</groupId>
>   <artifactId>struts2-core</artifactId>
>   <version>2.0.9</version>
> </dependency>
> In my struts.xml I extend struts-default.  When I try and start my
> application I get a ClassDefNotFoundException.  Is Velocity required
> when extending struts-default?  This was not the case in WW where
> Freemaker was always the default.  If it is required is there a reason
> it is not a dependency in the struts-core POM?
> 2007-09-24 13:14:06.993::WARN:  Error starting handlers
> java.lang.NoClassDefFoundError: org/apache/velocity/app/VelocityEngine
>         at java.lang.Class.getDeclaredFields0(Native Method)
>         at java.lang.Class.privateGetDeclaredFields(
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message