File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Problem with RequestDispatcher
Joined: Feb 01, 2005
Jun 27, 2005 00:33:00
Hi to ALL
Friends i have some problem regarding RequestDispatcher
on the base of code i am forwarding my message to another
and i use code
req.setAttribute("message","No Record Found");
RequestDispatcher rd = req.getRequestDispatcher("../Error.jsp");
but when i run servlet this give Java.lang.NullPointerException on line rd.forward(req,res);
ie show rd is null;
it happens only first time and when i refresh the page it gives me proper output.
Please tell me why is this giving
at first time and how could i prevent it.
Joined: Aug 15, 2004
Jun 27, 2005 06:27:00
RequestDispatcher rd = req.getRequestDispatcher("/Error.jsp");
I agree. Here's the link:
subject: Problem with RequestDispatcher
Login page not completely loading after RequestDispatcher.forward is used
IllegalStateException occur with RequestDispatcher
Method call with Parameter
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015