on 11/1/00 1:31 PM, Bill Pfeiffer at [EMAIL PROTECTED] wrote:

> Are you using the request dispatcher to pass the servlet request to the jsp?
> I do this all the time, setAttribute in the servlet (controller), call
> forward() to forward the request to the jsp, and do request.getAttribute().
> 
> Servlet:
> 
> RequestDispatcher rd;
> req.setAttribute("attr1", "hello");
> rd = getServletContext().getRequestDispatcher("jsp/MyJsp.jsp");

odd, getServletContext() returns null for me....saw that one in the archives
too...the answer was to use request.getRequestDispatcher(url)

> rd.forward(req, res);
> 
> MyJsp.jsp:
> 
> <%= request.getAttribute("attr1")%>
> 

otherwise, that is what i am doing...

Reply via email to