RE: servlet help
You need to tell Apache about your user directories. Try this location to send anything starting with ~ to tomcat. Location /\~.* JkUriSet worker ajp13:localhost:8009 /Location Charlie -Original Message- From: Casas, Claudia [mailto:[EMAIL PROTECTED] Sent: Thursday, January 13, 2005 11:42 AM To: Tomcat Users List Subject: RE: servlet help I am using jk2, apache2, and tomcat5.5 -Original Message- From: Edmon Begoli [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 6:42 PM To: Tomcat Users List Subject: Re: servlet help Claudia, Are you using mod_jk with Apache and Tomcat? You should be able to configure in Apache's httpd.conf to forward particular url patterns to your Tomcat(s') worker(s). Something like: JkMount /yourapp/* yourworker More details are in mod_jk documentation. I do not think that there is a way to forward only servlet calls, as you can not be sure from the URL. Usually, your URL/URI will have some servlet app. specific context which will help you. Regards, Edmon Software Architecture to the Rescue - Original Message - From: Casas, Claudia [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, January 12, 2005 3:16 PM Subject: RE: servlet help Oki doki, I got my servlets to work from tomcat using port 8080 (http://myserver:8080/~myacct/servlet/myservlet), but I still do not know how to make apache recognize my servlets and send them to tomcat. I want to access (http://myserver/~myacct/servlet/myservlet) I tried to add these lines to httpd.conf Location /servlet/* JkUriSet worker ajp13:localhost:8009 /Location and also added these lines to workers2.properties [uri:spark.iss.utep.edu/servlet/*] group=ajp13:localhost:8009 but still no luck! :( please help. For reference I used the following taken from the web site: http://www.jolash.com/tomcat/ Configure the tomcat web.xml file in your tomcat's conf directory. You only need to do this if you are going to write servlets. After doing this, you can put all your servlets into the subdirectory WEB-INF/classes of your webapp directory. And you can access those servlets with a URL like: Uncomment the servlet element tags with the servlet-name of invoker (just search for invoker). 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 Uncomment the servlet-mapping element tags with the servlet-name of invoker. !-- The mapping for the invoker servlet -- servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping -Original Message- From: Casas, Claudia [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 11:56 AM To: tomcat-user@jakarta.apache.org Subject: servlet help I am running tomcat5.5.4, apache2.0.52 and jk2. 1)I an run my jsp's and servlets from root. I have configured tomcat to run my jsp's from the homedirs, but I do not know how to configure tomcat to run servlets from the homedirs. I can run my jsp's like this: http://myserver/~myhomedir/myfile.jsp or http://myserver:8080/~myhomedir/myfile.jsp Either way it works fine. What do I need to add so that my servlets run from my homedirs as well?? These are my configuration files: /usr/local/apache/workers2.properties info=Ajp13 forwarding over socket tomcatId=localhost:8009 #define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 ` # Map the Tomcat examples webapp to the Web server uri space #[uri:/jkstatus/*] #group=status:status # Uri mapping [uri:/jsp-examples/*] [uri:spark.iss.utep.edu/*.jsp] group=ajp13:localhost:8009 I added the following in my httpd.conf also: Location /*.jsp JkUriSet worker ajp13:localhost:8009 /Location (Before I would just add the lines below in my httpd.conf, and jsp's and servlets would work! JkMount /*.jsp ajp13 JkMount /*/servlet/ ajp13) Also, I have the following in my server.xml file to run my jsp's from my homedirs: Listener className=org.apache.catalina.startup.UserConfig directoryName=wwwdocs userClass=org.apache.catalina.startup.PasswdUserDatabase/ What am I missing??? - 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] - To unsubscribe, e
RE: servlet help
I am using jk2, apache2, and tomcat5.5 -Original Message- From: Edmon Begoli [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 6:42 PM To: Tomcat Users List Subject: Re: servlet help Claudia, Are you using mod_jk with Apache and Tomcat? You should be able to configure in Apache's httpd.conf to forward particular url patterns to your Tomcat(s') worker(s). Something like: JkMount /yourapp/* yourworker More details are in mod_jk documentation. I do not think that there is a way to forward only servlet calls, as you can not be sure from the URL. Usually, your URL/URI will have some servlet app. specific context which will help you. Regards, Edmon Software Architecture to the Rescue - Original Message - From: Casas, Claudia [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, January 12, 2005 3:16 PM Subject: RE: servlet help Oki doki, I got my servlets to work from tomcat using port 8080 (http://myserver:8080/~myacct/servlet/myservlet), but I still do not know how to make apache recognize my servlets and send them to tomcat. I want to access (http://myserver/~myacct/servlet/myservlet) I tried to add these lines to httpd.conf Location /servlet/* JkUriSet worker ajp13:localhost:8009 /Location and also added these lines to workers2.properties [uri:spark.iss.utep.edu/servlet/*] group=ajp13:localhost:8009 but still no luck! :( please help. For reference I used the following taken from the web site: http://www.jolash.com/tomcat/ Configure the tomcat web.xml file in your tomcat's conf directory. You only need to do this if you are going to write servlets. After doing this, you can put all your servlets into the subdirectory WEB-INF/classes of your webapp directory. And you can access those servlets with a URL like: Uncomment the servlet element tags with the servlet-name of invoker (just search for invoker). 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 Uncomment the servlet-mapping element tags with the servlet-name of invoker. !-- The mapping for the invoker servlet -- servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping -Original Message- From: Casas, Claudia [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 11:56 AM To: tomcat-user@jakarta.apache.org Subject: servlet help I am running tomcat5.5.4, apache2.0.52 and jk2. 1)I an run my jsp's and servlets from root. I have configured tomcat to run my jsp's from the homedirs, but I do not know how to configure tomcat to run servlets from the homedirs. I can run my jsp's like this: http://myserver/~myhomedir/myfile.jsp or http://myserver:8080/~myhomedir/myfile.jsp Either way it works fine. What do I need to add so that my servlets run from my homedirs as well?? These are my configuration files: /usr/local/apache/workers2.properties info=Ajp13 forwarding over socket tomcatId=localhost:8009 #define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 ` # Map the Tomcat examples webapp to the Web server uri space #[uri:/jkstatus/*] #group=status:status # Uri mapping [uri:/jsp-examples/*] [uri:spark.iss.utep.edu/*.jsp] group=ajp13:localhost:8009 I added the following in my httpd.conf also: Location /*.jsp JkUriSet worker ajp13:localhost:8009 /Location (Before I would just add the lines below in my httpd.conf, and jsp's and servlets would work! JkMount /*.jsp ajp13 JkMount /*/servlet/ ajp13) Also, I have the following in my server.xml file to run my jsp's from my homedirs: Listener className=org.apache.catalina.startup.UserConfig directoryName=wwwdocs userClass=org.apache.catalina.startup.PasswdUserDatabase/ What am I missing??? - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet help
Oki doki, I got my servlets to work from tomcat using port 8080 (http://myserver:8080/~myacct/servlet/myservlet), but I still do not know how to make apache recognize my servlets and send them to tomcat. I want to access (http://myserver/~myacct/servlet/myservlet) I tried to add these lines to httpd.conf Location /servlet/* JkUriSet worker ajp13:localhost:8009 /Location and also added these lines to workers2.properties [uri:spark.iss.utep.edu/servlet/*] group=ajp13:localhost:8009 but still no luck! :( please help. For reference I used the following taken from the web site: http://www.jolash.com/tomcat/ Configure the tomcat web.xml file in your tomcat's conf directory. You only need to do this if you are going to write servlets. After doing this, you can put all your servlets into the subdirectory WEB-INF/classes of your webapp directory. And you can access those servlets with a URL like: Uncomment the servlet element tags with the servlet-name of invoker (just search for invoker). 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 Uncomment the servlet-mapping element tags with the servlet-name of invoker. !-- The mapping for the invoker servlet -- servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping -Original Message- From: Casas, Claudia [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 11:56 AM To: tomcat-user@jakarta.apache.org Subject: servlet help I am running tomcat5.5.4, apache2.0.52 and jk2. 1)I an run my jsp's and servlets from root. I have configured tomcat to run my jsp's from the homedirs, but I do not know how to configure tomcat to run servlets from the homedirs. I can run my jsp's like this: http://myserver/~myhomedir/myfile.jsp or http://myserver:8080/~myhomedir/myfile.jsp Either way it works fine. What do I need to add so that my servlets run from my homedirs as well?? These are my configuration files: /usr/local/apache/workers2.properties info=Ajp13 forwarding over socket tomcatId=localhost:8009 #define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 ` # Map the Tomcat examples webapp to the Web server uri space #[uri:/jkstatus/*] #group=status:status # Uri mapping [uri:/jsp-examples/*] [uri:spark.iss.utep.edu/*.jsp] group=ajp13:localhost:8009 I added the following in my httpd.conf also: Location /*.jsp JkUriSet worker ajp13:localhost:8009 /Location (Before I would just add the lines below in my httpd.conf, and jsp's and servlets would work! JkMount /*.jsp ajp13 JkMount /*/servlet/ ajp13) Also, I have the following in my server.xml file to run my jsp's from my homedirs: Listener className=org.apache.catalina.startup.UserConfig directoryName=wwwdocs userClass=org.apache.catalina.startup.PasswdUserDatabase/ What am I missing??? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet help
Configurando Apache + Jakarta-TOMCAT + Connector MOD_JKConfigurando Apache + Jakarta-TOMCAT + Connector MOD_JKHi... follow down the mini-howto (Unfortunely I write in portuguese so I have to make a translation...) I will work on it to translante and correct some issues... perhaps even in portuguese he can help you When I finish the translation I post to you again... (if you need any help to especific parts mail me!) Configurando Apache + Jakarta-TOMCAT + Connector MOD_JK Por: David da Guia Carvalho Data: 09-09-2004 Consideramos que o leitor possua o seguinte ambiente: Apache 1.3 ou 2.0; (+DEVEL) + APXS; J2SDK 1.4; Jakarta-Tomcat 5.0; GCC, G++ e DEVEL (LIBS e HEADERS); Conveo do tutorial: Letras em Itlico so utilizadas para comandos de Shell; Letras em courier so utilizadas em contedo de arquivos; Este mtodo foi utilizado repetidamente em DEBIAN 3.0 e Conectiva 10 (Redhat like). (ambos atualizados na data (09-09-2004)). APACHE: A instalao do Apache padro da distribuio: Debian: Server version Apache/1.3.26 (Unix) Debian GNU/Linux nenhuma modificao. Conectiva: Server Apache/2.0.49 (A nica modificao feito foi no arquivo /etc/apache/conf/httpd.conf em DocummentRoot por motivos de padronizao.) De: DocumentRoot=/srv/www/default/html Para: DocumentRoot=/var/www ( ESTA MODIFICAO NO INFLUENCIA NO FUNCIONAMENTO DO APACHE + TOMCAT ) O JSDK e JAKARTA-TOMCAT: Em ambas as distribuies instalamos JSDK e TOMCAT em /opt. No arquivo /etc/profile foram colocadas as seguintes variveis que indicam onde estas aplicaes foram instaladas segue abaixo um exemplo: JAVA_HOME=/opt/j2sdk1.4.2_05 JRE_HOME=/opt/j2sdk1.4.2_05/jre TOMCAT_HOME=/opt/jakarta-tomcat-5.0.27 export JAVA_HOME export JRE_HOME export TOMCAT Os COMPILADORES: GCC, G++, LIBS e DEVELS foram instalados segundo o padro da distribuio (instalao via apt-get) Introduo: Onde obter o arquivo? Baixe o arquivo: jakarta-tomcat-connectors-jk-1.2.6.src.tar.gz (http://archieve.apache.org/dist/jakarta/tomcat-connectors/jk/source/jakarta-tomcat-connectors-jk-1.2.6-src.tar.gv) Instalao: Descompacte-o em uma pasta de sua escolha (no nosso exemplo utilizaremos /usr/src) #tar -zxvf jakarta-tomcat-connectors-jk-1.2.6-src.tar.gz Entre na pasta que foi criada. #cd /usr/src/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native dentrodo diretorio inicie os preparos para a compilao: #./configure with-apxs=/usr/sbin/apxs ( Caso necessario o diretorio do apxs pode ser localizado com o comando: #locate apxs Caso nunca tenha utilizado o comando locate atualize suas bases de dadods com o comando: #updatedb ) Aps conseguir executar o configure com sucesso execute o comando make: #make aps o comando make copie o arquivo gerado para o diretorio de mdulos do apache (isso varia de distribuio). PARA DEBIAN 3.0: #cp /usr/src/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.so.0.0.0 /usr/lib/apache/1.3/mod_jk.so PARA CONECTIVA 10: #cp /usr/src/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.so /usr/lib/apache/modules Configurando o Apache: No diretorio conf (para Debian: /etc/apache para Conectiva: /etc/apache/conf/) do apache, edite o arquivo httpd.conf Na seo LoadModule adicione as seguintes linhas: PARA DEBIAN: ## ### Java ### ### TOMCAT ### ## LoadFile /usr/lib/libpthread.so LoadModule jk_module /usr/lib/apache/1.3/mod_jk.so #AddModule mod_jk.c JkWorkersFile /opt/jakarta-tomcat-5.0.28/conf/workers.properties JkLogFile /var/log/apache/mod_jk.log JkLogLevel debug JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkRequestLogFormat %w %V %T # JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 # send all requests ending in .jsp to # JkMount /*.jsp worker1 # send all requests ending /servlet to worker1 # JkMount /*/servlet/ worker1 # send all requests jsp requests to files located in /otherworker will go worker2 # JkMount /otherworker/*.jsp worker2 # Para CONECTIVA: ## ### JAVA ### ### TOMCAT ### ## #LoadFile /usr/lib/libpthread.so LoadModule jk_module /usr/lib/apache/modules/mod_jk.so # AddModule mod_jk.c JkWorkersFile /opt/jakarta-tomcat-5.0.27/conf/workers.properties JkLogFile /var/log/apache/mod_jk.log JkLogLevel debug JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkRequestLogFormat %w %V %T # JkMount /*.jsp ajp13 # send all requests ending in .jsp to # JkMount /*.jsp worker1 # send all requests ending /servlet to worker1 # JkMount /*/servlet/ worker1 # send all requests jsp requests to files located in /otherworker will go worker2 # JkMount /otherworker/*.jsp worker2 # No final do arquivo httpd.conf (tanto p/ conectiva quanto p/ debian) adicione: Alias /jsp-examples \ /opt/jakarta-tomcat-5.0.27/webapps/jsp-examples Configurando o TOMCAT: Edite (criar caso no exista) o arquivo: /opt/jakarta-tomcat-5.0.27/conf/worker.properties inserir o seguinte conteudo:
RE: servlet help
Thanks for your support David. Unfortunately, the configuration for jk2 is a bit different, but I really appreciate it. -Original Message- From: David da Guia Carvalho [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 1:52 PM To: Tomcat Users List Subject: RE: servlet help Configurando Apache + Jakarta-TOMCAT + Connector MOD_JKConfigurando Apache + Jakarta-TOMCAT + Connector MOD_JKHi... follow down the mini-howto (Unfortunely I write in portuguese so I have to make a translation...) I will work on it to translante and correct some issues... perhaps even in portuguese he can help you When I finish the translation I post to you again... (if you need any help to especific parts mail me!) Configurando Apache + Jakarta-TOMCAT + Connector MOD_JK Por: David da Guia Carvalho Data: 09-09-2004 Consideramos que o leitor possua o seguinte ambiente: Apache 1.3 ou 2.0; (+DEVEL) + APXS; J2SDK 1.4; Jakarta-Tomcat 5.0; GCC, G++ e DEVEL (LIBS e HEADERS); Conveção do tutorial: Letras em Itálico são utilizadas para comandos de Shell; Letras em courier são utilizadas em conteúdo de arquivos; Este método foi utilizado repetidamente em DEBIAN 3.0 e Conectiva 10 (Redhat like). (ambos atualizados na data (09-09-2004)). APACHE: A instalação do Apache padrão da distribuição: Debian: Server version Apache/1.3.26 (Unix) Debian GNU/Linux nenhuma modificação. Conectiva: Server Apache/2.0.49 (A única modificação feito foi no arquivo /etc/apache/conf/httpd.conf em DocummentRoot por motivos de padronização.) De: DocumentRoot=/srv/www/default/html Para: DocumentRoot=/var/www ( ESTA MODIFICAÇÃO NÃO INFLUENCIA NO FUNCIONAMENTO DO APACHE + TOMCAT ) O JSDK e JAKARTA-TOMCAT: Em ambas as distribuições instalamos JSDK e TOMCAT em /opt. No arquivo /etc/profile foram colocadas as seguintes variáveis que indicam onde estas aplicações foram instaladas segue abaixo um exemplo: JAVA_HOME=/opt/j2sdk1.4.2_05 JRE_HOME=/opt/j2sdk1.4.2_05/jre TOMCAT_HOME=/opt/jakarta-tomcat-5.0.27 export JAVA_HOME export JRE_HOME export TOMCAT Os COMPILADORES: GCC, G++, LIBS e DEVELS foram instalados segundo o padrão da distribuição (instalação via apt-get) Introdução: Onde obter o arquivo? Baixe o arquivo: jakarta-tomcat-connectors-jk-1.2.6.src.tar.gz (http://archieve.apache.org/dist/jakarta/tomcat-connectors/jk/source/jakarta-tomcat-connectors-jk-1.2.6-src.tar.gv) Instalação: Descompacte-o em uma pasta de sua escolha (no nosso exemplo utilizaremos /usr/src) #tar -zxvf jakarta-tomcat-connectors-jk-1.2.6-src.tar.gz Entre na pasta que foi criada. #cd /usr/src/jakarta-tomcat-connectors-jk-1.2.6-src/jk/native dentrodo diretorio inicie os preparos para a compilação: #./configure -with-apxs=/usr/sbin/apxs ( Caso necessario o diretorio do apxs pode ser localizado com o comando: #locate apxs Caso nunca tenha utilizado o comando locate atualize suas bases de dadods com o comando: #updatedb ) Após conseguir executar o configure com sucesso execute o comando make: #make após o comando make copie o arquivo gerado para o diretorio de módulos do apache (isso varia de distribuição). PARA DEBIAN 3.0: #cp /usr/src/jakarta-tomcat-connectors/jk/native/apache-1.3/mod_jk.so.0.0.0 /usr/lib/apache/1.3/mod_jk.so PARA CONECTIVA 10: #cp /usr/src/jakarta-tomcat-connectors/jk/native/apache-2.0/mod_jk.so /usr/lib/apache/modules Configurando o Apache: No diretorio conf (para Debian: /etc/apache para Conectiva: /etc/apache/conf/) do apache, edite o arquivo httpd.conf Na seção LoadModule adicione as seguintes linhas: PARA DEBIAN: ## ### Java ### ### TOMCAT ### ## LoadFile /usr/lib/libpthread.so LoadModule jk_module /usr/lib/apache/1.3/mod_jk.so #AddModule mod_jk.c JkWorkersFile /opt/jakarta-tomcat-5.0.28/conf/workers.properties JkLogFile /var/log/apache/mod_jk.log JkLogLevel debug JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkRequestLogFormat %w %V %T # JkMount /*.jsp ajp13 JkMount /servlet/* ajp13 # send all requests ending in .jsp to # JkMount /*.jsp worker1 # send all requests ending /servlet to worker1 # JkMount /*/servlet/ worker1 # send all requests jsp requests to files located in /otherworker will go worker2 # JkMount /otherworker/*.jsp worker2 # Para CONECTIVA: ## ### JAVA ### ### TOMCAT ### ## #LoadFile /usr/lib/libpthread.so LoadModule jk_module /usr/lib/apache/modules/mod_jk.so # AddModule mod_jk.c JkWorkersFile /opt/jakarta-tomcat-5.0.27/conf/workers.properties JkLogFile /var/log/apache/mod_jk.log JkLogLevel debug JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkRequestLogFormat %w %V %T # JkMount /*.jsp ajp13 # send all requests ending in .jsp to # JkMount /*.jsp worker1 # send all requests ending /servlet to worker1 # JkMount /*/servlet/ worker1 # send all requests jsp requests to files located in /otherworker will go worker2 # JkMount /otherworker/*.jsp worker2
Re: servlet help
Claudia, Are you using mod_jk with Apache and Tomcat? You should be able to configure in Apache's httpd.conf to forward particular url patterns to your Tomcat(s') worker(s). Something like: JkMount /yourapp/* yourworker More details are in mod_jk documentation. I do not think that there is a way to forward only servlet calls, as you can not be sure from the URL. Usually, your URL/URI will have some servlet app. specific context which will help you. Regards, Edmon Software Architecture to the Rescue - Original Message - From: Casas, Claudia [EMAIL PROTECTED] To: Tomcat Users List tomcat-user@jakarta.apache.org Sent: Wednesday, January 12, 2005 3:16 PM Subject: RE: servlet help Oki doki, I got my servlets to work from tomcat using port 8080 (http://myserver:8080/~myacct/servlet/myservlet), but I still do not know how to make apache recognize my servlets and send them to tomcat. I want to access (http://myserver/~myacct/servlet/myservlet) I tried to add these lines to httpd.conf Location /servlet/* JkUriSet worker ajp13:localhost:8009 /Location and also added these lines to workers2.properties [uri:spark.iss.utep.edu/servlet/*] group=ajp13:localhost:8009 but still no luck! :( please help. For reference I used the following taken from the web site: http://www.jolash.com/tomcat/ Configure the tomcat web.xml file in your tomcat's conf directory. You only need to do this if you are going to write servlets. After doing this, you can put all your servlets into the subdirectory WEB-INF/classes of your webapp directory. And you can access those servlets with a URL like: Uncomment the servlet element tags with the servlet-name of invoker (just search for invoker). 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 Uncomment the servlet-mapping element tags with the servlet-name of invoker. !-- The mapping for the invoker servlet -- servlet-mapping servlet-nameinvoker/servlet-name url-pattern/servlet/*/url-pattern /servlet-mapping -Original Message- From: Casas, Claudia [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 12, 2005 11:56 AM To: tomcat-user@jakarta.apache.org Subject: servlet help I am running tomcat5.5.4, apache2.0.52 and jk2. 1)I an run my jsp's and servlets from root. I have configured tomcat to run my jsp's from the homedirs, but I do not know how to configure tomcat to run servlets from the homedirs. I can run my jsp's like this: http://myserver/~myhomedir/myfile.jsp or http://myserver:8080/~myhomedir/myfile.jsp Either way it works fine. What do I need to add so that my servlets run from my homedirs as well?? These are my configuration files: /usr/local/apache/workers2.properties info=Ajp13 forwarding over socket tomcatId=localhost:8009 #define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 ` # Map the Tomcat examples webapp to the Web server uri space #[uri:/jkstatus/*] #group=status:status # Uri mapping [uri:/jsp-examples/*] [uri:spark.iss.utep.edu/*.jsp] group=ajp13:localhost:8009 I added the following in my httpd.conf also: Location /*.jsp JkUriSet worker ajp13:localhost:8009 /Location (Before I would just add the lines below in my httpd.conf, and jsp's and servlets would work! JkMount /*.jsp ajp13 JkMount /*/servlet/ ajp13) Also, I have the following in my server.xml file to run my jsp's from my homedirs: Listener className=org.apache.catalina.startup.UserConfig directoryName=wwwdocs userClass=org.apache.catalina.startup.PasswdUserDatabase/ What am I missing??? - 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: servlet help please
Howdy, servlet-mapping servlet-nameMessageServlet1/servlet-name url-pattern/servlet/MessageServlet1/url-pattern /servlet-mapping The problem is when I add the above code to the xml file nothing Under servlets-examples will run. What am I doing wrong? You need to have a servlet element in your web.xml file defining what class MessageServlet1 is, e.g. servlet servlet-nameMessageServlet1/servlet-name servlet-classcom.mycompany.SomeServlet/servlet-class /servlet It's preferable to put this servlet element before the servlet-mapping one ;) Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet help please
Hi Howdy, servlet-mapping servlet-nameMessageServlet1/servlet-name url-pattern/servlet/MessageServlet1/url-pattern /servlet-mapping The problem is when I add the above code to the xml file nothing Under servlets-examples will run. What am I doing wrong? You need to have a servlet element in your web.xml file defining what class MessageServlet1 is, e.g. servlet servlet-nameMessageServlet1/servlet-name servlet-classcom.mycompany.SomeServlet/servlet-class /servlet It's preferable to put this servlet element before the servlet-mapping one ;) Yoav Shapira ok got it :-) Thanks now I am getting the following error HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: No servlet class has been specified for servlet MessageServlet1 org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator Base.java:509) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :164) org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82 8) org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:700) org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 4) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:683) java.lang.Thread.run(Thread.java:534) note The full stack trace of the root cause is available in the Tomcat logs. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet help please
Howdy, javax.servlet.ServletException: No servlet class has been specified for servlet MessageServlet1 Post the servlet and servlet-mapping elements from your amended web.xml. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet help please
Paste your servlet and servlet-mapping code here. Kind Regards Schalk Neethling Web Developer.Designer.Programmer.CEO Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.com This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: Jason Tesser [mailto:[EMAIL PROTECTED] :: Sent: Tuesday, February 17, 2004 9:22 PM :: To: Tomcat Users List :: Subject: RE: servlet help please :: :: Hi :: :: Howdy, :: ::servlet-mapping ::servlet-nameMessageServlet1/servlet-name ::url-pattern/servlet/MessageServlet1/url-pattern ::/servlet-mapping :: :: The problem is when I add the above code to the xml file nothing :: Under :: servlets-examples will run. What am I doing wrong? :: :: You need to have a servlet element in your web.xml file defining :: what :: class MessageServlet1 is, e.g. :: servlet ::servlet-nameMessageServlet1/servlet-name ::servlet-classcom.mycompany.SomeServlet/servlet-class :: /servlet :: :: It's preferable to put this servlet element before the servlet-mapping :: one ;) :: :: Yoav Shapira :: :: ok got it :-) Thanks now I am getting the following error :: :: HTTP Status 500 - :: :: :: :: :: type Exception report :: :: message :: :: description The server encountered an internal error () that prevented :: it from fulfilling this request. :: :: exception :: :: javax.servlet.ServletException: No servlet class has been specified for :: servlet MessageServlet1 :: :: org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator :: Base.java:509) :: :: org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :: :164) :: :: org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) :: :: org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82 :: 8) :: :: org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC :: onnection(Http11Protocol.java:700) :: :: org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 :: 4) :: :: org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool :: .java:683) :: java.lang.Thread.run(Thread.java:534) :: :: :: note The full stack trace of the root cause is available in the Tomcat :: logs. :: :: - :: 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: servlet help please
Hi, Yes I got it working. Thank you all for the help. Paste your servlet and servlet-mapping code here. Kind Regards Schalk Neethling Web Developer.Designer.Programmer.CEO Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.com This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: Jason Tesser [mailto:[EMAIL PROTECTED] :: Sent: Tuesday, February 17, 2004 9:22 PM :: To: Tomcat Users List :: Subject: RE: servlet help please :: :: Hi :: :: Howdy, :: :: servlet-mapping :: servlet-nameMessageServlet1/servlet-name :: url-pattern/servlet/MessageServlet1/url-pattern :: /servlet-mapping :: :: The problem is when I add the above code to the xml file nothing :: Under :: servlets-examples will run. What am I doing wrong? :: :: You need to have a servlet element in your web.xml file defining :: what :: class MessageServlet1 is, e.g. :: servlet ::servlet-nameMessageServlet1/servlet-name ::servlet-classcom.mycompany.SomeServlet/servlet-class :: /servlet :: :: It's preferable to put this servlet element before the servlet- mapping :: one ;) :: :: Yoav Shapira :: :: ok got it :-) Thanks now I am getting the following error :: :: HTTP Status 500 - :: :: --- - :: :: :: type Exception report :: :: message :: :: description The server encountered an internal error () that prevented :: it from fulfilling this request. :: :: exception :: :: javax.servlet.ServletException: No servlet class has been specified for :: servlet MessageServlet1 :: :: org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticator :: Base.java:509) :: :: org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java :: :164) :: :: org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) :: :: org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82 :: 8) :: :: org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC :: onnection(Http11Protocol.java:700) :: :: org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:58 :: 4) :: :: org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool :: .java:683) ::java.lang.Thread.run(Thread.java:534) :: :: :: note The full stack trace of the root cause is available in the Tomcat :: logs. :: :: - :: 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet help please
hi tell me one thing...that u added the servlet tag in ur web.xml file or not... if not then add it to web.xml file servlet servlet-nameMessageServlet1/servlet-name servlet-classMessageServlet1/servlet-class /servlet try with this... programme runs???...or not runlet me know by by jugal Jason Tesser wrote: OK I am new to Tomcat and I am going through one of Sun's courses regarding Web apps. I am working on the below example; I have complied the code ok And put it in the servlets-examples/classes. I also went into the web.xml File under the servlets-examples directory and added the following servlet-mapping servlet-nameMessageServlet1/servlet-name url-pattern/servlet/MessageServlet1/url-pattern /servlet-mapping The problem is when I add the above code to the xml file nothing Under servlets-examples will run. What am I doing wrong? Here is the java code for MessageServlet1 import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; // Support classes import java.io.IOException; import java.io.PrintWriter; public class MessageServlet1 extends HttpServlet { private static final String[] MESSAGES = { How are you today?, What's in a name? That which we call a rose by any other name would smell as sweet., My hovercraft is full of eels. }; public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { // Pick a random message int msg_index = (int) (Math.random() * MESSAGES.length); String message = MESSAGES[msg_index]; response.setContentType(text/html); PrintWriter out = response.getWriter(); out.println(HTML); out.println(HEAD); out.println(TITLEMessage Servlet/TITLE); out.println(/HEAD); out.println(BODY BGCOLOR='white'); out.println(The message is: BR); out.println(BLOCKQUOTE + message + /BLOCKQUOTE); out.println(/BODY); out.println(/HTML); out.close(); } } - 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: Servlet help needed!
//Invalidate session if inactive for more than 1 hour if(!session.isNew()){ // skip new sessions Date hourAgo = new Date(System.currentTimeMillis() - 60*60*1000); Date accessed = new Date(session.getLastAccessedTime()); if(accessed.before(hourAgo)) session.invalidate(); } FIkayo Otun wrote: Good day(Sir/ma), I am a java programmer just starting to explore the J2ee platform. I use jdk1.4.2... and tomcat to develop and deploy my servlet. I however need a way to end my session when ever I close my browser. I noticed when I close my browser my session will still be on. I am currently ussing servlet to develop an online apllication. I this I realy need to find A solution to my problem. Fikayo, from Nigeria -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help needed!
For me when you close the browser the session is invalidated... also, tomcat also has a 30min default expiry for inactive sessions (elimating the need for below) - Original Message - From: Rick Roberts [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Saturday, July 12, 2003 11:30 PM Subject: Re: Servlet help needed! //Invalidate session if inactive for more than 1 hour if(!session.isNew()){ // skip new sessions Date hourAgo = new Date(System.currentTimeMillis() - 60*60*1000); Date accessed = new Date(session.getLastAccessedTime()); if(accessed.before(hourAgo)) session.invalidate(); } FIkayo Otun wrote: Good day(Sir/ma), I am a java programmer just starting to explore the J2ee platform. I use jdk1.4.2... and tomcat to develop and deploy my servlet. I however need a way to end my session when ever I close my browser. I noticed when I close my browser my session will still be on. I am currently ussing servlet to develop an online apllication. I this I realy need to find A solution to my problem. Fikayo, from Nigeria -- *** * Rick Roberts* * Advanced Information Technologies, Inc. * *** - 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: Servlet help
Once you have compiled the new servlet either jar it up or copy it directly to your WEB-INF/classes, if you jar'd it then copy the jar to WEB-INF/lib. Now within moments your servlet should be available unless you have: - turned servlet reloading off - have not made an entry for the servlet in your web.xml If you have not then delete the subdirectories within your work directory, as this will cause tomcat to regenerate all the webapp files thus providing your users with the most current version. hope that helps... -Original Message- From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 3:01 PM To: 'Tomcat Users List' Subject: Servlet help This seems like a silly question: when I make changes in my servlet what do I have to do to load the new file? I have tried just saving it. I have tried restarting Tomcat. I have tried recompiling the file. I have tried recompiling while Tomcat was shutdown and while Tomcat was running. I have tried restarting the machine. Only restarting the machine seems to work. Comments? Suggestions? Ridicule? Sandra Patricia Hunter Systems Development and Web Design - 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: Servlet help
Error message? Log file contents? John On Wed, 26 Mar 2003 18:47:01 -0800, Sandra Patricia Hunter [EMAIL PROTECTED] wrote: Thanks. I got my servlet up and running but now I can't run my jsp. After rebooting I can see my jsp but I can't load another one. Something is stuck somewhere according to some configuration I have made, but I don't even know where to begin to look or what more information to give you. Any ideas? Sandra Patricia Hunter Systems Development and Web Design -Original Message- From: Vladimer Shioshvili [mailto:[EMAIL PROTECTED] Sent: March 26, 2003 3:13 PM To: Tomcat Users List Subject: Re: Servlet help Sandra, if you are planning to do the changes often you are probably better off if you set reloadable parameter to true in server.xml file, (http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html) however, setting it to reloadable means that you should accept that it will eat up some of your CPU time as well (not a significant one, but it's there).. otherwise, compiling your file, and restarting tomcat should suffice... vlad At 06:00 PM 3/26/2003, you wrote: This seems like a silly question: when I make changes in my servlet what do I have to do to load the new file? I have tried just saving it. I have tried restarting Tomcat. I have tried recompiling the file. I have tried recompiling while Tomcat was shutdown and while Tomcat was running. I have tried restarting the machine. Only restarting the machine seems to work. Comments? Suggestions? Ridicule? Sandra Patricia Hunter Systems Development and Web Design - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Vladimer Shioshvili QRC Division of Macro International Inc. 7315 Wisconsin Avenue, Suite 400W Bethesda, MD 20814 Phone: (301) 657 3077 ext. 155 - 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] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help
Thanks Paul. I have checked that reloading is set to true and there is an entry for my servlet (it wouldn't run otherwise would it?) in my web.xml file. Just as an aside: what is the purpose of the work folder? Sandra Patricia Hunter Systems Development and Web Design -Original Message- From: Paul Gregoire [mailto:[EMAIL PROTECTED] Sent: March 26, 2003 3:14 PM To: Tomcat Users List Subject: RE: Servlet help Once you have compiled the new servlet either jar it up or copy it directly to your WEB-INF/classes, if you jar'd it then copy the jar to WEB-INF/lib. Now within moments your servlet should be available unless you have: - turned servlet reloading off - have not made an entry for the servlet in your web.xml If you have not then delete the subdirectories within your work directory, as this will cause tomcat to regenerate all the webapp files thus providing your users with the most current version. hope that helps... -Original Message- From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 3:01 PM To: 'Tomcat Users List' Subject: Servlet help This seems like a silly question: when I make changes in my servlet what do I have to do to load the new file? I have tried just saving it. I have tried restarting Tomcat. I have tried recompiling the file. I have tried recompiling while Tomcat was shutdown and while Tomcat was running. I have tried restarting the machine. Only restarting the machine seems to work. Comments? Suggestions? Ridicule? Sandra Patricia Hunter Systems Development and Web Design - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help
John: Here is the error message when I attempt to run a JSP after running a servlet: javax.servlet.ServletException: Error allocating a servlet instance at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:659) When I run my JSP this is the root cause of error: java.lang.NoClassDefFoundError: idcard/PasswordBuilder (wrong name: PasswordBuilder) This refers to a file that I use with my SERVLET not JSP. I have checked that reload is set to true and that everything is included in the appropriate xml files (context path in server.xml, servlet info in web.xml). Currently the work folder is empty. Local_host_access_log: 127.0.0.1 - - [27/Mar/2003:06:14:15 -0800] GET /idcard/servlet/ProtectedPage HTTP/1.1 500 3854 127.0.0.1 - - [27/Mar/2003:06:31:24 -0800] GET /idcard/indexIDLogin.jsp HTTP/1.1 500 6281 127.0.0.1 - - [27/Mar/2003:06:33:08 -0800] GET /idcard/orgIndexID.jsp HTTP/1.1 500 6281 127.0.0.1 - - [27/Mar/2003:06:33:41 -0800] GET /idcard/orgIndexID.jsp HTTP/1.1 500 6281 Apache_log: 003-03-27 06:32:36 [org.apache.catalina.connector.warp.WarpConnector] Error accepting requests java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:343) at java.net.ServerSocket.implAccept(ServerSocket.java:438) at java.net.ServerSocket.accept(ServerSocket.java:409) at org.apache.catalina.connector.warp.WarpConnector.run(WarpConnector.java:590) at java.lang.Thread.run(Thread.java:536) 2003-03-27 06:33:34 [org.apache.catalina.connector.warp.WarpConnector] Error accepting requests java.net.SocketException: socket closed at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:343) at java.net.ServerSocket.implAccept(ServerSocket.java:438) at java.net.ServerSocket.accept(ServerSocket.java:409) at org.apache.catalina.connector.warp.WarpConnector.run(WarpConnector.java:590) at java.lang.Thread.run(Thread.java:536) Catalina_log: 2003-03-27 05:59:45 HttpConnector Opening server socket on all host IP addresses 2003-03-27 05:59:49 HttpConnector[8080] Starting background thread 2003-03-27 05:59:49 HttpProcessor[8080][0] Starting background thread 2003-03-27 05:59:49 HttpProcessor[8080][1] Starting background thread 2003-03-27 05:59:49 HttpProcessor[8080][2] Starting background thread 2003-03-27 05:59:49 HttpProcessor[8080][3] Starting background thread 2003-03-27 05:59:49 HttpProcessor[8080][4] Starting background thread 2003-03-27 05:59:49 Ajp13Connector[8009] Opening server socket on all host IP addresses 2003-03-27 05:59:49 Ajp13Connector[8009] Starting background thread 2003-03-27 05:59:49 Ajp13Processor[8009][0] Starting background thread 2003-03-27 05:59:49 Ajp13Processor[8009][1] Starting background thread 2003-03-27 05:59:49 Ajp13Processor[8009][2] Starting background thread 2003-03-27 05:59:49 Ajp13Processor[8009][3] Starting background thread 2003-03-27 05:59:49 Ajp13Processor[8009][4] Starting background thread 2003-03-27 06:32:30 HttpProcessor[8080][4] Stopping background thread 2003-03-27 06:32:30 HttpProcessor[8080][3] Stopping background thread 2003-03-27 06:32:30 HttpProcessor[8080][2] Stopping background thread 2003-03-27 06:32:30 HttpProcessor[8080][1] Stopping background thread 2003-03-27 06:32:30 HttpProcessor[8080][0] Stopping background thread 2003-03-27 06:32:30 HttpConnector[8080] Stopping background thread 2003-03-27 06:32:30 Ajp13Processor[8009][4] Stopping background thread 2003-03-27 06:32:30 Ajp13Processor[8009][3] Stopping background thread 2003-03-27 06:32:30 Ajp13Processor[8009][2] Stopping background thread 2003-03-27 06:32:30 Ajp13Processor[8009][1] Stopping background thread 2003-03-27 06:32:30 Ajp13Processor[8009][0] Stopping background thread 2003-03-27 06:32:30 Ajp13Connector[8009] Stopping background thread 2003-03-27 06:32:37 HttpConnector Opening server socket on all host IP addresses 2003-03-27 06:32:40 HttpConnector[8080] Starting background thread 2003-03-27 06:32:40 HttpProcessor[8080][0] Starting background thread 2003-03-27 06:32:40 HttpProcessor[8080][1] Starting background thread 2003-03-27 06:32:40 HttpProcessor[8080][2] Starting background thread 2003-03-27 06:32:40 HttpProcessor[8080][3] Starting background thread 2003-03-27 06:32:40 HttpProcessor[8080][4] Starting background thread 2003-03-27 06:32:40 Ajp13Connector[8009] Opening server socket on all host IP addresses 2003-03-27 06:32:40 Ajp13Connector[8009] Starting background thread 2003-03-27 06:32:40 Ajp13Processor[8009][0] Starting background thread 2003-03-27 06:32:40 Ajp13Processor[8009][1] Starting background thread 2003-03-27 06:32:40 Ajp13Processor[8009][2] Starting background thread 2003-03-27 06:32:40 Ajp13Processor[8009][3] Starting background thread 2003-03-27 06:32:40 Ajp13Processor[8009][4] Starting background thread 2003-03-27 06:33:29
RE: Servlet help
Howdy, Just as an aside: what is the purpose of the work folder? To hold temporary tomcat work products, e.g. the compiled JSP servlets. Tomcat uses this space as it sees fit, and tomcat is responsible for the freshness / dirtiness (in cache terms) of the contents of the work directories, as long as you follow standard deployment / reloading procedures for your web applications. If you have cause to belive tomcat is serving old contents, e.g. an old version of a JSP, one thing to try is stop tomcat and clean out the work directory. Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help
Thanks Yoav. Now I know what it is for. Any ideas why I am having problems starting up a JSP after I have run a servlet? Tomcat seems to continue referring to the servlet information even when it has been stopped and started and I have even rebooted. It's like the servlet takes over and the JSP is lost. I have included log files and so on in another message with this same title. Sandra Patricia Hunter Systems Development and Web Design -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: March 27, 2003 6:56 AM To: Tomcat Users List Subject: RE: Servlet help Howdy, Just as an aside: what is the purpose of the work folder? To hold temporary tomcat work products, e.g. the compiled JSP servlets. Tomcat uses this space as it sees fit, and tomcat is responsible for the freshness / dirtiness (in cache terms) of the contents of the work directories, as long as you follow standard deployment / reloading procedures for your web applications. If you have cause to belive tomcat is serving old contents, e.g. an old version of a JSP, one thing to try is stop tomcat and clean out the work directory. Yoav Shapira Millennium ChemInformatics This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - 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: Servlet help
The work folder is where Tomcat keeps its cache. For example, when a JSP is compiled into a servlet, Tomcat stores the .java file for that servlet in it's work folder. John On Thu, 27 Mar 2003 06:38:37 -0800, Sandra Patricia Hunter [EMAIL PROTECTED] wrote: Thanks Paul. I have checked that reloading is set to true and there is an entry for my servlet (it wouldn't run otherwise would it?) in my web.xml file. Just as an aside: what is the purpose of the work folder? Sandra Patricia Hunter Systems Development and Web Design -Original Message- From: Paul Gregoire [mailto:[EMAIL PROTECTED] Sent: March 26, 2003 3:14 PM To: Tomcat Users List Subject: RE: Servlet help Once you have compiled the new servlet either jar it up or copy it directly to your WEB-INF/classes, if you jar'd it then copy the jar to WEB- INF/lib. Now within moments your servlet should be available unless you have: -turned servlet reloading off -have not made an entry for the servlet in your web.xml If you have not then delete the subdirectories within your work directory, as this will cause tomcat to regenerate all the webapp files thus providing your users with the most current version. hope that helps... -Original Message- From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 3:01 PM To: 'Tomcat Users List' Subject: Servlet help This seems like a silly question: when I make changes in my servlet what do I have to do to load the new file? I have tried just saving it. I have tried restarting Tomcat. I have tried recompiling the file. I have tried recompiling while Tomcat was shutdown and while Tomcat was running. I have tried restarting the machine. Only restarting the machine seems to work. Comments? Suggestions? Ridicule? Sandra Patricia Hunter Systems Development and Web Design - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet help
Okay. Thanks, John. Any idea why nothing else will run after I run a servlet? Tomcat continues to refer to the servlet files, which are not part of the JSP. I can't even run a simple html page. It is like the servlet takes over, but where and how? The work folder remains empty. See earlier in this thread for logs and error messages. Sandra Patricia Hunter Systems Development and Web Design -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: March 27, 2003 7:13 AM To: Tomcat Users List Subject: Re: Servlet help The work folder is where Tomcat keeps its cache. For example, when a JSP is compiled into a servlet, Tomcat stores the .java file for that servlet in it's work folder. John On Thu, 27 Mar 2003 06:38:37 -0800, Sandra Patricia Hunter [EMAIL PROTECTED] wrote: Thanks Paul. I have checked that reloading is set to true and there is an entry for my servlet (it wouldn't run otherwise would it?) in my web.xml file. Just as an aside: what is the purpose of the work folder? Sandra Patricia Hunter Systems Development and Web Design -Original Message- From: Paul Gregoire [mailto:[EMAIL PROTECTED] Sent: March 26, 2003 3:14 PM To: Tomcat Users List Subject: RE: Servlet help Once you have compiled the new servlet either jar it up or copy it directly to your WEB-INF/classes, if you jar'd it then copy the jar to WEB- INF/lib. Now within moments your servlet should be available unless you have: -turned servlet reloading off -have not made an entry for the servlet in your web.xml If you have not then delete the subdirectories within your work directory, as this will cause tomcat to regenerate all the webapp files thus providing your users with the most current version. hope that helps... -Original Message- From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 3:01 PM To: 'Tomcat Users List' Subject: Servlet help This seems like a silly question: when I make changes in my servlet what do I have to do to load the new file? I have tried just saving it. I have tried restarting Tomcat. I have tried recompiling the file. I have tried recompiling while Tomcat was shutdown and while Tomcat was running. I have tried restarting the machine. Only restarting the machine seems to work. Comments? Suggestions? Ridicule? Sandra Patricia Hunter Systems Development and Web Design - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/ - 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: Servlet help
Is tomcat being run as a service? If so you have to restart it there and sometimes I also have to go to the command line c:\tomcat\bin\shutdown ... c:\tomcat\bin\startup for it to take. If your using the newer versions of tomcat it doesn't seem to work any other way. -wiley -Original Message- From: Sandra Patricia Hunter [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 26, 2003 3:01 PM To: 'Tomcat Users List' Subject: Servlet help This seems like a silly question: when I make changes in my servlet what do I have to do to load the new file? I have tried just saving it. I have tried restarting Tomcat. I have tried recompiling the file. I have tried recompiling while Tomcat was shutdown and while Tomcat was running. I have tried restarting the machine. Only restarting the machine seems to work. Comments? Suggestions? Ridicule? Sandra Patricia Hunter Systems Development and Web Design - 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: Servlet help
Sandra, if you are planning to do the changes often you are probably better off if you set reloadable parameter to true in server.xml file, (http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/context.html) however, setting it to reloadable means that you should accept that it will eat up some of your CPU time as well (not a significant one, but it's there).. otherwise, compiling your file, and restarting tomcat should suffice... vlad At 06:00 PM 3/26/2003, you wrote: This seems like a silly question: when I make changes in my servlet what do I have to do to load the new file? I have tried just saving it. I have tried restarting Tomcat. I have tried recompiling the file. I have tried recompiling while Tomcat was shutdown and while Tomcat was running. I have tried restarting the machine. Only restarting the machine seems to work. Comments? Suggestions? Ridicule? Sandra Patricia Hunter Systems Development and Web Design - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Vladimer Shioshvili QRC Division of Macro International Inc. 7315 Wisconsin Avenue, Suite 400W Bethesda, MD 20814 Phone: (301) 657 3077 ext. 155 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet help...
--- Clay Mitchell [EMAIL PROTECTED] wrote: How do I define where Tomcat looks for servlets? Where does it look for it by default? Thanks -Clay Have a look at this document http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html It should answer your question. -Janek __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Re: Servlet help needed
Hi, Ante You actually don't need to edit anything in server.xml if your app uses default settings. Just drop your app's directory tree into the webapp subdir and start Tomcat. Which web.xml file did you make changes in anyway? You're not supposed to edit the web.xml in the conf subdir! Hope this helps. Regards, Noel Lecaros BTW, just a friendly reminder. Please don't post in HTML. Not everyone on this list uses an HTML-enabled mail reader. Ante Sabo wrote: I cannot deploy my servlet application to run by Tomcat. I editet server.xml and web.xml files as described in documentation to set up my contextes, but all I got on my screen is Tomcat error message: Mapping context with unregisterred servlet What this message is meaning to me. I beleive I made everything in script files needed to register my sevlet, and also registering context, and it won't work. Can you give me the link to a place where I can find some explanation what is needed to register servlet application. Only way I can register it is to put it under /webapps/examples directory. That way I don't have even to register it - it works, but is that a real solution? With many thanks, regards,Ante Sabo Zagreb UniversityFaculty of organization informaticsVaradin, Croatia http://www.foi.hr http://www.foi.hr/~asabo