<snip> On 6 Dec 2011, at 15:52, Blaxton <blaxx...@yahoo.com> wrote: > > I have added the host directive to server.xml and moved appexmp1 contents to > ROOT directory > and now I can access www.mydomain.com/index.jsp with no problem, > however now the servlets are not working. > I can access jsp files, but no servlets, I get "The requested resource is not > available" message. > > as with following direction: > http://tomcat.apache.org/tomcat-6.0-doc/virtual-hosting-howto.html#context.xml_-_approach__1 > > I have created /Catalina_BASE/appexmp1/ROOT/META-INF/context.xml
Ok, please remove the comments from your server.xml and post it inline, here. > I have placed a HelloWorld.class file in > /Catalina_BASE/appname/ROOT/WEB-INF/classes/com/mydomain > but can't access the class through mydomain.com/app1/HelloWorld How have you defined the Servlet in ROOT/WEB-INF/web.xml? > tried following context file variations but didn't work: > > <Context path="/app1" docBase="." debug="0" reloadable="true" > crossContext="true"> > </Context> Never do the above. > <Context path="/app1" docBase="ROOT" debug="0" reloadable="true" > crossContext="true"> > </Context> Or that. The 'path' attribute is not applicable here - in any case it's wrong. Remove the path and docBase attributes from the ROOT.xml file. p > it seems to me , context file is not being read after adding the host > directive to server.xml > either when it is in /Catalina_BASE/conf/Catalina/local host or now that it > is in > /Catalina_BASE/appexmp1/ROOT/META-INF/context.xml > > thanks for help --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org