This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Doubt in forward(request,response) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Doubt in forward(request,response)" Watch "Doubt in forward(request,response)" New topic
Author

Doubt in forward(request,response)

ChakraPani Margani
Greenhorn

Joined: Aug 19, 2007
Posts: 17
Hi,
I am working in RAD 7.0.
In my servlet I am using

getServletConfig().getServletContext().getRequestDiapatcher("abc.jsp").forward(request,response);

My problem is servlet executed with remaining lines even I call the above forward method...

I want to forward to some Jsp at the starting of servlet based on some condition..

But servlet is totally executed even I call this forward at the starting...

Can anybody help me to solve the above problem..

Regards,
ChakraPani.M
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Doubt in forward(request,response)
 
Similar Threads
HELP! Problems with Buffer/Response Committed
Ajax and servlet problem
What is allowed after forward() ?
Jsp code doubt