Skip to main content

Posts

Showing posts with the label Tomcat

Docker : Tomcat Clustering with Load Balancer (Tomcat and Nginx)

In this post i will show Tomcat Clustering in Docker Container. In  my previous post i discussed how to achieve tomcat clustering with Nginx Front end . Its almost same scenario, but this time we will achieve via docker container. Docker Docker  is an  open-source  project that automates the deployment of  applications  inside  software containers , by providing an additional layer of abstraction and automation of  operating-system-level virtualization  on  Linux . [4]  Docker uses resource isolation features of the Linux kernel  such as  cgroups  and kernel  namespaces  to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining  virtual machine   --Wikipedia

File Upload is Easy in JSF2.2

To bring the File Upload feature in Java based web application is one of the difficult and complex job, we need to dependent on 3rd party libraries like Apache Commons FileUpload  Libraries. These libraries codes are complex and most of them boilerplate code. If we are using Java Server Faces (JSF), we have the page with some fields and file upload menu the its add more complexity, fields are binded to backing bean but these file uploads components are need to tie up with some 3rd party file upload libraries. In Primefaces provide easy way to do the file upload in JSF web application, even though primefaces internally used the same Apache Commons FileUpload Libraries, but provide simple JSF tags. We need configure  some listeners.

Deploy the Java Web Application to Jelastic Paas Cloud

Jelastic is Java Paas (Platform as a Service) cloud for Java Server hosting. we can easily create the server  instances (Tomcat, Glassfish ) and SQL Instances (MySQL, PostgreSQL)  and deploy the Java Web applications. Jelastic  website make its easy to use. when we logged in  one of the server then one window popped up, to create the environment here we select servers (Tomcat, GlassFish), Database Servers (MySQL,PostgreSQL) and give the unique name of ur environment. then click create button. Jelastic create the tomcat and MySQL instances. these instance are not shared to others. so we can start/stop these instance at any time. we can change the config files like Tomcat (server.xml, catalina.properties), MySQL(mysql.ini) files. When we create the instances they send mail contain the user name and password for accessing the Database server. In this screen-cast (below) i deploy the  previous post Jasper Report +JSF+JPA Web Application into Jelastic paas cloud. Screen Ca

Virtual Host + Apache httpd server + Tomcat + mod_jk connector

In my last post ( Virtual Host in Tomcat ) we discussed about how setup the virtual host in Tomcat. Its cost effective technique because only one public IP is enough to host multiple domain. If we have big organization and each department want to host their website in locally in different machine. then how to achieve the virtual host concept?. In this post we will see the how we do this. Update :   I posted  Virtual Host + Nginx + Tomcat  Its easy to configure, compare to Apache httpd server Problem Scenario:         In big organization they have multiple department, each department want to host their website in different machine. so these websites are accessed locally with different local IP address. When we mapping to public address then we face the problem. We have two choice either purchase as many public address or Put one server front  and delegate these request.  We going to use 2nd option. we put Apache httpd web server in front of all department servers. so onl

Understanding Virtual Host Concept in Tomcat

Hi in this post we will see how to setup virtual host in Apache Tomcat server. Virtual Host is in-built feature that allows to deploy multiple website(domains) in single instance of tomcat server. The main benefit in this way is its cost effective. Scenario: I am going to deploy 3 website with following domain names in single tomcat http://www.ramki.com http://www.krishnan.com http://www.blog.ramki.com The following diagram is my outline. Outline structure of Virtual Host Concept in Tomcat Here my tomcat IP address 192.168.1.15. or any IP address allocated my ISP. but it should be public IP address. How all domain names are pointing to my Tomcat?                   When we purchase the domain name we need to update the our tomcat IP address to it. like or we can simulate same DNS Setup through hosts file in both Linux and Windows. In Linux tha file is located at /etc/hosts Now How Setup Virtual Host Concept? Before going to setup the virtual host. first tak

Running Multiple Tomcat Instances on Single Machine

In this post we will see how to run multiple tomcat instances on single machine and under single user account. We first see the  tomcat directory structure. . here each folder uses following purpose. bin -  It contains all binary and script files for running tomcat. lib - contains all shared libraries used for tomcat conf - contains configuration information like which port tomcat can bind , etc... logs - it contain all logging details temp - this folder tomcat used for temporary files purpose webapps - this folder is very important. here we put all application war files. work - If application contain any jsp then jsp is translated and converted into servlet its stores here. In when run the tomcat its uses 5 environment variables. They are  CATALINA_HOME, CATALINA_BASE, CATALINA_TMPDIR, JRE_HOME/JAVA_HOME, CLASSPATH in above list CATALINA_HOME and JAVA_HOME is mandatory environment variables. all others are optional and its c

SSL on Tomcat

update : i posted new video for enable ssl in tomcat. please watch this video in 720p How to generate the keys or convert from one format to another format http://www.tomcatexpert.com/knowledge-base/using-openssl-configure-ssl-certificates-tomcat http://www.agentbob.info/agentbob/79-AB.html