Bug 899201 (JBEWS-298) - EWS: Tomcat admin web tool impairs configuration files
Summary: EWS: Tomcat admin web tool impairs configuration files
Keywords:
Status: CLOSED DUPLICATE of bug 2040112
Alias: JBEWS-298
Product: JBoss Enterprise Web Server 1
Classification: JBoss
Component: unspecified
Version: EWS 1.0.1
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: EWS 1.0.1
Assignee: Permaine Cheung
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-05 17:30 UTC by Ondřej Žižka
Modified: 2012-11-13 16:27 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-12 00:49:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
EWS-Tomcat-Admin-impairs-config-files.png (43.54 KB, image/png)
2010-02-05 18:05 UTC, Ondřej Žižka
no flags Details
JBPAPP-3678-diff.zip (12.80 KB, application/zip)
2010-02-05 18:29 UTC, Ondřej Žižka
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEWS-298 0 None None None Never

Description Ondřej Žižka 2010-02-05 17:30:54 UTC
Date of First Response: 2010-02-08 11:01:38
project_key: JBEWS


The Tomcat web administration tool persists the changes to the config files.
Upon save, it presumably dumps a XML DOM to the xml file, and these are the side effects:

 * All comments disappear
 * Formatting is different
 * Some attributes disappear - <Server port="8005" shutdown="SHUTDOWN"> becomes just <Server>
      <Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
     Becomes <Host>
 * Some attributes are added.

<Context docBase="${catalina.home}/server/webapps/host-manager" privileged="true" antiResourceLocking="false" antiJARLocking="false"></Context>
 becomes 
<Context
    docBase="C:/Program Files/Red Hat/Enterprise Web Server/share/tomcat5/server/webapps/host-manager"
    privileged="true">
  <Listener className="org.apache.catalina.startup.TldConfig"/>
  <Listener className="org.apache.catalina.startup.TldConfig"/>
  <Listener className="org.apache.catalina.startup.TldConfig"/>
</Context>
etc. etc.

The process breaks admin.xml:

    <Context docBase="${catalina.home}/server/webapps/admin" privileged="true" antiResourceLocking="false" antiJARLocking="false">
      <Resources className="org.apache.naming.resources.FileDirContext"  allowLinking="true"/>
    </Context>

becomes:

    <Context docBase="C:/Program Files/Red Hat/Enterprise Web Server/share/tomcat5/server/webapps/admin" privileged="true">
      <Listener className="org.apache.catalina.startup.TldConfig"/>
      <Listener className="org.apache.catalina.startup.TldConfig"/>
      <Listener className="org.apache.catalina.startup.TldConfig"/>
    </Context>


See the attachments. (issue in progress).

Comment 1 Ondřej Žižka 2010-02-05 18:05:10 UTC
Attachment: Added: EWS-Tomcat-Admin-impairs-config-files.png


Comment 2 Ondřej Žižka 2010-02-05 18:22:37 UTC
Attachment: Added: JBPAPP-3678-diff.zip


Comment 3 Ondřej Žižka 2010-02-05 18:26:01 UTC
Note that the zip files also contain changes done manually, but only few - e.g. SSL config etc. The issue is still recognizable.

Comment 4 Ondřej Žižka 2010-02-05 18:28:55 UTC
Attachment: Removed: JBPAPP-3678-diff.zip 


Comment 5 Ondřej Žižka 2010-02-05 18:29:19 UTC
Attachment: Added: JBPAPP-3678-diff.zip


Comment 6 Ondřej Žižka 2010-02-05 18:51:04 UTC
Link: Added: This issue depends JBQA-3040


Comment 7 Ondřej Žižka 2010-02-05 18:51:25 UTC
Link: Added: This issue is incorporated by JBQA-3040


Comment 8 Ondřej Žižka 2010-02-05 18:51:44 UTC
Link: Removed: This issue depends JBQA-3040 


Comment 9 Permaine Cheung 2010-02-08 16:01:38 UTC
Is this also an issue in upstream tomcat download? 

Comment 10 Permaine Cheung 2010-02-11 15:07:59 UTC
Since this is minor, we'll move this to EWS 1.0.2.

Comment 11 Ondřej Žižka 2010-02-12 00:48:17 UTC
Marking as duplicate of JBPAPP-3685.
As I noticed there that it also removes SSL configuration, I am marking this as a blocker.
I recommend to either remove the admin application, or fix it not to remove any attributes.


Comment 12 Ondřej Žižka 2010-02-12 00:49:21 UTC
Duplicate of JBPAPP-3685 as there's a discussion of the productization process.

Comment 13 Ondřej Žižka 2010-02-12 00:50:16 UTC
Link: Added: This issue is duplicated by JBPAPP-3685


Comment 14 Aleksandar Kostadinov 2010-08-18 12:46:02 UTC
Hey Ondra,

Looking at other tomcat admin app issues I'm not sure these will be fixed but if you believe these glitches need fixing, please file a bugzilla at https://issues.apache.org

Comment 15 Ondřej Žižka 2010-08-18 13:22:45 UTC
Hi Alex, I think that BZ's linked in https://jira.jboss.org/browse/JBPAPP-3685 cover this sufficiently.


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