I was not referring to Struts . We have something like PageContext in the
JSP . which we use to set some information using setAttribute method in
either Request scope or  Session scope . Instead same could have done with
the
request.setAttribute( "key" val) or session.setAttribute("key" , val ) .
My question was why we have not provided with few implicit objects like
session , out etc.. in the Servlet's ???
Why this concept came only in JSP ? .

Suhas



----- Original Message -----
From: Ted Husted <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 23, 2001 4:43 PM
Subject: Re: Basic Question in Servlet/JSP ?


> If you're referring to the PageContext that is available when you are
> rendering the view, the answer would be because it doesn't exist yet ;-)
> The Struts ActionController (a servlet) calls an Action (not a servlet),
> and may eventually forwards to a JSP (another servlet). The PageContext
> for the JSP isn't available until it is called. The mechanism for
> carrying information between HTTP forwards is the HttpServletRequest, or
> the session to carry it between requests.
>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 737-3463.
> -- http://www.husted.com/about/struts/
>
>
> > suhas wrote:
> >
> > Hi
> >
> > The PageContext instance gives us access to implicit objects in the
> > page
> > .This is used mainly in JSP . Why Can't we have something in the
> > Servlet
> > ?
> > Why to directly use HttpServletRequest , HttpSession in the Servlet ?
> > Better can't we get this from the container specific implementaion
> > something like PageContext in the Servlet too? .
> >
> > Regards
> >
> >
>

Reply via email to