The performance costs are low, but using an action just to forward to different views does have a very small performance cost. Run a stress test and you'll see.
The benefits however of doing everything via actions, far outweigh the slight performance hit. You can start to think about your app in an event based way. /save.do, /delete.do rather than the names of the view's file name.
Cheers Mark
On Saturday, October 25, 2003, at 06:09 PM, Simon Matic Langford wrote:
it helps (a little).
what i don't want is users bookmarking a jsp, which would then allow them to
break MVC. however, isn't going via the forwardaction a little inefficent
compared
to linking direct to the jsp (my target environment is 2000 concurrent
users)? or
do you think the benefits of keeping to MVC might outweigh that?
thanks for your help so far
simon
-----Original Message----- From: Geeta Ramani [mailto:[EMAIL PROTECTED] Sent: 25 October 2003 18:59 To: Struts Users Mailing List Subject: Re: going straight to a jsp
Hi Simon:
I think maybe you have misunderstood what it means to say "don't directly
go to jsps". What this means is don't break the MVC pattern. So for
example, if you have a link on your jsp and all you want it to do is to go
to a second jsp, resist the temptation to code the second jsp directly
using that as your href value. Instead respect the MVC design and use the
fowardAction that Struts already has. This way you are always going to the
controller (the ActionServlet) to find out where to go next. So, adding a
"redirect=true" in your mappings is not a bad thing really (unless you want
to preserve request attributes.. but that's another story..:)
hth, Geeta
Simon Matic Langford wrote:
Hi,
I've been using struts for a couple of months now, and have been working on the assumption that it is a bad thing to allow users to go directly to jsp's. So I have ensured that I don't use redirect="true" on forwards from an Action.
Is this considered best practice for Struts? And are there any concrete
reasons for or against this practice?
Thanks
Simon
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

