aspose file tools*
The moose likes Servlets and the fly likes RequestDispatcher.include throwing NullPointerException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "RequestDispatcher.include throwing NullPointerException" Watch "RequestDispatcher.include throwing NullPointerException" New topic
Author

RequestDispatcher.include throwing NullPointerException

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi

I am having a JSP file in which i am doing



I am geting this value Before Including The servlet printed but after that it throws me a NullPOinterException at rd.include(request,response) .Please let me the reason why this is happening ??

Thank you.


Save India From Corruption - Anna Hazare.
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
if /MyServlet does not exist as a mapping, the RequestDispatcher will be null.


JDBCSupport - An easy to use, light-weight JDBC framework -
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

This exists i have mentioned this in web.xml .

Any suggestions please .
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Could you post the corresponding web.xml code ?
Mathew Lee
Ranch Hand

Joined: Jun 08, 2009
Posts: 238
seems to be issue within the configuration file
 
 
subject: RequestDispatcher.include throwing NullPointerException
 
Similar Threads
Servlet RequestDispatcher Problem
Problem in using SimpleStream example with jsp
ReequestDispatcher include()
RequestDispatcher - getting access to the returned html
asynchronous inclusion of jsp pages using include directive and RequestDispatcher