Hi Matt,

Matt Raible wrote:


On Jun 22, 2004, at 5:16 AM, Thomas Bednarz wrote:

Hi

Simple newbee question:

I use ONLY Velocity (and Struts) to render my Pages in all of my Web-Apps. No JSPs at all.

All examples I was looking at use a JSP page as starting point with some jsp tags (<menu:useMenuDisplayer ....... </menu:useMenuDisplayer>). Can I use Struts-menu in a VELOCITY ONLY environment without ANY jsp tag library? Are there any pointers about how to configure it and a sample vm file?


No, currently there is no support for using Struts Menu w/o JSPs. Sorry - I wish I new how to do it - but I don't.

Matt

Well I don't know what you are doing in your code. (Did not have the time to download the source) However I think all you can do with JSP's you can also do with Velocity. I kicked out JSPs three years ago because my JSPs where basically Java Files cluttered with HTML and JavaScript code. Today you can use TagLibs to avoid this a little bit. Also JSPs need to be recompiled every time you change the code. Older Java VMs and compilers produced a lot of memory leaks which is the killer of every busy web application. Today things may be better but I will not switch back until I have a REALLY good reason to do so.

The secret of Velocity is, that you can access the contexts of your container (Application, Session and Request) directly in Velocity Macros. I usually have all my data in Servlets and Struts Actions and everything that displays in the browser is rendered by Velocity. Since I don't know what your taglibs are all doing I cannot say what would be required to make this available in Velocity. But I am almost sure there is a way to do it.

Cheers

Tom


Currently I use very ugly HTML tables as menues located in a frame on the top of the pages. All menu entries are dynamically built with Velocity depending on the role of a logged-in user. I like to replace them with CoolMenu 3 type menues it this is possible.


To process my roles I have derived org.apache.struts.action.RequestProcessor and implemented my own processRoles() method. I like to do something similar with struts-menu. Preferably the menu should be 'personalized' to a user depending on the roles he/she has. This should be done dynamically inside a special Struts-Action and rendered by a velocity template, e.g. menu.vm. A static XML File which contains all menu items does not fit my needs since it is not dynamic based on user roles.

Could anybody help me a step further and point me to samples if there are any or tell me what steps I need to do to get this done? Many thanks in advance.

Tom


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
struts-menu-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/struts-menu-user




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
struts-menu-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/struts-menu-user




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
struts-menu-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/struts-menu-user

Reply via email to