This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hi, I'm trying to pass a request, whose parameters are stored in a bean, to a servlet via: <jsp:forward page="servlet/.../"> The bean has a scope of "session" but when I try to retrieve the request attributes from the servlet I get null, when I know there are objects stored in the request. How can I make the servlet recognize the session and it's request objects?
The bean has a scope of "session" but when I try to retrieve the request attributes from the servlet I get null, when I know there are objects stored in the request. When you are putting the beans on the session, why are you looking on the request? Am I reading wrongly? I am not clear, the way it is stated, could you please clarify. regds. - satya
In all probability you are putting into the request parameters and trying to read attributes. This is the most often confused case with me. Make sure that you are reading the parameters with request.getParameter("parameterName") and NOT request.getAttribute("parameterName"). If this doesnt solve...shed some more light on the issue. cheers, mpr
Joined: Jul 18, 2001
I should not have mentioned the beans. The problem is that I am trying to pass a request to a servlet and the servlet says the request object is null.
Joined: Jun 03, 2000
Ummmm....need more data...some code snippent probably.. - satya