I must be stupid or something because I can´t get this to work :( Anyway I figured what the hell, and made a symlink pointing from CATALINA_HOME/webapps/ROOT to /var/www/webapps/R2M/SMC and it now works. A little cheep solution but it works.
I have absolutley no Idea to why it does not work to configure tomcat like I want it to. Anyways, thanks a bunch for your help and patience. Really appriciated =) Den 6/17/2006, skrev "Fredrik Andersson" <[EMAIL PROTECTED]>: >ok, thanks a bunch :) > >Sadly I'm away over the weekend and can´t test the configuration just >yet. But as soon as I get back again I will try it and let you know how >it went :) > >Den 6/16/2006, skrev "Filip Hanik - Dev Lists" <[EMAIL PROTECTED]>: > >>no worries, lets start from the beginning, after that I will send you >>off to take a tomcat and/or servlet tutorial >> >><Host appBase="/var/www/webapps"...> >> >>The appbase is where tomcat will autodeploy applications from, an >>application, or webapp is defined by two means >>1. A directory >>2. A war file >> >>So in your case, the directory SMC is your webapp, hence the path to the >>application would be: >>/var/www/webapps/SMC (with subdirectories and files like below) >> - WEB-INF >> - web.xml >> - index.jsp >> >>You have four choices to deploy this webapp >> >>1. put the SCM directory inside Host.appBase, ie, /var/www/webapps/SCM >> The app will get deployed as /SCM >> >>2. put the SCM directory inside Host.appBase, ie, /var/www/webapps/SCM >> and put SCM.xml inside TC_HOME/conf/appserver/RM2/ >> The app will get deployed twice, /SCM and / >> >>3. put the SCM directory inside Host.appBase, ie, /var/www/webapps/SCM >> Create a file named context.xml ie >>/var/www/webapps/SCM/META-INF/context.xml >> The app will get deployed once as "/", tomcat will automatically >>create SCM.xml inside TC_HOME/conf/appserver/RM2/ >> >>4. Put the SCM directory anywhere on the file system, for example /tmp/SCM >> and put SCM.xml inside TC_HOME/conf/appserver/RM2/ >> and inside SCM.xml do <Context docBase="/tmp/SCM" path=""/> >> The app will get deployed once as "/" >> >>Filip >> >> >>Fredrik Andersson wrote: >>> ok, the application I want to launch is SMC so where should I place the >>> SMC.xml file? >>> >>> I´m really confused, not because I dont know what I want to do, but there >>> are tons of different sources telling me different things and none >>> works.. :( >>> >>> I understand that I must be anoying and it´s really nice of you to help >>> me. =) >>> >>> Den 6/16/2006, skrev "Filip Hanik - Dev Lists" <[EMAIL PROTECTED]>: >>> >>> >>>> R2M.xml? where did that come from? it should be SCM.xml, although the >>>> name isn't important. >>>> >>>> Your original setup was confusing, cause you have RM2/SCM (inside of >>>> webapps) >>>> so which one is the webapp, RM2 directory, or the SCM directory? >>>> >>>> They key to your problem though, is probably the <Context path=""...> >>>> instead of <Context path="/"...> >>>> >>>> Filip >>>> >>>> >>>> Fredrik Andersson wrote: >>>> >>>>> ok, and my R2M.xml configuration file should reside inside of >>>>> $CATALINA_HOME/appserver/R2M ? or did I missunderstand you on that part? >>>>> Will try it out, thanks a million. Really nice of you taking youre time >>>>> explaining this to me :) >>>>> >>>>> Den 6/16/2006, skrev "Filip Hanik - Dev Lists" <[EMAIL PROTECTED]>: >>>>> >>>>> >>>>> >>>>>> the more logical setup would be (assuming the SMC is a webapp) >>>>>> >>>>>> <Engine name="appserver" >>>>>> debug="0" >>>>>> defaultHost="R2M"> >>>>>> >>>>>> <Host name="R2M" >>>>>> appBase="/var/www/webapps/RM2" >>>>>> autoDeploy="false" >>>>>> deployOnStartup="false" >>>>>> unpackWARs="false" >>>>>> deployXML="true" >>>>>> debug="0"/> >>>>>> >>>>>> </Engine> >>>>>> >>>>>> <Context path="" >>>>>> docBase="SMC" >>>>>> reloadable="true" >>>>>> debug="0"/> >>>>>> >>>>>> I changed three things >>>>>> 1. Host.appBase >>>>>> 2. Context.path >>>>>> 3. Context.docBase >>>>>> >>>>>> Filip >>>>>> >>>>>> >>>>>> >>>>>> Fredrik Andersson wrote: >>>>>> >>>>>> >>>>>>> Hi, thanks for answering=) >>>>>>> I´m still a little confused so I will try to describe what kind of setup >>>>>>> I want and we will se if it becomes clearer. >>>>>>> >>>>>>> I want my internet files to reside inside of >>>>>>> /var/www/webapps/R2M/SMC >>>>>>> >>>>>>> Now I wan´t apache to forward all pages that are jsp (*.jsp) and all >>>>>>> servlets thats are mapped through ip/servlets/* to tomcat. >>>>>>> >>>>>>> As it is right now I have HelloWorld.html and HelloWorld.jsp inside the >>>>>>> SMC folder and apache finds them both and the .jsp file gets forwarded >>>>>>> to tomcat (it says that tomcat can´t find the file). Now where is tomcat >>>>>>> looking for the files? >>>>>>> >>>>>>> $CATALINA_HOME/conf/server.xml (engine part) >>>>>>> <Engine name="appserver" >>>>>>> debug="0" >>>>>>> defaultHost="R2M"> >>>>>>> >>>>>>> <Host name="R2M" >>>>>>> appBase="/var/www/webapps/RM2" >>>>>>> autoDeploy="false" >>>>>>> deployOnStartup="false" >>>>>>> unpackWARs="false" >>>>>>> deployXML="true" >>>>>>> debug="0"/> >>>>>>> >>>>>>> </Engine> >>>>>>> >>>>>>> then I read that it was good to seperate the context part into a >>>>>>> different file for every host and I understood that they were supposed >>>>>>> to reside inside of $CATALINA_HOME/conf/<engine >>>>>>> name>/<application_name>.xml >>>>>>> >>>>>>> So I have the file $CATALINA_HOME/appserve/R2M/SMC.xml and it holds >>>>>>> <Context path="/" >>>>>>> docBase="SMC" >>>>>>> reloadable="true" >>>>>>> debug="0"/> >>>>>>> >>>>>>> Did I set this up wrong? >>>>>>> >>>>>>> >>>>>>> Den 6/16/2006, skrev "Filip Hanik - Dev Lists" <[EMAIL PROTECTED]>: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>> Fredrik Andersson wrote: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> Hi all >>>>>>>>> >>>>>>>>> Ok so heres the deal. I want my tomcat installation (5.5.17) to load >>>>>>>>> pages from /var/www/webapps/R2M/SMC >>>>>>>>> >>>>>>>>> I´m also running a virtual host setup so I edit my server.xml file and >>>>>>>>> point the appBase for the directory to /var/www/webapps and then I >>>>>>>>> have >>>>>>>>> the context part of the configuration inside >>>>>>>>> $CATALINA_HOME/conf/appserve/R2M/SMC.xml in which I point the docBase >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> ok, this path is $CATALINA_HOME/<Engine name>/<Host name> >>>>>>>> >>>>>>>> are you saying you renamed your engine element in server.xml to >>>>>>>> appserve? >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> variabel to "R2M/SMC" >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> this is a weird setup, by setting appBase to /var/www/webapps, tomcat >>>>>>>> would want webapps in that directory >>>>>>>> so you would have the app in /var/www/webapps/SMC >>>>>>>> and tomcat would auto deploy it >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>>> Now when I point my webbrowser to a jsp file in my directory I >>>>>>>>> recieve a >>>>>>>>> 404 error.. :( >>>>>>>>> >>>>>>>>> What went wrong in my configuration? >>>>>>>>> >>>>>>>>> Any tip/help is greatly appreciated. >>>>>>>>> >>>>>>>>> --------------------------------------------------------------------- >>>>>>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>>>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> -- >>>>>>>> >>>>>>>> >>>>>>>> Filip Hanik >>>>>>>> >>>>>>>> --------------------------------------------------------------------- >>>>>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> -- >>>>>> >>>>>> >>>>>> Filip Hanik >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>>> >>>>>> >>>>>> >>>>> --------------------------------------------------------------------- >>>>> To start a new topic, e-mail: users@tomcat.apache.org >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>> >>>>> >>>>> >>>>> >>>>> >>>> -- >>>> >>>> >>>> Filip Hanik >>>> >>>> --------------------------------------------------------------------- >>>> To start a new topic, e-mail: users@tomcat.apache.org >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To start a new topic, e-mail: users@tomcat.apache.org >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> >> >> >>-- >> >> >>Filip Hanik >> >>--------------------------------------------------------------------- >>To start a new topic, e-mail: users@tomcat.apache.org >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] >> > >--------------------------------------------------------------------- >To start a new topic, e-mail: users@tomcat.apache.org >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]