Re: Want to run servlets from other directory than webapps
Yoo, Do you use tomcat stand-alone? Or with Apache Putting a context in server.xml should work, but this is not the prevered way in tomcat 5! Greetings O. On 5/11/05, Raueber Hotzenplotz [EMAIL PROTECTED] wrote: Hi I've got Tomcat-5.0.27-r5 installed. Running servlets (localhost) located in /opt/tomcat5/webapps/ROOT/WEB_INF/classes is no problem. What do I need to do to run servlets from my user directory (e.g. /home/user/myapp)? I've tried to use http://localhost:8080/admin to add an additional context, setting path and docbase to /home/user/myapp, but this doesn't work. I've also tried to change appbase to /home/user/myapp in conf/server.xml, but again no success. I've uncommented the 'invoker' lines in conf/web.xml - for the moment anyway: servlet servlet-nameinvoker/servlet-name servlet-class org.apache.catalina.servlets.InvokerServlet /servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param load-on-startup2/load-on-startup /servlet servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping How do you configure Tomcat? Do you use the admin tool or do you do it manually? The admin tool works strange e.g. after deleting some context it was still in the list. Thanks! Regards, Rudi ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Want to run servlets from other directory than webapps
Hi Rudi, Here's how I do it, and this also seems to be the 'correct' way of doing it with Tomcat5 (as it doesn't mean messing with any container-level files). Into {tomcathome}\conf\Catalina\localhost\ I place a correctly formed context file, for example ApplicationName.xml (very minimal for demonstration purposes... you could, of course, make it do whatever a normal context file would). ApplicationName.xml - ?xml version=1.0 encoding=UTF-8? Context path=/ApplicationName docBase=C:/share/ApplicationCode/ debug=1 reloadable=true /Context --- End ApplicationName.xml The C:/share/ApplicationCode/ directory would contain the JSPs, the META-INF dir, the WEB-INF dir, etc. Restart your tomcat Server and away you go. You can even use the admin utility to tweak it. Cheers, PST On 5/11/05, Raueber Hotzenplotz [EMAIL PROTECTED] wrote: Hi I've got Tomcat-5.0.27-r5 installed. Running servlets (localhost) located in /opt/tomcat5/webapps/ROOT/WEB_INF/classes is no problem. What do I need to do to run servlets from my user directory (e.g. /home/user/myapp)? I've tried to use http://localhost:8080/admin to add an additional context, setting path and docbase to /home/user/myapp, but this doesn't work. I've also tried to change appbase to /home/user/myapp in conf/server.xml, but again no success. I've uncommented the 'invoker' lines in conf/web.xml - for the moment anyway: servlet servlet-nameinvoker/servlet-name servlet-class org.apache.catalina.servlets.InvokerServlet /servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param load-on-startup2/load-on-startup /servlet servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping How do you configure Tomcat? Do you use the admin tool or do you do it manually? The admin tool works strange e.g. after deleting some context it was still in the list. Thanks! Regards, Rudi ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Want to run servlets from other directory than webapps
I'm running Tomcat as standalone server at the moment - that could change later on. What's the preferred way in Tomcat 5? Thanks! --- Oto Bossert [EMAIL PROTECTED] wrote: Yoo, Do you use tomcat stand-alone? Or with Apache Putting a context in server.xml should work, but this is not the prevered way in tomcat 5! Greetings O. On 5/11/05, Raueber Hotzenplotz [EMAIL PROTECTED] wrote: Hi I've got Tomcat-5.0.27-r5 installed. Running servlets (localhost) located in /opt/tomcat5/webapps/ROOT/WEB_INF/classes is no problem. What do I need to do to run servlets from my user directory (e.g. /home/user/myapp)? I've tried to use http://localhost:8080/admin to add an additional context, setting path and docbase to /home/user/myapp, but this doesn't work. I've also tried to change appbase to /home/user/myapp in conf/server.xml, but again no success. I've uncommented the 'invoker' lines in conf/web.xml - for the moment anyway: servlet servlet-nameinvoker/servlet-name servlet-class org.apache.catalina.servlets.InvokerServlet /servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param load-on-startup2/load-on-startup /servlet servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping How do you configure Tomcat? Do you use the admin tool or do you do it manually? The admin tool works strange e.g. after deleting some context it was still in the list. Thanks! Regards, Rudi ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Want to run servlets from other directory than webapps
Thanks PST! Will try it out tomorrow. Rudi --- Patrick Thomas [EMAIL PROTECTED] wrote: Hi Rudi, Here's how I do it, and this also seems to be the 'correct' way of doing it with Tomcat5 (as it doesn't mean messing with any container-level files). Into {tomcathome}\conf\Catalina\localhost\ I place a correctly formed context file, for example ApplicationName.xml (very minimal for demonstration purposes... you could, of course, make it do whatever a normal context file would). ApplicationName.xml - ?xml version=1.0 encoding=UTF-8? Context path=/ApplicationName docBase=C:/share/ApplicationCode/ debug=1 reloadable=true /Context --- End ApplicationName.xml The C:/share/ApplicationCode/ directory would contain the JSPs, the META-INF dir, the WEB-INF dir, etc. Restart your tomcat Server and away you go. You can even use the admin utility to tweak it. Cheers, PST On 5/11/05, Raueber Hotzenplotz [EMAIL PROTECTED] wrote: Hi I've got Tomcat-5.0.27-r5 installed. Running servlets (localhost) located in /opt/tomcat5/webapps/ROOT/WEB_INF/classes is no problem. What do I need to do to run servlets from my user directory (e.g. /home/user/myapp)? I've tried to use http://localhost:8080/admin to add an additional context, setting path and docbase to /home/user/myapp, but this doesn't work. I've also tried to change appbase to /home/user/myapp in conf/server.xml, but again no success. I've uncommented the 'invoker' lines in conf/web.xml - for the moment anyway: servlet servlet-nameinvoker/servlet-name servlet-class org.apache.catalina.servlets.InvokerServlet /servlet-class init-param param-namedebug/param-name param-value0/param-value /init-param load-on-startup2/load-on-startup /servlet servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping How do you configure Tomcat? Do you use the admin tool or do you do it manually? The admin tool works strange e.g. after deleting some context it was still in the list. Thanks! Regards, Rudi ___ How much free photo storage do you get? Store your holiday snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___ Does your mail provider give you FREE antivirus protection? Get Yahoo! Mail http://uk.mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]