Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

request.setAttribute() - servlet, request.getAttribute() - jsp

807589Jul 18 2006 — edited Sep 18 2008
Hi all,

I know it's been writter all over but I cannot find a concrete explanation of what is happening.

Here is the thing:
I have a <form> from which I call a servlet.

In servelet I do this:
request.setAttribute(result, "Hello Java");
than I redirect to another jsp page, let's call it index.jsp

index.jsp has:
request.getAttribute( result); //i think this is the correct syntax

this returns null, why?

Thank you
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2008
Added on Jul 18 2006
8 comments
45,592 views