It's all about the answers!

Ask a question

How do I set the context root in the Doors API using .xml files?


Andrew Lloyd (5346) | asked Mar 23 '15, 12:45 a.m.

Hello everyone,

I am trying to deploy a number of API extensions on the same Websphere webserver as Doors NG (As per this question, https://jazz.net/forum/questions/176825/how-to-deploy-doors-next-gen-api-extensions-onto-websphere)

We have worked through most of the issues but I need to set the context root to "/extensions" without doing it manually during installation. I will upload a copy of my web.xml and ibm-web-ext.xml any tips on how to do this would be great.

Regards,
Andrew

web.xml
<?xml version='1.0' encoding='ISO-8859-1'?>
<web-app
    xmlns='http://java.sun.com/xml/ns/j2ee'
    xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
    xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd'
    version='2.4'>

    <display-name>Doors Next Gen Extensions</display-name>

</web-app>

imb-web-ext.xml

<?xml version='1.0' encoding='ISO-8859-1'?>
<web-ext
    xmlns="http://websphere.ibm.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd"
    version="1.0">
 
 <context-root uri="/extensions"/>
 
</web-ext>

One answer



permanent link
Donald Nong (14.5k614) | answered Mar 24 '15, 2:34 a.m.
If I remember correctly, you cannot force a context root when deploying a .war file to WAS (the context root is default to the .war file name?). The only way is to deploy an .ear file. Or you can use some script to change the context root after the deployment.
http://stackoverflow.com/questions/24472790/websphere-8-5-context-root-change-not-applying-to-war-file

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.