aspose file tools*
The moose likes Websphere and the fly likes context root problem for ear Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "context root problem for ear" Watch "context root problem for ear" New topic
Author

context root problem for ear

cnivas redy
Greenhorn

Joined: Apr 19, 2008
Posts: 17
Hi, I deployed a EAR in web sphere 6.1 and lately I found that in the application.xml the context root is mis spelled. I forgot to mention " / "
<context-root>EIService</context-root> instead of <context-root>/EIService</context-root> . what is the Impact of this mistake. does any body know?
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
Generally I have always specified context root without "/".

a. In application.xml I specify context root as:

<!-- Web Modules -->
<module>
<web>
<web-uri>xxxx_web.war</web-uri>
<context-root>xxxx</context-root>
</web>
</module>

b. In "ibm-web-ext.xml" file, in case you are not using application.xml I specify context root as:

<context-root uri="xxxx" />

So I think you are all set. You dont need any additional "/" in there.

However you will have to use it like "/xxxx" in the URL
cnivas redy
Greenhorn

Joined: Apr 19, 2008
Posts: 17
Thanks Deepak,
Madhes Rathinam
Greenhorn

Joined: Aug 19, 2011
Posts: 7
I tried putting ibm-web-ext.xml with context-root, but its not picked up. what could be wrong?

I created WEB-INF/ibm-web-ext.xml, with the following content. Prepared the WAR & deployed using Admin Console. But the context-root is still "/"

Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
what version of websphere? version prior to 7.0 require .xmi instead of .xml
Madhes Rathinam
Greenhorn

Joined: Aug 19, 2011
Posts: 7
Thanks for the quick reply Deepak.

I am using 7.0.0.17.
Deepak Pant
Ranch Hand

Joined: Feb 13, 2004
Posts: 443
If WAS is not picking up context root from WAR properly then you can always change it in the WAS console. See if that is working for you or not.
Madhes Rathinam
Greenhorn

Joined: Aug 19, 2011
Posts: 7
Yes. Adding it through the Admin Console works.

But, the issue is, we should provide a default context-root in the WAR.
It would be good if I could provide through ibm-web-ext.xml, but not sure whats going wrong.

I realized, I may need to add "<webApp href="WEB-INF/web.xml#name"/>", and added as below.

Still, no luck.
When the <name> contained spaces WAS threw up some error ("could not mark ibm-web-ext.xml.. blah"), but when I gave the name with out any space, that error didn't come. But, the context-root was not recognized


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: context root problem for ear