Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Deploying to TomCat ROOT directory?

490060Aug 27 2006 — edited Aug 27 2006
Is there anything different/special that I need to do to deploy my WAR file to the Tomcat 5.5.9 ROOT directory (or ROOT context)? I need to deploy to ROOT so that when the URL comes in with no context path (i.e.., www.mydomain.com), my JSF application comes up by default (I will set the Welcome File Page to /faces/search.jspx). When I try to do this I get an error starting the ADF Faces Servlet on startup(see below.)

Everything works fine if I deploy my WAR file to a context other than ROOT - for example if I deploy my WAR file to myfacesapp.war, then I can access the app fine when I specify the context path in the URL: www.mydomain.com/myfacesapp

There should not be any dependecies between what I deploy my WAR file as (ROOT.war or myfacesapp.war) and my JSF project name or the ADF Faces Filter config? Has anyone deployed directly to Tomcat ROOT context or know where I can look in my config (deploy descriptors, xml configs, etc.)?

Jdev online help states:
The system administrator of the Tomcat application server must assign a context path to your application in the conf/server.xml file:
<DefaultContext crossContext="true"/>

I have this line in server.xml, but this isn't really configuring a context path, but allowing crossContext references - the reason I bring this up is to try to understand if there is some ADF dependency to run in a non-ROOT Tomcat context?

Any alternative options appreciated as well - the goal is to display my app's initial .jspx page (not index.htm) when the URL contains the domain name. Thanks

Aug 27, 2006 2:18:12 AM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter adfFaces
java.lang.NullPointerException
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._setupJboDomainStuff(AdfFacesFilterImpl.java:279)
at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.init(AdfFacesFilterImpl.java:149)
at oracle.adf.view.faces.webapp.AdfFacesFilter.init(AdfFacesFilter.java:49)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:79)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3540)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4110)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:788)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:677)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

Message was edited by:
javaX

Comments

Shay Shmeltzer-Oracle
Just an idea, how about creating an index.html file in your root directory that does automatic redirect using the <Meta> refresh to the sub directory where your application is?
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 24 2006
Added on Aug 27 2006
1 comment
626 views