Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1183897

Summary: WebServlet.loadOnStartup=0 doesn't startup the servlet
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Heinz Huber <heinz.huber>
Component: WebAssignee: Tomas Hofman <thofman>
Status: CLOSED WONTFIX QA Contact: Radim Hatlapatka <rhatlapa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: heinz.huber, thofman
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-27 09:01:15 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Sample application none

Description Heinz Huber 2015-01-20 06:46:44 UTC
Created attachment 981738 [details]
Sample application

Description of problem:
According to the spec, any value >= 0 should result in the servlet being loaded on startup.
* 0 doesn't work
* 1 works


Version-Release number of selected component (if applicable):
6.2.0-Final


Steps to Reproduce:
1. Create a servlet with the following annotation:
@WebServlet(name="...", loadOnStartup=0, urlPatterns="/...")

2. Start application


Actual results:
Servlet is not loaded on startup.


Expected results:
Servlet should be loaded on startup.


Workaround:
Use any value >= 1.


Additional info:
Our reference: JRAPSOA-331

Attached a small sample app showing the problem.
It prints "====> Initialized Servlet0: false" on startup.
This should be the following two lines:
====> Initializing Servlet0
====> Initialized Servlet0: true

Comment 1 JBoss JIRA Server 2015-01-20 06:48:25 UTC
Heinz Huber <heinz.huber> updated the status of jira JBEAP-82 to Closed

Comment 2 JBoss JIRA Server 2015-08-07 14:02:23 UTC
Tomas Hofman <thofman> updated the status of jira WFLY-5070 to Coding In Progress

Comment 3 Tomas Hofman 2015-08-10 11:11:27 UTC
Upstream PR: https://github.com/wildfly/wildfly/pull/7913

Not merging to EAP since there is no customer case.