Re: installing a servlet
Donwgrading and using mod_webapp is the WORST thing you could do, for all sorts of reasons. Security, for one. Performance, for another. Future extensibility and growth, for another. Mod_jk and mod_jk2 work. This is a fact. There's nothing anyone can do if you want to give up learning how they work and use something else instead, but the truth is they work, and not just on someone's desktop. Many, many people are using Tomcat and a connector under heavy load in production on a daily basis (I'm one of them and there are many more). Load balancing, multiple instances, all sorts of advanced configurations. If you want to take the time to learn how things work, and why they work that way (Tomcat MUST obey the servlet spec, there is no alternative), then you can get your answers and have a robust, stable system. Its a personal choice. Good luck. John On 24 Jun 2003 07:56:47 +0200, Tony Grant [EMAIL PROTECTED] wrote: From my work of yesterday it seems that the easiest way to get a servlet to run is to downgrade to Tomcat 4.0.x and use mod_webapp... This isn't a very encouraging experience. Cheers Tony Grant -- 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: installing a servlet
I would agree with John - I am no expert by any stretch of the imagination - I installed the latest java, apache and Tomcat and got it working in a morning. Read more is the answer. If you ask nicely there are many people in this list who can point you at the relevant documentation. I for one am grateful to many people in this list. Good luck - don't go backwards, go forwards... Kevin -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: 24 June 2003 13:42 To: Tomcat Users List Subject: Re: installing a servlet Donwgrading and using mod_webapp is the WORST thing you could do, for all sorts of reasons. Security, for one. Performance, for another. Future extensibility and growth, for another. Mod_jk and mod_jk2 work. This is a fact. There's nothing anyone can do if you want to give up learning how they work and use something else instead, but the truth is they work, and not just on someone's desktop. Many, many people are using Tomcat and a connector under heavy load in production on a daily basis (I'm one of them and there are many more). Load balancing, multiple instances, all sorts of advanced configurations. If you want to take the time to learn how things work, and why they work that way (Tomcat MUST obey the servlet spec, there is no alternative), then you can get your answers and have a robust, stable system. Its a personal choice. Good luck. John On 24 Jun 2003 07:56:47 +0200, Tony Grant [EMAIL PROTECTED] wrote: From my work of yesterday it seems that the easiest way to get a servlet to run is to downgrade to Tomcat 4.0.x and use mod_webapp... This isn't a very encouraging experience. Cheers Tony Grant -- 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: installing a servlet
If people are having problems getting mod_jk to work there are probably reasons. It may be true that mod_jk works but not always as expected. I have a system that works fine until mod_jk gets involved then java starts barfing up 'exceptions' on a couple of jsp's. Naturally the developers claim, if the code works in 'standalone' but not with mod_jk and virtual domains, the problem is with mod_jk. On Tuesday 24 June 2003 05:42 am, John Turner wrote: Donwgrading and using mod_webapp is the WORST thing you could do, for all sorts of reasons. Security, for one. Performance, for another. Future extensibility and growth, for another. Mod_jk and mod_jk2 work. This is a fact. There's nothing anyone can do if you want to give up learning how they work and use something else instead, but the truth is they work, and not just on someone's desktop. Many, many people are using Tomcat and a connector under heavy load in production on a daily basis (I'm one of them and there are many more). Load balancing, multiple instances, all sorts of advanced configurations. If you want to take the time to learn how things work, and why they work that way (Tomcat MUST obey the servlet spec, there is no alternative), then you can get your answers and have a robust, stable system. Its a personal choice. Good luck. John On 24 Jun 2003 07:56:47 +0200, Tony Grant [EMAIL PROTECTED] wrote: From my work of yesterday it seems that the easiest way to get a servlet to run is to downgrade to Tomcat 4.0.x and use mod_webapp... This isn't a very encouraging experience. Cheers Tony Grant -- Stephen Carville [EMAIL PROTECTED] UNIX and Network Administrator DPSI 6033 W. Century Blvd, Ste 1075 Los Angeles, CA 90045 310-342-3602 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: installing a servlet
On Tue, 2003-06-24 at 14:42, John Turner wrote: Donwgrading and using mod_webapp is the WORST thing you could do, for all sorts of reasons. Security, for one. Performance, for another. Future extensibility and growth, for another. My question was: downgrade to mod_jk? (I have read that mod_webapp is depreciated) Mod_jk and mod_jk2 work. This is a fact. I believe you and they do even on my server! But only for JSP and I can't see what _I_ am doing wrong. So John please, all the fault is mine! I took the time to learn how to install Tomcat a few years back. I moved up through the versions. I documented how I got it working and published my HOWTO which got 3500 hits the day it appeared in Apache week (so I guess I gave a little bit back to the comunity...). What went wrong was moving up to Apache2 and Tomcat 4.1.24. I am at the bottom of the learning curve again. Should I drop mod_jk2 and try mod_jk? Cheers Tony Grant -- www.tgds.net Library management software toolkit, redhat linux on Sony Vaio C1XD, Dreamweaver MX with Tomcat and PostgreSQL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: installing a servlet
There seems to be a great deal of discussion about JK2. I know that JK2 is the outstanding issue for me in getting Tomcat running. Maybe it would be a good idea to share everyone's experiences about JK2, like what works and what doesn't. Then we could at least have something to go on. Maybe we could post our .properties files somewhere along with the log and see if we can either reproduce the error or learn from it. _ Atreya Basu Developer, Greenfield Research Inc. e-mail: atreya (at) greenfieldresearch (dot) ca -Original Message- From: Tony Grant [mailto:[EMAIL PROTECTED] Sent: June 24, 2003 10:02 AM To: Tomcat Users List Subject: Re: installing a servlet On Tue, 2003-06-24 at 14:42, John Turner wrote: Donwgrading and using mod_webapp is the WORST thing you could do, for all sorts of reasons. Security, for one. Performance, for another. Future extensibility and growth, for another. My question was: downgrade to mod_jk? (I have read that mod_webapp is depreciated) Mod_jk and mod_jk2 work. This is a fact. I believe you and they do even on my server! But only for JSP and I can't see what _I_ am doing wrong. So John please, all the fault is mine! I took the time to learn how to install Tomcat a few years back. I moved up through the versions. I documented how I got it working and published my HOWTO which got 3500 hits the day it appeared in Apache week (so I guess I gave a little bit back to the comunity...). What went wrong was moving up to Apache2 and Tomcat 4.1.24. I am at the bottom of the learning curve again. Should I drop mod_jk2 and try mod_jk? Cheers Tony Grant -- www.tgds.net Library management software toolkit, redhat linux on Sony Vaio C1XD, Dreamweaver MX with Tomcat and PostgreSQL - 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: installing a servlet
Howdy, There seems to be a great deal of discussion about JK2. I know that JK2 is the outstanding issue for me in getting Tomcat running. Maybe it JK2 is not required to get tomcat running. It's one option that you can use if you want to connect Apache to tomcat. 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: installing a servlet
Yhea, That's what I meant. Getting Tomcat to work with Apache. _ Atreya Basu Developer, Greenfield Research Inc. e-mail: atreya (at) greenfieldresearch (dot) ca -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: June 24, 2003 10:25 AM To: Tomcat Users List Subject: RE: installing a servlet Howdy, There seems to be a great deal of discussion about JK2. I know that JK2 is the outstanding issue for me in getting Tomcat running. Maybe it JK2 is not required to get tomcat running. It's one option that you can use if you want to connect Apache to tomcat. 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: installing a servlet
This is also on my wish list for docs. To have many many examples, for example: jk (worker.properties http.conf) - Simple - With advanced options - With multiple workers (one host) - With multiple workers loadbalancer (one host) - With multiple workers mulitple loadbalancers (one host) - All the above with virtual hosts - All the above, with jk2 For example, the simple version more advanced versions can say refer to simple version for property descriptions -- # # load balancing example for jk # # Comment start with # and may be omitted # # All the workers defined in this file worker.list=cowbell # Set properties for cowbell # The worker is an ajp13 type. This means the apache (or other) # process will connect via tcp/ip to a tomcat instance # The tomcat instance better have a Engine jvmRoute=workerName... # for loadbalancing to work right. Workers types may be: # - ajp13 - The commonly used ajp13 protocol (use this!) # - ajp12 - The old ajp12 protocol # - jni - Running tomcat in process # - lb - A holder to define workers in as part of a loadbalancer worker.cowbell.type=ajp13 # Where ip address tomcat is listening for ajp connections # alternate examples may include ... #worker.cowbell.host=10.0.1.12 #worker.cowbell.host=fever.cowbell.net worker.cowbell.host=localhost # The port # tomcat is listening for ajp connections worker.cowbell.port=8009 # property should be used when you have a firewall between your webserver # and the Tomcat engine, who tend to drop inactive connections. This flag # will told Operating System to send KEEP_ALIVE message on inactive # connections (interval depend on global OS settings, generally 120mn), # and prevent the firewall to cut the connection. [1|0] # this may be omitted worker.cowbell.socket_keepalive=1 # property to webserver to cut an ajp13 connection after some time # of inactivity. When choosing an endpoint for a request and the assigned # socket is open, it will be closed if it was not used for the configured # time. It's a good way to ensure that there won't too old threads living # on Tomcat side, with the extra cost you need to reopen the socket next # time a request be forwarded. This property is very similar to # cache_timeout but works also in non-cache mode. # This setting times out in 300 seconds # [default is do nothing, this may be omitted] worker.cowbell.socket_timeout=300 -- -Tim Atreya Basu wrote: There seems to be a great deal of discussion about JK2. I know that JK2 is the outstanding issue for me in getting Tomcat running. Maybe it would be a good idea to share everyone's experiences about JK2, like what works and what doesn't. Then we could at least have something to go on. Maybe we could post our .properties files somewhere along with the log and see if we can either reproduce the error or learn from it. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: installing a servlet
Sorry, it wasn't my intent to criticize anyone, I apologize if that was the way it came across. JK and JK2 work. The difference that you have encountered moving to 4.1.24 is most likely attributable to the Invoker servlet being disabled by default. It is disabled by default for a reason: security. Is it possible to use the Invoker and be relatively secure? Yes. The problem is that when the Invoker servlet is enabled, a specially crafted URL can be used to view the source of a JSP. Is this bad? In general, yes. Yes because most developers are lazy, and use bad design practices such as putting confidential information like database URLs, usernames, and passwords into their JSP source, which, when the Invoker is enabled, can be viewed easily by anyone who reads security alerts. If you want to take responsibility for guaranteeing that your JSP source has nothing in it but display this over here and display that over there, then you can probably get away with using the Invoker and being relatively safe. So, given that most new developers don't take the time to learn good architecture practices, and probably for other reasons of which I am unaware, it was decided that the Invoker should be disabled in versions of Tomcat later than 4.1.12. Since the Invoker is disabled, to get servlets to work you are required to explicitly map them in web.xml to a specific URL (this is good for a number of reasons), said URL in turn being mapped in the properties files of the relevant connector should you choose to use a connector (also good, because if you have Apache there's no reason to make Tomcat handle requests that Apache can handle, otherwise why have Apache in the first place?). So, to answer your question: JK or JK2? My preference is for JK, but that is because I am a dinosaur, not because JK2 doesn't work. You should make the call based on your own needs and preferences. To answer your question: how do I make servlets work? Answer: explicitly map them in web.xml, map them to a URL (the archives are full of examples), and then make sure that Apache forwards that URL or similar URLs to Tomcat for processing. This forces you to make good architecture decisions...your servlets should be organized, etc. Does this suck? If you've spent a lot of time just writing servlets like crazy with no thought to organization, then it probably does suck but that isn't Tomcat's fault. If you have a servlet that isn't working, post this information to the list: - the name of the servlet, and where it lives under your Context's docBase - the servlet and servlet-mapping elements for that servlet from your web.xml - any JkMount or JkUriSet (or their equivalents) that you use with a connector to direct requests for the servlet in question to Tomcat, if you use a connector at all - the actual URL you are typing into the browser's address bar (or the value of your Form's ACTION parameter if you are having problems posting from a form to a servlet) - the error message you get or any other debugging information that proves to you that your servlet isn't working Then someone on the list will help you, typically with an hour or two, but there are no guarantees. John On 24 Jun 2003 15:01:58 +0200, Tony Grant [EMAIL PROTECTED] wrote: On Tue, 2003-06-24 at 14:42, John Turner wrote: Donwgrading and using mod_webapp is the WORST thing you could do, for all sorts of reasons. Security, for one. Performance, for another. Future extensibility and growth, for another. My question was: downgrade to mod_jk? (I have read that mod_webapp is depreciated) Mod_jk and mod_jk2 work. This is a fact. I believe you and they do even on my server! But only for JSP and I can't see what _I_ am doing wrong. So John please, all the fault is mine! I took the time to learn how to install Tomcat a few years back. I moved up through the versions. I documented how I got it working and published my HOWTO which got 3500 hits the day it appeared in Apache week (so I guess I gave a little bit back to the comunity...). What went wrong was moving up to Apache2 and Tomcat 4.1.24. I am at the bottom of the learning curve again. Should I drop mod_jk2 and try mod_jk? Cheers Tony Grant -- 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: installing a servlet
Mostly agree with John. But I love jk2 because it is simple to config. -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: June 24, 2003 9:37 AM To: Tomcat Users List Subject: Re: installing a servlet Sorry, it wasn't my intent to criticize anyone, I apologize if that was the way it came across. JK and JK2 work. The difference that you have encountered moving to 4.1.24 is most likely attributable to the Invoker servlet being disabled by default. It is disabled by default for a reason: security. Is it possible to use the Invoker and be relatively secure? Yes. The problem is that when the Invoker servlet is enabled, a specially crafted URL can be used to view the source of a JSP. Is this bad? In general, yes. Yes because most developers are lazy, and use bad design practices such as putting confidential information like database URLs, usernames, and passwords into their JSP source, which, when the Invoker is enabled, can be viewed easily by anyone who reads security alerts. If you want to take responsibility for guaranteeing that your JSP source has nothing in it but display this over here and display that over there, then you can probably get away with using the Invoker and being relatively safe. So, given that most new developers don't take the time to learn good architecture practices, and probably for other reasons of which I am unaware, it was decided that the Invoker should be disabled in versions of Tomcat later than 4.1.12. Since the Invoker is disabled, to get servlets to work you are required to explicitly map them in web.xml to a specific URL (this is good for a number of reasons), said URL in turn being mapped in the properties files of the relevant connector should you choose to use a connector (also good, because if you have Apache there's no reason to make Tomcat handle requests that Apache can handle, otherwise why have Apache in the first place?). So, to answer your question: JK or JK2? My preference is for JK, but that is because I am a dinosaur, not because JK2 doesn't work. You should make the call based on your own needs and preferences. To answer your question: how do I make servlets work? Answer: explicitly map them in web.xml, map them to a URL (the archives are full of examples), and then make sure that Apache forwards that URL or similar URLs to Tomcat for processing. This forces you to make good architecture decisions...your servlets should be organized, etc. Does this suck? If you've spent a lot of time just writing servlets like crazy with no thought to organization, then it probably does suck but that isn't Tomcat's fault. If you have a servlet that isn't working, post this information to the list: - the name of the servlet, and where it lives under your Context's docBase - the servlet and servlet-mapping elements for that servlet from your web.xml - any JkMount or JkUriSet (or their equivalents) that you use with a connector to direct requests for the servlet in question to Tomcat, if you use a connector at all - the actual URL you are typing into the browser's address bar (or the value of your Form's ACTION parameter if you are having problems posting from a form to a servlet) - the error message you get or any other debugging information that proves to you that your servlet isn't working Then someone on the list will help you, typically with an hour or two, but there are no guarantees. John On 24 Jun 2003 15:01:58 +0200, Tony Grant [EMAIL PROTECTED] wrote: On Tue, 2003-06-24 at 14:42, John Turner wrote: Donwgrading and using mod_webapp is the WORST thing you could do, for all sorts of reasons. Security, for one. Performance, for another. Future extensibility and growth, for another. My question was: downgrade to mod_jk? (I have read that mod_webapp is depreciated) Mod_jk and mod_jk2 work. This is a fact. I believe you and they do even on my server! But only for JSP and I can't see what _I_ am doing wrong. So John please, all the fault is mine! I took the time to learn how to install Tomcat a few years back. I moved up through the versions. I documented how I got it working and published my HOWTO which got 3500 hits the day it appeared in Apache week (so I guess I gave a little bit back to the comunity...). What went wrong was moving up to Apache2 and Tomcat 4.1.24. I am at the bottom of the learning curve again. Should I drop mod_jk2 and try mod_jk? Cheers Tony Grant -- 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: installing a servlet
Howdy, Oh how I wish more people would read this, digest it, and go through it before posting FAQs. Great post Senor Turner (as always). Yoav Shapira Millennium ChemInformatics -Original Message- From: John Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 24, 2003 9:37 AM To: Tomcat Users List Subject: Re: installing a servlet Sorry, it wasn't my intent to criticize anyone, I apologize if that was the way it came across. JK and JK2 work. The difference that you have encountered moving to 4.1.24 is most likely attributable to the Invoker servlet being disabled by default. It is disabled by default for a reason: security. Is it possible to use the Invoker and be relatively secure? Yes. The problem is that when the Invoker servlet is enabled, a specially crafted URL can be used to view the source of a JSP. Is this bad? In general, yes. Yes because most developers are lazy, and use bad design practices such as putting confidential information like database URLs, usernames, and passwords into their JSP source, which, when the Invoker is enabled, can be viewed easily by anyone who reads security alerts. If you want to take responsibility for guaranteeing that your JSP source has nothing in it but display this over here and display that over there, then you can probably get away with using the Invoker and being relatively safe. So, given that most new developers don't take the time to learn good architecture practices, and probably for other reasons of which I am unaware, it was decided that the Invoker should be disabled in versions of Tomcat later than 4.1.12. Since the Invoker is disabled, to get servlets to work you are required to explicitly map them in web.xml to a specific URL (this is good for a number of reasons), said URL in turn being mapped in the properties files of the relevant connector should you choose to use a connector (also good, because if you have Apache there's no reason to make Tomcat handle requests that Apache can handle, otherwise why have Apache in the first place?). So, to answer your question: JK or JK2? My preference is for JK, but that is because I am a dinosaur, not because JK2 doesn't work. You should make the call based on your own needs and preferences. To answer your question: how do I make servlets work? Answer: explicitly map them in web.xml, map them to a URL (the archives are full of examples), and then make sure that Apache forwards that URL or similar URLs to Tomcat for processing. This forces you to make good architecture decisions...your servlets should be organized, etc. Does this suck? If you've spent a lot of time just writing servlets like crazy with no thought to organization, then it probably does suck but that isn't Tomcat's fault. If you have a servlet that isn't working, post this information to the list: - the name of the servlet, and where it lives under your Context's docBase - the servlet and servlet-mapping elements for that servlet from your web.xml - any JkMount or JkUriSet (or their equivalents) that you use with a connector to direct requests for the servlet in question to Tomcat, if you use a connector at all - the actual URL you are typing into the browser's address bar (or the value of your Form's ACTION parameter if you are having problems posting from a form to a servlet) - the error message you get or any other debugging information that proves to you that your servlet isn't working Then someone on the list will help you, typically with an hour or two, but there are no guarantees. John On 24 Jun 2003 15:01:58 +0200, Tony Grant [EMAIL PROTECTED] wrote: On Tue, 2003-06-24 at 14:42, John Turner wrote: Donwgrading and using mod_webapp is the WORST thing you could do, for all sorts of reasons. Security, for one. Performance, for another. Future extensibility and growth, for another. My question was: downgrade to mod_jk? (I have read that mod_webapp is depreciated) Mod_jk and mod_jk2 work. This is a fact. I believe you and they do even on my server! But only for JSP and I can't see what _I_ am doing wrong. So John please, all the fault is mine! I took the time to learn how to install Tomcat a few years back. I moved up through the versions. I documented how I got it working and published my HOWTO which got 3500 hits the day it appeared in Apache week (so I guess I gave a little bit back to the comunity...). What went wrong was moving up to Apache2 and Tomcat 4.1.24. I am at the bottom of the learning curve again. Should I drop mod_jk2 and try mod_jk? Cheers Tony Grant -- 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] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e
Re: installing a servlet
On Tue, 2003-06-24 at 15:37, John Turner wrote: Sorry, it wasn't my intent to criticize anyone, I apologize if that was the way it came across. That's OK - I am slow at re-integrating newbie mode... - the actual URL you are typing into the browser's address bar (or the value of your Form's ACTION parameter if you are having problems posting from a form to a servlet) This is my problem I am guessing (cause all the config files are to spec...) Reading further down in RE: App Developer's Guide Example I have finally gotten an error message that I understand! I have managed at last to connect by putting URL:8009/path to servlet and gotten a NullPointer exception! Now that I know how to sort out myself! =:-D Looks like I'll be back to writing some more docs RSN Cheers Tony Grant -- www.tgds.net Library management software toolkit, redhat linux on Sony Vaio C1XD, Dreamweaver MX with Tomcat and PostgreSQL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: installing a servlet
On Fri, 2003-06-20 at 14:33, John Turner wrote: Please post: - workers2.properties # Define the communication channel [shm] file=/var/log/shm.file size=1048576 # Example socket channel, override port and host. [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 # Uri mapping [uri:212.100.232.223/*.jsp] worker=ajp13:localhost:8009 [uri:www.tgds.net/*.jsp] worker=ajp13:localhost:8009 - relevant Host section from server.xml Host name=www.tgds.net debug=0 appBase=/var/tomcat4/webapps unpackWARs=true autoDeploy=true Aliaslocalhost/Alias Aliaswww/Alias Alias212.100.232.223/Alias Context path= docBase= debug=1/ Context path=/lmstk docBase=/var/tomcat4/webapps/lmstk debug=0/ Context path=/jFormMail docBase=/var/tomcat4/webapps/jformmail debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=tgds_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host - relevant Context section from server.xml - servlet and servlet-mapping tags for this servlet from web.xml servlet servlet-namejFormMail/servlet-name servlet-classFormMail/servlet-class /servlet servlet-mapping servlet-namejFormMail/servlet-name url-pattern/jFormMail/url-pattern /servlet-mapping As I said the webapps work just fine. This servlet will only work if Tomcat is running standalone. Cheers Tony Grant -- www.tgds.net Library management software toolkit, redhat linux on Sony Vaio C1XD, Dreamweaver MX with Tomcat and PostgreSQL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: installing a servlet
There's no URL mapping in workers2.properties that would send your servlet request to Tomcat. The only requests for www.tgds.net that will ever get to Tomcat are those URLs that end in *.jsp because of this mapping: [uri:www.tgds.net/*.jsp] If you want to map another URI, such as www.tgds.net/servlet/* you have to add it. John On 23 Jun 2003 10:14:48 +0200, Tony Grant [EMAIL PROTECTED] wrote: On Fri, 2003-06-20 at 14:33, John Turner wrote: Please post: - workers2.properties # Define the communication channel [shm] file=/var/log/shm.file size=1048576 # Example socket channel, override port and host. [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 # Uri mapping [uri:212.100.232.223/*.jsp] worker=ajp13:localhost:8009 [uri:www.tgds.net/*.jsp] worker=ajp13:localhost:8009 - relevant Host section from server.xml Host name=www.tgds.net debug=0 appBase=/var/tomcat4/webapps unpackWARs=true autoDeploy=true Aliaslocalhost/Alias Aliaswww/Alias Alias212.100.232.223/Alias Context path= docBase= debug=1/ Context path=/lmstk docBase=/var/tomcat4/webapps/lmstk debug=0/ Context path=/jFormMail docBase=/var/tomcat4/webapps/jformmail debug=1/ Valve className=org.apache.catalina.valves.AccessLogValve directory=logs prefix=tgds_access_log. suffix=.txt pattern=common resolveHosts=false/ /Host - relevant Context section from server.xml - servlet and servlet-mapping tags for this servlet from web.xml servlet servlet-namejFormMail/servlet-name servlet-classFormMail/servlet-class /servlet servlet-mapping servlet-namejFormMail/servlet-name url-pattern/jFormMail/url-pattern /servlet-mapping As I said the webapps work just fine. This servlet will only work if Tomcat is running standalone. Cheers Tony Grant -- 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: installing a servlet
On Mon, 2003-06-23 at 14:49, John Turner wrote: thanks for your kind patience John! Reading through the FAQs this seems to be a common problem and others seem to have fixed it much more easily... There's no URL mapping in workers2.properties that would send your servlet request to Tomcat. The only requests for www.tgds.net that will ever get to Tomcat are those URLs that end in *.jsp because of this mapping: [uri:www.tgds.net/*.jsp] If you want to map another URI, such as www.tgds.net/servlet/* you have to add it. OK Done. Which gives on startup: 2003-06-23 18:22:33 HostConfig[www.tgds.net]: Deploying web application directory jformmail 2003-06-23 18:22:33 StandardHost[www.tgds.net]: Installing web application at context path /jformmail from URL file:/var/tomcat4/webapps/jformmail 2003-06-23 18:22:33 WebappLoader[/jformmail]: Deploying class repositories to work directory /var/tomcat4/work/Apache/www.tgds.net/jformmail 2003-06-23 18:22:33 WebappLoader[/jformmail]: Deploy class files /WEB-INF/classes to /var/tomcat4/webapps/jformmail/WEB-INF/classes 2003-06-23 18:22:33 StandardManager[/jformmail]: Seeding random number generator class java.security.SecureRandom 2003-06-23 18:22:33 StandardManager[/jformmail]: Seeding of random number generator has been completed 2003-06-23 18:22:33 StandardWrapper[/jformmail:default]: Loading container servlet default 2003-06-23 18:22:33 StandardWrapper[/jformmail:invoker]: Loading container servlet invoker Cheers Tony Grant -- www.tgds.net Library management software toolkit, redhat linux on Sony Vaio C1XD, Dreamweaver MX with Tomcat and PostgreSQL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: installing a servlet
ok i forgotten to tell i tried it but i get an error liket that : BIND_error Adress in use - Original Message - From: John Turner [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 23, 2003 8:10 PM Subject: Re: installing a servlet No problem, glad I could help. John On 23 Jun 2003 19:33:40 +0200, Tony Grant [EMAIL PROTECTED] wrote: On Mon, 2003-06-23 at 14:49, John Turner wrote: thanks for your kind patience John! Reading through the FAQs this seems to be a common problem and others seem to have fixed it much more easily... There's no URL mapping in workers2.properties that would send your servlet request to Tomcat. The only requests for www.tgds.net that will ever get to Tomcat are those URLs that end in *.jsp because of this mapping: [uri:www.tgds.net/*.jsp] If you want to map another URI, such as www.tgds.net/servlet/* you have to add it. OK Done. Which gives on startup: 2003-06-23 18:22:33 HostConfig[www.tgds.net]: Deploying web application directory jformmail 2003-06-23 18:22:33 StandardHost[www.tgds.net]: Installing web application at context path /jformmail from URL file:/var/tomcat4/webapps/jformmail 2003-06-23 18:22:33 WebappLoader[/jformmail]: Deploying class repositories to work directory /var/tomcat4/work/Apache/www.tgds.net/jformmail 2003-06-23 18:22:33 WebappLoader[/jformmail]: Deploy class files /WEB-INF/classes to /var/tomcat4/webapps/jformmail/WEB-INF/classes 2003-06-23 18:22:33 StandardManager[/jformmail]: Seeding random number generator class java.security.SecureRandom 2003-06-23 18:22:33 StandardManager[/jformmail]: Seeding of random number generator has been completed 2003-06-23 18:22:33 StandardWrapper[/jformmail:default]: Loading container servlet default 2003-06-23 18:22:33 StandardWrapper[/jformmail:invoker]: Loading container servlet invoker Cheers Tony Grant -- 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: installing a servlet
From my work of yesterday it seems that the easiest way to get a servlet to run is to downgrade to Tomcat 4.0.x and use mod_webapp... This isn't a very encouraging experience. Cheers Tony Grant -- www.tgds.net Library management software toolkit, redhat linux on Sony Vaio C1XD, Dreamweaver MX with Tomcat and PostgreSQL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
installing a servlet
Hello again, Yesterdays question was asked because I am unable to install and run a servlet (form mail servlet) from an apache Jk-Coyote enabled Tomcat 4.1.24. I have tried all the possible and imaginable paths and it always returns 404. If I run Tomcat standalone the servlet works just fine. I have been running Tomcat on my public servers for over two years. What got me was the upgrade to apache 2.0.x and Tomcat 4.1.x I am doing something wrong but despite my 2 years experience I can't find what and where. The logs aren't telling me anything useful. Once I get this sorted and working I will be releasing the form mail servlet under the GPL. Thanks for your time Tony Grant -- www.tgds.net Library management software toolkit, redhat linux on Sony Vaio C1XD, Dreamweaver MX with Tomcat and PostgreSQL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: installing a servlet
Please post: - JkMount statements from Apache's httpd.conf (or other file if they are included into httd.conf) - workers.properties - relevant Host section from server.xml - relevant Context section from server.xml - servlet and servlet-mapping tags for this servlet from web.xml John On 20 Jun 2003 09:42:13 +0200, Tony Grant [EMAIL PROTECTED] wrote: Hello again, Yesterdays question was asked because I am unable to install and run a servlet (form mail servlet) from an apache Jk-Coyote enabled Tomcat 4.1.24. I have tried all the possible and imaginable paths and it always returns 404. If I run Tomcat standalone the servlet works just fine. I have been running Tomcat on my public servers for over two years. What got me was the upgrade to apache 2.0.x and Tomcat 4.1.x I am doing something wrong but despite my 2 years experience I can't find what and where. The logs aren't telling me anything useful. Once I get this sorted and working I will be releasing the form mail servlet under the GPL. Thanks for your time Tony Grant -- 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]