Tomcat Server/Client Self-Signed SSL Certificate

Finally got the solution to my problem, so I’ll post the results here if anyone else gets stuck. Thanks to Michael Martin of Michael’s Software Thoughts & Ramblings I discovered that: keytool by default uses the DSA algorithm when generating the self-signed cert. Earlier versions of Firefox accepted these keys without problem. With Firefox 3 … Read more

Can’t access Tomcat using IP address

You need allow ip based access for tomcat in server.xml, by default its disabled. Open server.xml search for ” <Connector port=”8080″ protocol=”HTTP/1.1″ connectionTimeout=”20000″ URIEncoding=”UTF-8″ redirectPort=”8443″ /> Here add a new attribute useIPVHosts=”true” so it looks like this, <Connector port=”8080″ protocol=”HTTP/1.1″ connectionTimeout=”20000″ URIEncoding=”UTF-8″ redirectPort=”8443″ useIPVHosts=”true” /> Now restart tomcat, it should work

Tomcat and multiple domains/applications

From the beginning you have a single “Host” record in your conf/server.xml for localhost <Host name=”localhost” appBase=”webapps” unpackWARs=”true” autoDeploy=”true”> <Valve className=”org.apache.catalina.valves.AccessLogValve” directory=”logs” prefix=”localhost_access_log.” suffix=”.txt” pattern=”%h %l %u %t &quot;%r&quot; %s %b” /> </Host> Now you can add another “Host” records, for example <Host name=”anotherclient.com” appBase=”anotherclient” unpackWARs=”true” autoDeploy=”true”> <Valve className=”org.apache.catalina.valves.AccessLogValve” directory=”logs” prefix=”anotherclient_access_log.” suffix=”.txt” pattern=”%h %l %u … Read more

Jetty, Tomcat, Nginx, Geronimo, Glassfish: I’m confused

Jetty and Tomcat are web-containers, while Geronimo, Glassfish and JBoss support the whole J2EE stack (more or less). And, tataaa, they use/include Tomcat or Jetty for web-containers. The most important part of a fullblown J2EE server besides the web-container used to be the EJB-container allowing for deployment of EJBs, having them run in a transactional … Read more

How to check container log of tomcat?

You’ll find the referenced log file in the same directory containing the log referencing the other log file. With a default installation of Tomcat, the directory is $CATALINA_HOME/logs. The log file containing the information referenced will usually be the one named with the hostname on which Tomcat is running. On a simple server (e.g. development … Read more

Does Tomcat load the same library file into memory twice if they are in two web apps?

As you can see here, Tomcat creates one class-loader per webapp on your server. Thus, if you have webapp1 and webapp2 that share the same library, then this library will be indeed loaded twice. You can eventually place this library in the common directory (tomcat-dir/common/lib) if it is shared by all webapps that run on … Read more

What is the difference between Tomcat’s BIO Connector and NIO Connector?

NIO and Comet are completely unrelated: you can mix-and-match them. Using the NIO (or APR for that matter) connector allows you to handle more requests with fewer threads due to the threading model. See http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Connector_Comparison for a comparison between the Connectors. Comet (and Websocket) have a completely different dispatch model which requires a different application … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)