RE: Apache + Tomcat socket error
John, From what you've said, I don't believe this is a Tomcat issue, but rather an Apache configuration problem. Make sure that your mod_proxy module is being loaded in the httpd.conf file ( see document: http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypass ) james -Original Message- From: John Archbold [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 20, 2004 2:36 PM To: Tomcat Users List Subject: Re: Apache + Tomcat socket error Hi James thaanks for your help to begin with. I forgot to mention im using apache2 and tomcat5, i tried what u said and it came back with invalid command proxypass have you got any other ideas? On Mon, 19 Jul 2004 16:35:56 -0500, McClure, James [EMAIL PROTECTED] wrote: Hi John, Give this a try... To get to your application via Apache (as a proxy) you will need to configure Apache to pass the request/response via Tomcat by specifying where to go when it sees that you are asking for the specific web application. Create a new file [apache home directory]/conf/myproxy.conf In this file add these 2 proxy entries (port # is for Tomcat 4): ProxyPass /MyFirst/HelloWorld/ http://localhost:8080/MyFirst/HelloWorld ProxyPassReverse /MyFirst/HelloWorld/ http://localhost:8080/MyFirst/HelloWorld Now reference this new file in your httpd.conf file located in ...[apache home directory]/conf/ by adding the following entry at the bottom of the file: include conf/myproxy.conf Restart apache james -Original Message- From: John Archbold [mailto:[EMAIL PROTECTED] Sent: Monday, July 19, 2004 4:17 PM To: [EMAIL PROTECTED] Subject: Apache + Tomcat socket error Hello everyone, I have a simple (probably) yet difficult problem that i cant seem to fix. I installed apache (from source) and tomcat (from binary) and i compiled the jakarta connector as one should. If i issue http://localhost:8080/ i get the tomcat homepage if i issue http://localhost/ i get apache. I followed instructions from a website to set all this up you see. I even managed to compile a servlet and get it working if i issue http://localhost:8080/MyFirst/HelloWorld yet if i issue http://localhost/MyFirst/HelloWorld it is not visible, it says the resource is busy etc. I have noticed tho that the socket file that is specified to be created is infact not being created, ive tried changing the location of the socket file and even using touch to create it. Nothing seems to work. I expect this is some novice problem and im just missing something out. Can anyone help? Many many thanks (ive been trying for weeks to sort this out!) John A - 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]
DefaultContext content not available in Servlet init()
Hello users, My environment: Tomcat 4.1.24, JDK 1.4.1_02, XP. I'm attempting to move some existing jdbc initialization into my servlet's init() method which uses JNDI lookup. This is failing and yielding an exception with the message: Name jdbc is not bound in this Context. The exception is being thrown during the call to the context lookup() method. Prior to these modifications, the same logic exists in the doGet() portion of the servlet and works just fine. My current server.xml configuration contains a DefaultContext section which contains all of my various jdbc resources since these are common to all of web-apps. By trial and error, I have found that if I make a copy of the DefaultContext content and place it as a part of *each* web-app context, then the relocated logic works in init(). However, maintaining multiple entries for each jdbc source I have is not acceptable. I've seen complaints about DefaultContext not working properly, but cannot find anyone who has a workaround for this specific issue. Has anyone seen and addressed this issue successfully? James McClure [EMAIL PROTECTED]
RE: Apache + Tomcat socket error
Hi John, Give this a try... To get to your application via Apache (as a proxy) you will need to configure Apache to pass the request/response via Tomcat by specifying where to go when it sees that you are asking for the specific web application. Create a new file [apache home directory]/conf/myproxy.conf In this file add these 2 proxy entries (port # is for Tomcat 4): ProxyPass /MyFirst/HelloWorld/ http://localhost:8080/MyFirst/HelloWorld ProxyPassReverse /MyFirst/HelloWorld/ http://localhost:8080/MyFirst/HelloWorld Now reference this new file in your httpd.conf file located in ...[apache home directory]/conf/ by adding the following entry at the bottom of the file: include conf/myproxy.conf Restart apache james -Original Message- From: John Archbold [mailto:[EMAIL PROTECTED] Sent: Monday, July 19, 2004 4:17 PM To: [EMAIL PROTECTED] Subject: Apache + Tomcat socket error Hello everyone, I have a simple (probably) yet difficult problem that i cant seem to fix. I installed apache (from source) and tomcat (from binary) and i compiled the jakarta connector as one should. If i issue http://localhost:8080/ i get the tomcat homepage if i issue http://localhost/ i get apache. I followed instructions from a website to set all this up you see. I even managed to compile a servlet and get it working if i issue http://localhost:8080/MyFirst/HelloWorld yet if i issue http://localhost/MyFirst/HelloWorld it is not visible, it says the resource is busy etc. I have noticed tho that the socket file that is specified to be created is infact not being created, ive tried changing the location of the socket file and even using touch to create it. Nothing seems to work. I expect this is some novice problem and im just missing something out. Can anyone help? Many many thanks (ive been trying for weeks to sort this out!) John A - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]