Skip to main content

Posts

Showing posts with the label Tomcat

Apache 2.o.x and ProxyTimeout

Apache documentation says that mod_proxy supports ProxyTimeout directive in Apache 2.0.x, however it doesn’t. Apache 2.0.x completely IGNORES ProxyTimeout directive. Click this to know more . Their release notes says that they tried to fix this bug in 2.0.61 version but that fix doesn’t work even. You would find correct implementation of this directive in Apache 2.2.X. No OTHER WAY. I tried following patches but they doesn’t work. http://marc.info/?l=apache-httpd-dev&m=120362209316755&w=2 http://svn.apache.org/viewvc/httpd/httpd/branches/2.0.x/modules/proxy/mod_proxy.c?r1=421178&r2=535853&pathrev=550514&diff_format=h http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/proxy_util.c?r1=536291&r2=556972&pathrev=556972&diff_format=l So finally we used our RAMBAND and increased overall timeout of the Apache 2.0.53 server using Timeout directive

Tomcat Optimization

Remove every unwanted installed application This will save you startup time, as well as memory used by preloaded servlets. Web-application which comes with tomcat are : jsp-examples balancer tomcat-docs webdav servlets-examples. manager host-manager ROOT Don't delete (if needed ) :- manager and host-manager :- one can utilize them to upload application dynamically without stopping tomcat server. We need to set autoDeploy to true to make use of manager applications. balancer :- it provides clustering and load balancing capabilities that are essential for deploying scalable and robust web applications. Changes in Server.XML Set the autodeploy attribute of the tag to false (unless you need any of the default Tomcat applications like Tomcat Manager). Setting autoDeploy and unpackWARS to false as we are not deploying and updating web applications dynamically. We are also not using the default Tomcat applications like Tomcat Manager for dynamically web application deployment. Changes ...

Java Web application and UTF-8

Java and UTF-8 Generally we can rely on Java as long as source strings are properly encoded. Please refer link: http://java.sun.com/docs/books/tutorial/i18n/text/convertintro.html, http://java.sun.com/javase/technologies/core/basic/intl/faq.jsp Tomcat and UTF-8 JSP pages must include the header: Update the file $CATALINA_HOME/conf/server.xml : add attribute URIEncoding="UTF-8" in Connector tag Add filter as suggested in the link : http://wiki.apache.org/tomcat/Tomcat/UTF-8 Tomcat UTF-8 Problem with request.getParameter(), http://answers.google.com/answers/threadview?id=580467 useBodyEncodingForURI : http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html MySql and UTF-8 We need our databases and tables to be in utf8 character set : ALTER tables with an SQL statement like - ALTER DATABASE db_name CHARACTER SET utf8 COLLATE utf8_general_ci; Start mysql-demon using option "--character-set-server=utf8" : mysqld ócharacter-set-server=utf8 May be use...