Skip to Content.
Sympa Menu

mace-opensaml-users - RE: velocity templates location

Subject: OpenSAML user discussion

List archive

RE: velocity templates location


Chronological Thread 
  • From: "Paul Hethmon" <>
  • To: <>
  • Subject: RE: velocity templates location
  • Date: Fri, 26 Jan 2007 07:06:01 -0800

Chad,

I've got it working now. First, I've manually copied "templates/*" over
to my WEB-INF/classes directory and now the velocity resource loader
finds them, so that was the base problem I had.

So two things I modified to make this work:

1. Add to build.xml a definition of

<property name="core-templates.dir" value="@{basedir}/src/templates"
/>

And put into the package target:

<zipfileset dir="${core-templates.dir}" prefix="templates" />

That got the templates into the jar, so no more manual copying to
Tomcat.

2. The other thing that threw firefox when trying this was that the
velocity engine output a file with a blank line before the xml
declaration. Firefox threw a parsing error instead of doing the
auto-submit. To fix this, I simply commented out the empty line before
the xml declaration in the template (saml2-post-binding.vm).

So now on to get my idp to accept the AuthnRequest.

Thanks,

Paul



-----Original Message-----
From: Paul Hethmon
[mailto:]

Sent: Friday, January 26, 2007 8:56 AM
To:

Subject: RE: velocity templates location

Chad,

I've got velocity 1.5 beta 2 in the lib directory, however I put 1.4 in
app build. I just changed that to the 1.5 beta 2 and I'm still seeing
the same behavior. Now one thing I'm not sure of, is where those
templates should be located. Should they just be placed on the Tomcat
classpath (given that's my environment)? Are they supposed to be
packaged up in the opensaml.jar file as the schemas are? The build.xml I
have does not do that. From the velocity.log file, it looks like I might
be missing another jar file, so I'll track that down and let you know if
it works.

Thanks,

Paul

-----Original Message-----
From: Chad La Joie
[mailto:]
Sent: Friday, January 26, 2007 8:40 AM
To:

Subject: Re: velocity templates location

Paul,
Can you confirm that you have the latest code from SVN, specifically
that it's velocity 1.5 beta 2 in the lib directory? The was, what I
consider, a bug in Velocity 1.4 that prevented it from finding
templates, on the classpath, that whose path started with "/".

Paul Hethmon wrote:
> In using the HTTPPostEncoder class, the encode method is using
> Velocity to build the output page. While I see the templates in the
> source, I don't see that the build process does anything with them. I
> am not familiar with Velocity and my initial reading of the
> documentation has not helped yet (plus the Velocity website is about
half broken).
>
> Should these be packaged up in the opensaml build? Is this a part not
> quite ready yet?
>
> thanks,
>
> Paul
>
> *Paul Hethmon*
> *Chief Software Architect*
> Clareity(tm) Security
> SAFEMLS(tm) Security Education, Consulting and Solutions
> http://www.SAFEMLS.com <http://www.safemls.com/>
>
>
> <mailto:>
> work: 865.769.0456
> cell: 865.250.3517
>
>

--
Chad La Joie 2052-C Harris Bldg
OIS-Middleware 202.687.0124



Archive powered by MHonArc 2.6.16.

Top of Page