Web tier: servlets, JSP, Web frameworks: How to deploy a WAR to OC4J's root context?
While trying to deploy a WAR thru Oracle 10g's EM, I give / as the web context but it fails with the message "Invalid root context. It cannot be empty or /. Resolution:" No resolution...
- Posted by: Ferhat SAVCI
- Posted on: March 02 2004 10:37 EST
OTN, metalink and orionserver.com does not have any info regarding this (a few guys had the same problem but there was no answer or resolution).
I'd be grateful if someone pointed me to some info.
- How to deploy a WAR to OC4J's root context? by A Muley on March 30 2004 17:42 EST
- How to deploy a WAR to OC4J's root context? by chee torr on April 07 2004 11:56 EDT
You can go through the following steps to make this work. Initially deploy your app and use the root context as /mywebapp. You can later change it to / as detailed below:
Go throught the EM Advanced Properties and:
Edit the $OH/j2ee/mywebapp/config/default-web-site.xml file and change this line:
< web-app application="mywebapp" name="mywebapp" root="/mywebapp"/ >
<web-app application="mywebapp" name="mywebapp" root="/" />
In mod_oc4j.conf (again through EM), you should make the following change.
Oc4jMount / Oc4J_instance_name
Oc4jMount /* OC4J_instance_name
This should work for the Java Edition.
was able to deploy an ear(say abc.ear-with a abc-web.war and abc-ejb.jar along with appropate descriptors) with oracle enterprise manager site .with /abc-web as its root...on windows 2000
all went ok ...
and was able to access it via a url http://localhost:7777/abc-web.
what to do if i want configure it as my default site on this m/c so that i can access it with http://localhost:7777..
i went to every nick n corner of ias i couldnt able to do it..
here what i did next
i added this entry into default-web-site.xml file
app application="mywebapp" name="mywebapp" root="/" />
also i added this in orion-web.xml
<web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="true" />
In mod_oc4j.conf, i changed
Oc4jMount /abc-web abcapp and
Oc4jMount /abc-web/* abcapp
Oc4jMount / abcapp and
Oc4jMount /* abcapp to
bounced OHS and abc after the changes were made
NOTHING HAPPENED :-(
any clues ????? or i was therotically wrong.........
Wanted to clarify that you did not make a new entry in the default-web-site.xml. You should have modified the entry that was already in place.
Send me email ( at yahoo.com, my userid is amuley ) if this doesn't work.
Went through all the steps discussed above, and it did work out. Problem is, I do not really want to go through this every time I deploy the application.
Any hints on how to make this permanent?
If you use OracleAS Cluster repository-managed, your changes should be automatically propagte to other cluster members.
I have been thinking about the feasibility of using the webapp root context (i.e. "/"). I think there are a few disadvantages of root context:
1. ALL requests will be routed from Apache to OC4J because the requests will be started with "/".
2. OC4J performance may decrease because it handles all the dynmaic and static pages.
I am curious to know what others think about using "/" root context.
Do people use it on production enviroment?
Do people use Apache's alias to map to their static pages?