Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331042 - Spring DM Server Admin UI index page breaks when a custom Web-ContextPath header is specified in the PLAN file for starting Admin WAR bundle
Summary: Spring DM Server Admin UI index page breaks when a custom Web-ContextPath hea...
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: unknown (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 3.0.0.M01   Edit
Assignee: Chris Frost CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-24 12:02 EST by Amit Kumar CLA
Modified: 2011-02-01 10:58 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Kumar CLA 2010-11-24 12:02:21 EST
Build Identifier: Spring DM Server 2.0.0.RELEASE

1. I am running multiple instances of Spring DM Server on a single VM, each instance for a different Application Domain. I have updated the PLAN file in the pickup directory as specified below -

$ cat  com.springsource.server.admin-2.0.0.RELEASE.plan

<?xml version="1.0" encoding="UTF-8"?>
<plan name="com.springsource.server.admin.plan" version="2.0.0" scoped="false" atomic="true"
        xmlns="http://www.springsource.org/schema/dm-server/plan"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://www.springsource.org/schema/dm-server/plan 
                            http://www.springsource.org/schema/dm-server/plan/springsource-dm-server-plan.xsd">

        <artifact type="bundle" name="com.springsource.server.admin.content" version="[2.0,3.0)"/>
    <artifact type="bundle" name="com.springsource.server.admin.web" version="[2.0,3.0)">
       <property name="header:Web-ContextPath" value="/appname/admin"/>
    </artifact>
</plan>

The PLAN starts fine. However, when I go to the http://host:8080/appname/admin/, the index page does not load due to the following hard-coding in index.htm -

<meta http-equiv="REFRESH" content="0;url=/admin/web/info/overview.htm">

I have changed it as below in my environment to make it work -

<meta http-equiv="REFRESH" content="0;url=web/info/overview.htm">

Reproducible: Always

Steps to Reproduce:
1. Update the PLAN file as stated in the 'Details' section above.
2. Start the DM Server.
3. Go to http://localhost:8080/appname/admin/
Comment 1 Amit Kumar CLA 2010-11-24 12:10:25 EST
Note that even if the index page redirection does not work with mentioned modification to the Web-ContextPath header, going directly to http://host:8080/appname/admin/web/artifact/overview.htm works.
Comment 2 Glyn Normington CLA 2010-11-24 12:17:44 EST
The normal way to run multiple instances of dm Server on the same (virtual) machine is to assign each of them a different set of ports. Once that is done, there is no clash between the URLs of the admin consoles of the different instances.

I'd like to understand how you are setting up ports.

BTW this bugzilla is for Virgo so I presume you are looking for a fix on Virgo. Please confirm.
Comment 3 Amit Kumar CLA 2010-11-24 12:41:37 EST
Yes, I understand that different instances of the server will need to run on different ports. However, I was looking to modify the context relative to the application, So that a similar security can be enforced to the Admin UI as well which is applied to the WAR bundles in the application domain.

Yes, I am looking for a fix for this in Virgo.
Comment 4 Glyn Normington CLA 2010-11-25 03:32:54 EST
Assigning to Chris for consideration.
Comment 5 Chris Frost CLA 2010-11-25 07:10:00 EST
Hi,

Well spotted, it's a simple change so I have made it in master and it will be available in 2.2.0.M02. I have also left the property in the plan file so it is obvious to others that the context path can be changed easily.

Does this resolve this issue for you or are you after something more?

Chris.
Comment 6 Amit Kumar CLA 2010-11-25 10:30:42 EST
Thank you Chris and Glyn for considering this. I liked the idea of leaving the property meta in the PLAN file to make it more obvious to the users if they want to change the context path.

Thank you again for fixing it quickly.