Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 326963

Summary: NPE when running Servlet on server if <servlet-class> is not defined
Product: [WebTools] WTP Java EE Tools Reporter: Jason Peterson <jasonpet>
Component: jst.j2eeAssignee: Jason Peterson <jasonpet>
Status: RESOLVED FIXED QA Contact: Chuck Bridgham <cbridgha>
Severity: normal    
Priority: P3 CC: ccc
Version: 3.2Flags: cbridgha: review+
Target Milestone: 3.2.2 P   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch ccc: iplog+

Description Jason Peterson CLA 2010-10-04 15:05:47 EDT
Created attachment 180197 [details]
patch

If servlet-class is not defined in the web.xml a NPE is being thrown when attempting to run the servlet on the server.  This occurs when running the actual servlet's Java resource file or if attempting to run using the Server model object node shown in the explorer view.  

Fix is to check for the null condition.
Comment 1 Chuck Bridgham CLA 2010-10-04 21:29:45 EDT
approve - now that we expose using a jsp mapping, we need to protect this code
Comment 2 Carl Anderson CLA 2010-10-09 08:30:40 EDT
Committed to R3_2_2_patches