• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

context root problem for ear

 
cnivas redy
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Deepak,
 
Madhes Rathinam
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what version of websphere? version prior to 7.0 require .xmi instead of .xml
 
Madhes Rathinam
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the quick reply Deepak.

I am using 7.0.0.17.
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic