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

Bug 1151478

Summary: [EAP 6.4.0] undefining welcome-file and reloading doesn't reset the welcome-file setting to default
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Radim Hatlapatka <rhatlapa>
Component: WebAssignee: jboss-set
Status: CLOSED CURRENTRELEASE QA Contact: Michael Cada <mcada>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.4.0Keywords: Reopened
Target Milestone: DR6   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: dr4:bug
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-19 12:43:59 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:

Description Radim Hatlapatka 2014-10-10 14:24:50 UTC
Description of problem:
When you set welcome-file and then try to undefine it, it remains the same till server restart (reload is not enough) instead of being redefined to defaults

Version-Release number of selected component (if applicable): 6.4.0.DR4


How reproducible: always


Steps to Reproduce:
1. use simple web application with two different html pages (index.html and welcome.html) 
2. access your deployment URL without specifying welcome.html/index.html and see that index.html content was shown
3. set the welcome-file to welcome.html in web subsystem
4. access your deployment URL without specifying welcome.html/index.html and see that welcome.html content was shown
5. undefine the welcome-file attribute in web subsystem
6. again access your deployment URL without specifying welcome.html/index.html and see that welcome.html content was shown instead of index.html


Actual results: content of previously set welcome-file (=> welcome.html) is shown after undefining the welcome-file


Expected results: index.html content is shown after undefining the welcome-file


Additional info:

Comment 1 Rémy Maucherat 2014-10-10 21:56:30 UTC
Thanks, but it is simply a duplicate of 1115443, welcome files, mime mappings, native, instanceid, default session timeout and default virtual server are set in WebSubsystemAdd.performBoottime and cannot be changed afterwards.

*** This bug has been marked as a duplicate of bug 1115443 ***

Comment 2 Radim Hatlapatka 2014-10-13 10:25:44 UTC
I don't see why it can't be changed afterwards.

At least this change solves the issue for the welcom-file https://github.com/rhatlapa/jboss-eap/commit/4cc1283faa18929cc9648751b034b39098c1dfac. The init method is called during reload.

This is only solution specific for welcome files and there would be nice to create solution for all the properties influenced by this behavior.

Comment 3 Rémy Maucherat 2014-10-13 10:43:19 UTC
Well, I talked about it in the other BZs. The configuration is copied only in WebSubsystemAdd.performBottime, like this:

final SharedWebMetaDataBuilder sharedWebBuilder = new SharedWebMetaDataBuilder(config.clone(), defaultSessionTimeout);

So I don't see how the config used by SharedWebMetaDataBuilder will change without a full restart of the server. Where does that happen ?

There's a side issue in the SharedWebMetaDataBuilder with welcome files and mime mappings, which are static. But feel free to submit PRs, I don't mind.

Comment 4 Radim Hatlapatka 2014-10-13 13:58:43 UTC
Created PR [1] for correctly setting welcome-file to defaults on attribute undefine.

Note that WebSubsystemAdd.performBottime is actually called even during reload when reload-required is set. At least this behavior was noticed when watching it via attached debugger

[1] https://github.com/jbossas/jboss-eap/pull/1803

Comment 6 Radim Hatlapatka 2014-10-21 08:38:37 UTC
Verified with EAP 6.4.0.DR6