To access the request in a Struts Action, you would reference the
"request" passed to the perform() method. 

    public ActionForward perform(ActionMapping mapping,
                 ActionForm form,
                 HttpServletRequest request,    //  <--- request
                 HttpServletResponse response)

To access the session, you would code 

        HttpSession session = request.getSession();


-- Ted Husted, Husted dot Com, Fairport NY USA.
-- Custom Software ~ Technical Services.
-- Tel 716 737-3463.
-- http://www.husted.com/about/struts/

suhas wrote:
> 
> 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

Reply via email to