Bug 1183897 - WebServlet.loadOnStartup=0 doesn't startup the servlet
Summary: WebServlet.loadOnStartup=0 doesn't startup the servlet
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Web
Version: 6.2.0
Hardware: All
OS: All
unspecified
low
Target Milestone: ---
: ---
Assignee: Tomas Hofman
QA Contact: Radim Hatlapatka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-20 06:46 UTC by Heinz Huber
Modified: 2015-08-27 09:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-27 09:01:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Sample application (16.60 KB, application/zip)
2015-01-20 06:46 UTC, Heinz Huber
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEAP-82 0 Major Closed WebServlet.loadOnStartup=0 doesn't startup the servlet 2015-08-27 09:00:52 UTC
Red Hat Issue Tracker WFLY-5070 0 Major Resolved @WebServlet.loadOnStartup=0 doesn't startup the servlet 2015-08-27 09:00:52 UTC

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.


Note You need to log in before you can comment on or make changes to this bug.