Question about velocity: using VelocityView

Karla Borecky kborecky at smith.edu
Wed Oct 12 12:53:41 EDT 2016


I would potentially like to be able to access cookie values in my login.vm,
and it looks like the CookieTool
(org.apache.velocity.tools.view.tools.CookieTool) would be the easiest way
to do this.

However, those view tools don't seem to be included in the velocity-1.7.jar
file. So...it seems unlikely I could just add this into my
edit-webapp/WEB-INF/lib directory. I don't see any reference to velocity in
the web.xml to begin with, so I don't see where I can do the sort of setup
described on this page:

https://velocity.apache.org/tools/1.2/view/index.html#Installation

In the end, what I'm looking into doing is display a personalized image and
phrase for the user based on cookie values - but I don't want the cookie
names to be visible (as it would be if you used javascript to do this.)
Originally, I thought of storing this info with the person's ldap account,
but that would require looking them up - making the login (or at least
displaying the image) a two step process. (Unless I used some sort of
javascript magic looking for them to finish typing in their userid and then
displayed the image...but that might be beyond me.)

I am looking to thwart the phishing *&*!!#@'s who have grabbed our login
screen image. But this all depends on being able to access the cookies in
velocity templates - thus the question.

-- 
Karla Borecky
Systems Administrator
ITS
Smith College
Northampton, MA 01063
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shibboleth.net/pipermail/users/attachments/20161012/55aa018f/attachment.html>


More information about the users mailing list