>>>>> "Anuj" == Anuj Agrawal <[EMAIL PROTECTED]> writes:

    Anuj> Also, did you really mean that the welcome jsp would forward to the first
    Anuj> "action", and not redirect to the first "action"?  I.e. is it <jsp:forward
    Anuj> page=".."/> or <c:redirect url=".." /> .. The forward appears to be a better
    Anuj> option since the URL in the browser doesn't change.

The answer, of course, is that it depends.  Once you understand the difference
between forward and redirect, you have to decide based on what you want your
application to do.  In some cases, you DO want the browser URL to change.  I
don't think it's likely in this situation, however.

    >> -----Original Message-----
    >> From: Karr, David [mailto:[EMAIL PROTECTED]]
    >> 
    >> A common pattern is to have your welcome file be a jsp that does
    >> nothing but forward to your first "action".
    >> 
    >> > -----Original Message-----
    >> > From: Anuj Agrawal [mailto:[EMAIL PROTECTED]]
    >> >
    >> > Is it accurate to say that we should never invoke a JSP file
    >> > directly?  It
    >> > should always be forwarded to from some servlet?
    >> >
    >> > What if my first page (say, index.jsp) of my web app has some db query
    >> > results being displayed, is the "right" way to make it so
    >> > that my first page
    >> > is a servlet and after doing all the db stuff, it forwards to
    >> > the index.jsp?
    >> >
    >> > If that's true, then is there a way to configure the web app
    >> > (guessing via
    >> > web.xml) so that the welcome file is a particular servlet?

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to