Re: Tomcat + Apache Web Server
Well the Coyote connector for one definitely has compression available and compresses content nicely, even dynamic content. OK, I see this now. And I see that you can configure the MIME types you want to compress. Very good. I'm not sure of the specifics of the caching mechanisms used internally to Tomcat but it achieves caching nicely giving 304 not modified responses where applicable and often the browser will cache the static content so a request isn't even made. I just test Tomcat standalone and checked the 5.0 code, and there is nothing that sets the expires or cache-control max-age. Content will not be pulled from local cache unless these are specified, unless your browser is performing some magic. So it looks to me the best you can do w/ Tomcat is achieve a 304 response. 304 responses are inefficient for truly static content like images, style sheets, external JavaScript files, and perhaps some html and/or test pages. These resources should be served from the browser cache directly w/o connecting to the server. A server is only able to handle so many connections, so it limits scalability. But I have seen filters that do this w/ Tomcat. If Tomcat would allow a configurable out-of-box way to set headers for static content, I may be out of arguments for why I personally like to use Apache to handle static content. Mike Merit Online Systems, Inc. http://www.meritonlinesystems.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat + Apache Web Server
Consider the following Apache modules: mod_headers mod_expire mod_deflate I've never seen a web application that wouldn't benefit from one or all of these modules. And the performance improvements would likely more than outweigh any overhead. If Tomcat provides any of the functionality of mod_headers, mod_expire, or mod_deflate, it's news to me. So, why reinvent the wheel (e.g. w/ a filter) when this functionality is available in Apache? I'm still unconvinced that running Apache in front of Tomcat isn't almost always a good thing. But I'm listening if someone can convince me otherwise. Configuring Tomcat is a challenge. Configuring Tomcat + mod_jk + apache is even more of a challenge (see the number of posts on this list alone!). The chance of you dropping a security screw-up into the more complicated setup is much higher than the simple set up.[*] Unless you really need the performance benefit of the above modules - and many many people don't - why go to the extra setup effort, and extra risk of making mistakes? My benchmarks showed that on cheap new hardware (P4, 2.5Ghz) that apache and tomcat were both capable at webserving at a speed that would cost me a fortune in bandwidth and any delay would be in the application code, not the performance of the webserver. My tomcat install survived a direct slashdot without issue, so all I care about is manageability, performance (for me) is a solved problem. Of course, if you're trying to run something the size of ebay it's a little different. Pete [*] Pick a random website running java. Try to download foo.com/WEB-INF/web.xml. Be scared how often it succeeds. -- Pete Stevens [EMAIL PROTECTED] http://www.ex-parrot.com/~pete/ I have kleptomania, but when it gets bad, I take something for it. -- Anonymous - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat + Apache Web Server
On Wed, 2005-04-06 at 07:18, Pete Stevens wrote: Consider the following Apache modules: mod_headers mod_expire mod_deflate I've never seen a web application that wouldn't benefit from one or all of these modules. And the performance improvements would likely more than outweigh any overhead. If Tomcat provides any of the functionality of mod_headers, mod_expire, or mod_deflate, it's news to me. So, why reinvent the wheel (e.g. w/ a filter) when this functionality is available in Apache? I'm still unconvinced that running Apache in front of Tomcat isn't almost always a good thing. But I'm listening if someone can convince me otherwise. Configuring Tomcat is a challenge. Configuring Tomcat + mod_jk + apache is even more of a challenge (see the number of posts on this list alone!). The chance of you dropping a security screw-up into the more complicated setup is much higher than the simple set up.[*] Unless you really need the performance benefit of the above modules - and many many people don't - why go to the extra setup effort, and extra risk of making mistakes? Every web application can benefit from compressing and caching static resources. It decreases the number of connections your server must handle. To not have caching, I think, is to ignore a best practice. Or at the very least ignore the opportunity to improve the user experience with faster response times. It's not that hard to integrate Apache w/ Tomcat, and I still benefits to this approach that standalone Tomcat does not offer. Mike -- Merit Online Systems, Inc. http://www.meritonlinesystems.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tomcat + Apache Web Server
On Apr 6, 2005 11:20 AM, Mike Millson [EMAIL PROTECTED] wrote: Every web application can benefit from compressing and caching static resources. It decreases the number of connections your server must handle. To not have caching, I think, is to ignore a best practice. Or at the very least ignore the opportunity to improve the user experience with faster response times. It's not that hard to integrate Apache w/ Tomcat, and I still benefits to this approach that standalone Tomcat does not offer. Well the Coyote connector for one definitely has compression available and compresses content nicely, even dynamic content. I'm not sure of the specifics of the caching mechanisms used internally to Tomcat but it achieves caching nicely giving 304 not modified responses where applicable and often the browser will cache the static content so a request isn't even made. Regards, -- Jason Bainbridge http://kde.org - [EMAIL PROTECTED] Personal Site - http://jasonbainbridge.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat + Apache Web Server
Hello, I'm new with Apache products and this is my first post. Please see the background info - it explains what versions I have and what I have done. Question: How can I have both Apache and Tomcat running on a Windows platform using Internet Explorer and do the following: http://localhost/servlet/HelloServlet (no Tomcat default port 8080) instead of http://localhost:8080/servlet/HelloServlet ? If I try to do http://localhost/servlet/HelloServlet I get an internal server error. It cannot find where this is located. Apache is trying to find it at C:\Documents and Settings\username\My Documents\My Website\localhost\www\servlet\HelloServlet instead of C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\HelloServlet - Background: Apache 2.0.53 (Port 80 - default) Tomcat 5.5.7(Port 8080 - default) mod_jk 1.2.8 (to connect the two together) Operating System: Win 2K Server I installed both Apache and Tomcat as Windows Services using the install programs that are available. I am able to access http://localhost and http://localhost:80 (Apache Web server page comes up) I am able to access http://localhost:8080 (Tomcat page comes up) I am able to create basic servlets and run them. For example, http://localhost:8080/servlet/HelloServlet I am able to access this host from another machine running Win XP. I can bring up the Apache and Tomcat home pages on that PC's browser, and the servlets. I have placed the following in my httpd.conf file: LoadModule jk_module modules/mod_jk.so JkWorkersFile C:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/workers.properties JkLogFile C:/Program Files/Apache Group/Apache2/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] I have the workers.properties file also set up: worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=2 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp12, ajp13 Thank you, Sal
Re: Tomcat + Apache Web Server
You most configure mod_proxy in apache to get the configuration desired. The idea is that apache receive the request and if the request is for tomcat apache send the request at the respective servlet. http://httpd.apache.org/docs-2.0/mod/mod_proxy.html Best regards, Jorge Dvila. El mar, 05-04-2005 a las 16:50 -0400, Magnotta, Salvatore escribi: Hello, I'm new with Apache products and this is my first post. Please see the background info - it explains what versions I have and what I have done. Question: How can I have both Apache and Tomcat running on a Windows platform using Internet Explorer and do the following: http://localhost/servlet/HelloServlet (no Tomcat default port 8080) instead of http://localhost:8080/servlet/HelloServlet ? If I try to do http://localhost/servlet/HelloServlet I get an internal server error. It cannot find where this is located. Apache is trying to find it at C:\Documents and Settings\username\My Documents\My Website\localhost\www\servlet\HelloServlet instead of C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\HelloServlet - Background: Apache 2.0.53 (Port 80 - default) Tomcat 5.5.7(Port 8080 - default) mod_jk 1.2.8 (to connect the two together) Operating System: Win 2K Server I installed both Apache and Tomcat as Windows Services using the install programs that are available. I am able to access http://localhost and http://localhost:80 (Apache Web server page comes up) I am able to access http://localhost:8080 (Tomcat page comes up) I am able to create basic servlets and run them. For example, http://localhost:8080/servlet/HelloServlet I am able to access this host from another machine running Win XP. I can bring up the Apache and Tomcat home pages on that PC's browser, and the servlets. I have placed the following in my httpd.conf file: LoadModule jk_module modules/mod_jk.so JkWorkersFile C:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/workers.properties JkLogFile C:/Program Files/Apache Group/Apache2/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] I have the workers.properties file also set up: worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=2 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp12, ajp13 Thank you, Sal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat + Apache Web Server
From: Magnotta, Salvatore [mailto:[EMAIL PROTECTED] Subject: Tomcat + Apache Web Server Question: How can I have both Apache and Tomcat running on a Windows platform using Internet Explorer and do the following: Before introducing that complexity, why are you using Apache httpd at all? Peter Lin's recent testing showed little performance improvement using httpd vs. Tomcat 5.5.7 for static content. See http://cvs.apache.org/~woolfel/benchmark_summary.doc for details. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat + Apache Web Server
Well, it is a project here at work and that is what the requirements are for this project. I'll do more research and see if I can change some minds... Is the only solution using a reverse proxy server for example to redirect the client requests? e.g. ProxyPass /servlet http://localhost:8080/servlet or something like this ? ...Thanks for the link. -Original Message- From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 5:58 PM To: Tomcat Users List Subject: RE: Tomcat + Apache Web Server From: Magnotta, Salvatore [mailto:[EMAIL PROTECTED] Subject: Tomcat + Apache Web Server Question: How can I have both Apache and Tomcat running on a Windows platform using Internet Explorer and do the following: Before introducing that complexity, why are you using Apache httpd at all? Peter Lin's recent testing showed little performance improvement using httpd vs. Tomcat 5.5.7 for static content. See http://cvs.apache.org/~woolfel/benchmark_summary.doc for details. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - 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: Tomcat + Apache Web Server
Are you suggesting that we can drop apache and only use tomcat in some cases? El mar, 05-04-2005 a las 16:58 -0500, Caldarale, Charles R escribi: From: Magnotta, Salvatore [mailto:[EMAIL PROTECTED] Subject: Tomcat + Apache Web Server Question: How can I have both Apache and Tomcat running on a Windows platform using Internet Explorer and do the following: Before introducing that complexity, why are you using Apache httpd at all? Peter Lin's recent testing showed little performance improvement using httpd vs. Tomcat 5.5.7 for static content. See http://cvs.apache.org/~woolfel/benchmark_summary.doc for details. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - 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: Tomcat + Apache Web Server
The solution is: ProxyRequests Off ProxyPass /servlet http://localhost:8080/servlet/ Thanks Jorge! -Original Message- From: Jorge Davila [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 05, 2005 4:57 PM To: Tomcat Users List Subject: Re: Tomcat + Apache Web Server You most configure mod_proxy in apache to get the configuration desired. The idea is that apache receive the request and if the request is for tomcat apache send the request at the respective servlet. http://httpd.apache.org/docs-2.0/mod/mod_proxy.html Best regards, Jorge Dvila. El mar, 05-04-2005 a las 16:50 -0400, Magnotta, Salvatore escribi: Hello, I'm new with Apache products and this is my first post. Please see the background info - it explains what versions I have and what I have done. Question: How can I have both Apache and Tomcat running on a Windows platform using Internet Explorer and do the following: http://localhost/servlet/HelloServlet (no Tomcat default port 8080) instead of http://localhost:8080/servlet/HelloServlet ? If I try to do http://localhost/servlet/HelloServlet I get an internal server error. It cannot find where this is located. Apache is trying to find it at C:\Documents and Settings\username\My Documents\My Website\localhost\www\servlet\HelloServlet instead of C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\ROOT\WEB-INF\classes\HelloServlet - Background: Apache 2.0.53 (Port 80 - default) Tomcat 5.5.7(Port 8080 - default) mod_jk 1.2.8 (to connect the two together) Operating System: Win 2K Server I installed both Apache and Tomcat as Windows Services using the install programs that are available. I am able to access http://localhost and http://localhost:80 (Apache Web server page comes up) I am able to access http://localhost:8080 (Tomcat page comes up) I am able to create basic servlets and run them. For example, http://localhost:8080/servlet/HelloServlet I am able to access this host from another machine running Win XP. I can bring up the Apache and Tomcat home pages on that PC's browser, and the servlets. I have placed the following in my httpd.conf file: LoadModule jk_module modules/mod_jk.so JkWorkersFile C:/Program Files/Apache Software Foundation/Tomcat 5.5/conf/workers.properties JkLogFile C:/Program Files/Apache Group/Apache2/logs/mod_jk.log JkLogLevel info JkLogStampFormat [%a %b %d %H:%M:%S %Y] I have the workers.properties file also set up: worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 worker.ajp13.lbfactor=2 worker.loadbalancer.type=lb worker.loadbalancer.balanced_workers=ajp12, ajp13 Thank you, Sal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat + Apache Web Server
From: Jorge Davila [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat + Apache Web Server Are you suggesting that we can drop apache and only use tomcat in some cases? Certainly. Think of the overhead being _added_ by passing a request through httpd just to get to Tomcat. If the vast majority of the requests are for static content and only very few for dynamic, then using httpd in front of Tomcat makes sense; but if a significant fraction of the requests are targeting JSPs or servlets, then standalone Tomcat 5.5 may well result in better overall response time. Front-ending a set of Tomcats with Apache httpd for load-balancing or redundancy is also a highly appropriate (and relatively inexpensive) approach. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat + Apache Web Server
On Tue, 2005-04-05 at 18:42, Caldarale, Charles R wrote: From: Jorge Davila [mailto:[EMAIL PROTECTED] Subject: RE: Tomcat + Apache Web Server Are you suggesting that we can drop apache and only use tomcat in some cases? Certainly. Think of the overhead being _added_ by passing a request through httpd just to get to Tomcat. If the vast majority of the requests are for static content and only very few for dynamic, then using httpd in front of Tomcat makes sense; but if a significant fraction of the requests are targeting JSPs or servlets, then standalone Tomcat 5.5 may well result in better overall response time. Front-ending a set of Tomcats with Apache httpd for load-balancing or redundancy is also a highly appropriate (and relatively inexpensive) approach. Consider the following Apache modules: mod_headers mod_expire mod_deflate I've never seen a web application that wouldn't benefit from one or all of these modules. And the performance improvements would likely more than outweigh any overhead. If Tomcat provides any of the functionality of mod_headers, mod_expire, or mod_deflate, it's news to me. So, why reinvent the wheel (e.g. w/ a filter) when this functionality is available in Apache? I'm still unconvinced that running Apache in front of Tomcat isn't almost always a good thing. But I'm listening if someone can convince me otherwise. Mike -- Merit Online Systems, Inc. http://www.meritonlinesystems.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat/Apache web server communication
Dear colleagues, Please help in the following situation. We are cuurently developing a web application based on Tomcat4.1. Thus web app allows a user to upload files and folders in a subdirectory of its context, so that the content of these folders be viewed or retrieved by other users. The folders can contain static html pages, jpgs, zip files, etc. However, a user has uploaded some large video files, that create problems when played through internet and place unnecessary burden and the web app hangs or behaves badly. As a solution, I decided to install Apache Web Server and move these static files in Apache, so that Apache will serve the static content. (Installation of Apache and mod_jk2 connector is OK). However, the subdirectory in the webapp conext in which reside the uploaded files and folders is a restricted area. When an user wants to access a file in it, a filter (extends javax.servlet.Filter) is invoked and checks according to some rules if the user has enough rights and if so gives him the requested resource. My question is, if I move the subdirectory with the uploaded files in Apache Web Server, how should I configure Apache so that it can be reached only from Tomcat and only when the filter permits? In short if we have 1) the url of ourwebapp is http://somehost:8080/ourwebapp, 2)the directory with uploaded stuff is uploaddir and is accessed by http://somehost:8080/ourwebapp/uploaddir 3) every time a user tries to access http://somehost:8080/ourwebapp/uploaddir/somefolder/somefile the filter checks his rights, and we move uploaddir and its contents in Apache, how should I set up Apache and eventually the filter? Thanks in advance for your help. Kind Regards Ivan Ivanov __ Do you Yahoo!? Free Pop-Up Blocker - Get it now http://companion.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Urgent: can not connect tomcat-apache web server because too many open files
Hi, everyone, I run application that need to connect tomcat-apache web server. But I meet the problem as the following: Exception in: R(/LiveAlarmDisplay + /servlet/LiveAlarmDisplay + null) - org.omg.CORBA.INITIALIZE: java.net.SocketException: Too many open files minor code: 0 completed: No at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Throwable.fillInStackTrace(Compiled Code) at java.lang.Throwable.init(Compiled Code) at java.lang.Exception.init(Compiled Code) at java.lang.RuntimeException.init(Compiled Code) at org.omg.CORBA.SystemException.init(Compiled Code) at org.omg.CORBA.INITIALIZE.init(Compiled Code) at org.omg.CORBA.INITIALIZE.init(Compiled Code) at com.visigenic.vbroker.ds.DSUser.init(Compiled Code) at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance0(Compiled Code) at java.lang.Class.newInstance(Compiled Code) at com.visigenic.vbroker.orb.ORB.doCreate(Compiled Code) at com.visigenic.vbroker.orb.ORB.create(Compiled Code) at com.visigenic.vbroker.orb.ORB.create(Compiled Code) at com.visigenic.vbroker.orb.ORB.locator(Compiled Code) at com.visigenic.vbroker.orb.AdapterManagerImpl.init(Compiled Code) at com.visigenic.vbroker.orb.ORB.doCreate(Compiled Code) at com.visigenic.vbroker.orb.ORB.create(Compiled Code) at com.visigenic.vbroker.orb.ORB.create(Compiled Code) at com.visigenic.vbroker.orb.ORB.adapterManager(Compiled Code) at com.visigenic.vbroker.orb.ORB.BOA_init(Compiled Code) at com.visigenic.vbroker.orb.ORB.BOA_init(Compiled Code) at javax.servlet.http.HttpServlet.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code) at org.apache.tomcat.core.Handler.service(Compiled Code) at org.apache.tomcat.core.ServletWrapper.service(Compiled Code) at org.apache.tomcat.core.ContextManager.internalService(Compiled Code) at org.apache.tomcat.core.ContextManager.service(Compiled Code) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Compiled Code) at org.apache.tomcat.service.TcpWorkerThread.runIt(Compiled Code) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(Compiled Code) at java.lang.Thread.run(Compiled Code) Any one know how to set up tomcat apache to increase the capacity of file opened? __ Find, Connect, Date! http://personals.yahoo.ca -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]