struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Why should you call JSP pages directly?
Date Fri, 02 Mar 2001 18:24:50 GMT
Jens Rehpöhler wrote:

> Hello Craig,
>
> "Craig R. McClanahan" wrote:
>
> > * What about bookmarks?  You have to be ready for the fact that users
> >   are going to *try* this, even if you do not want them to.  Alternatives have
> >   been presented to protect JSP pages from this kind of access.
>
> I think with a clean design you can even allow bookmarking of your actions (*.do), though
it could make things much more complicated :-)
>
> > * If you are switching from one view to another view (with no model manipulation),
> >   I cannot see that much difficulty in linking from one JSP page directly to
> >   another, but this is not particularly common.
>
> This is a really good example, which answers my question. But should you really allow
this, if you think about the problems of bookmarking pages
> as you mentioned above? All in all it seems to be a kind of philosophy if you use links
to your JSPs or not.
>
> I will stay at my "restrictive" use of the MVC pattern and will not use direct links
to the JSP's of the web application. One advantage is, that
> you can easily change the pages to forward to in the struts-config.xml or dynamically
in the perform() method without changing any links in your
> application, and the bookmarks a user had set can't get broken by changing the JSP.
>

Don't get me wrong -- I agree with your preference for always going through the controller.
 I just wanted to point out that there was a legitimate
use case where bypassing it would not cause problems.  But, as you point out, that relates
to how the application creates hyperlinks to itself, not
to what the user does.

>
> Jens

Craig



Mime
View raw message