Kalidha kani

Greenhorn
+ Follow
since Dec 23, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kalidha kani

Actually I am doing this in one of my server codes.
From my custom tag library class i got the pagecontext object.Based on some condition I am forwarding it to corresponding servlets. My problem is in my servlet calss I am not able to access the values I set. wat am i doin wrong?
10 years ago
Hi all,
I am trying to forward a request using "RequestDispatcher". I have JSP pageContext object. I tried to forward my request to my servlet "MyServlet" using the following code. I set some attributes in my request and forwarded it. But i am not able to access those variables in my servlet class.

My code :
pageContext.getRequest().setAttribute("AValue","A");
pageContext.getRequest().setAttribute("BValue", "B");

RequestDispatcher rd = pageContext.getRequest().getRequestDispatcher("/MyServlet");
rd.forward(pageContext.getRequest(),pageContext.getResponse());

Help me. Thanks in advance.



10 years ago