Hi all,

I'm watching this list quite a while and wondered why so
many people try to call there JSP pages directly from the
browser. In my understanding of the MVC pattern all requests

to your web application must be handled from the controller
servlet (ActionServlet). The only JSP page which could be
called directly is the start page of your application, in
most cases called index.jsp.

By calling the JSP directly you don't seperate the view
completly from the logic. One bad example is the
struts-example application. Here, the user authentication is

done in every JSP page by a tag called <app:checkLogon/>. In

my opinion the user authentication is absolutly LOGIC and
not VIEW. So it should be handled in the controller
(ActionServlet).

Other problems mentioned in this list are forms with
predefined values, which can't be handled without an Action
wich populates a bean. I think this isn't a "bug" but a
feature. Here you are forced to use the MVC pattern.

Maybe I'm a bit to restrictive in the use of the MVC
pattern, so I'm very pleased to here why it is a good idea
to call your JSP directly without a call to the
ActionServlet.

Jens


Reply via email to