Discussions

Web tier: servlets, JSP, Web frameworks: How to deploy a WAR to OC4J's root context?

  1. How to deploy a WAR to OC4J's root context? (5 messages)

    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...

    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.
  2. 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"/ >

    to

    <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.
  3. 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

     
    <web-

    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

    to

    Oc4jMount / abcapp and
    Oc4jMount /* abcapp to

    then i
    bounced OHS and abc after the changes were made

    NOTHING HAPPENED :-(
    any clues ????? or i was therotically wrong.........
  4. 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.
  5. Hi there!

    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?

    Regards,
    Christian
  6. Webapp Context - Root "/"[ Go to top ]

    Christian,

    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?

    Thanks.