Oops forget my answer, I did not read well enough the question in the first
instance, sorry.
Fr.

-----Original Message-----
From: Rey Francois 
Sent: 02 July 2001 18:56
To: '[EMAIL PROTECTED]'
Subject: RE: jsp vs do


Probably because you want to remain faithful to the MVC approach: only the
controller should decide where to dispatch a request. Linking JSPs together
directly can lead to a spaghetti mess. What you want is one central point
where the request dispacthing is done (the ActionServlet) so you can easily
change it later on for all pages containing a certain request. This is why
is's better to go through the ActionServlet (using .do instead of .jsp).
Your login.jsp may not need some pre-processing logic at present, but in the
future you may have the requirement to do so later on, in which case you
need an Action and a mapping in struts-config.xml (the MVC approach
recommends that you do not put such logic directly in the login.jsp itself).

Fr.

-----Original Message-----
From: Bob Byron [mailto:[EMAIL PROTECTED]]
Sent: 02 July 2001 18:56
To: struts-user
Subject: jsp vs do


I am still in the early stages of understanding struts
and would like to know a bit more about the jsp vs do
extensions.  In looking at the index.jsp page of the
struts-example, you see two links.  
"Register with the MailReader Demonstration
Application" links to editRegristration.do (***DO***)
"Log on to the MailReader Demonstration Application"
links to login.jsp (***JSP***)
Why was the register page linked to a "do" instead of
a "jsp" page?  Why was the login page linked to a
"jsp" instead of a "do"?  I do understand that the
"do" takes you through the struts actions, but don't
understand why the login link was set to login.jsp
instead of login.do initially.  (I am not asking
"What" it does so much as I am asking "Why" was the
decision made to do it that way.)

Thank You,
Bob Byron



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

************************************************************************
The information in this email is confidential and is intended solely
for the addressee(s).
Access to this email by anyone else is unauthorised. If you are not
an intended recipient, you must not read, use or disseminate the
information contained in the email.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Capco.

http://www.capco.com
***********************************************************************

Reply via email to