That said, if the Action in Struts is like the Modeler in Sapient, then why can't you move behavior into the Action?
Struts is sorely lacking an easy extension point between the Action and the Forward where one might do pre-rendering context manipulation; this was the subject of much discussion over the Summer, but no formal solution has been put in place.
You may want to look into extending the Struts RequestProcessor (http://jakarta.apache.org/struts/api/org/apache/struts/action/RequestProcessor.html) where you may be able to take greater control of the chain of events. However, there are some concerns because RequestProcessor is a concrete class, not an interface -- for example, if you use Tiles you must extend the TilesRequestProcessor, not the base RequestProcessor, and if you want to compose functionality from several RequestProcessors, you really have to go out on a limb.
One area of active development is around the "struts-chain" model which replaces the RequestProcessor with a much more flexible and configurable chain of commands, which might provide you a way to add arbitrary processing in the path between the Action and the view -- you'll have to review the mailing lists (most of the discussion was on struts-dev) and use nightly builds of Struts and the struts-chain library (as well as the commons-chain library... this is real DIY stuff we're talking about; it hasn't been wrapped up into a single ready-to-use package yet)
I'd advise against providing any direct links to JSPs in your app -- if all links go through Struts Actions, then you can write java classes to protect access to the JSPs instead of trying to do it in a tag library.
Hope that helps, at least a little... If you're willing to read the Struts source code and really get an understanding of what's going on, you'll find that it's very flexible and configurable...
Joe
At 10:08 PM +0000 12/18/03, Nehal Dave wrote:
Hi again
Lets say before rendering each JSP page we need to check if the user has rights to access the jsp page. & much more logic needs to be executed before rendering that jsp. How would i able to achive it using taglib or javabean....
Please adivse. Thanks Dave.
From: "Gray, Cameron C." <[EMAIL PROTECTED]>
To: "Nehal Dave" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>
Subject: RE: [Struts-apps] Implementing Model in Struts
Date: Thu, 18 Dec 2003 22:04:32 -0000
Dave,
There isn't a direct translation in Struts. However the best workaround would be to create a Bean or custom tag library to call at the top of each JSP.
Best regards,
Cameron Gray Operations Director, UltraSpeed UK Limited
Tel/Fax: 0800 689 9898 W: www.ultraspeed.co.uk
IBM: Incredibly Belligerent Merketing
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nehal Dave Sent: 18 December 2003 21:33 To: [EMAIL PROTECTED] Subject: [Struts-apps] Implementing Model in Struts
Hi Guys I am using Sapient framework in current project & we want to migrate to Struts.
I have a question regarding model part of the framework.
In our current framework we have "modeler" class like "Action" class in struts which is mapped to JSP(s). Before jsp is executed each time this modeler is executed & we have lot of pre rendering process in it. I am looking for the equivalent or something on this line in Struts. But not finding proper solution. Can u pls enligten me ? :)
Thanks Dave.
_________________________________________________________________ Make your home warm and cozy this winter with tips from MSN House & Home. http://special.msn.com/home/warmhome.armx
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Struts-apps mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/struts-apps
_________________________________________________________________
Working moms: Find helpful tips here on managing kids, home, work � and yourself. http://special.msn.com/msnbc/workingmom.armx
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Struts-apps mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/struts-apps
--
Joe Germuska
[EMAIL PROTECTED]
http://blog.germuska.com
"We want beef in dessert if we can get it there."
-- Betty Hogan, Director of New Product Development, National Cattlemen's Beef Association
------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ Struts-apps mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/struts-apps
