Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326963 - NPE when running Servlet on server if <servlet-class> is not defined
Summary: NPE when running Servlet on server if <servlet-class> is not defined
Status: RESOLVED FIXED
Alias: None
Product: WTP Java EE Tools
Classification: WebTools
Component: jst.j2ee (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2.2 P   Edit
Assignee: Jason Peterson CLA
QA Contact: Chuck Bridgham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-04 15:05 EDT by Jason Peterson CLA
Modified: 2010-10-09 08:30 EDT (History)
1 user (show)

See Also:
cbridgha: review+


Attachments
patch (1.53 KB, patch)
2010-10-04 15:05 EDT, Jason Peterson CLA
ccc: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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