In this maven tutorial, learn to add and configure tomcat plugin to pom.xml and use it deploy the web application without any tomcat installation in machine.
Mostly for logging and security purpose, we need the information of IP address for incoming requests. In any java web application, you can get IP address using getRemoteAddr() method. String httpServletAddress = request.getRemoteAddr(); BUT, if your application is running behind a load balancer proxy and you would like to translate the real request IP that […]
When your application is deployed in tomcat webserver and you request a URL which refers to a directory instead of a file, e.g., http://host:port/helloWorldApp/, you can configure Tomcat to serve the directory listing, or a welcome file, or issue error “404 Page Not Found”. Let’s see how you can enable or disable directory listing in […]
Secure Socket Layer (SSL) is a secure transfer protocol used for communication on the Internet using cryptographic methods. The main purpose of the SSL protocol is to guarantee that no one can tamper with the communication between a browser and the server where the web application is deployed. Another purpose of secure communication is the […]
By default, tomcat is configured to run on port 8080. That’s why all your deployed web applications are accessible though URLs like http://localhost:8080/yourapp. If you want to run your applications on URL like http://localhost/yourapp, then you will need to change the default port 8080 to 80, which is default port for HTTP connectors. To make […]
We already learnt how webservers work in general when you deploy your web application on server and access from a browser. Now let’s learn the stuffs inside server which may not be used in day to day job, but they will certainly help you when you are configuring your application first time. I have been […]
Many times we come to a situation where we need to modify the server configuration such that it is specific to an application. And if we got more than one such applications and we want each application to have it’s own defined configuration options, then it need some sort of configuration. In this tutorial, I […]
Many times we wonder that how a web container/ web-server (e.g. tomcat or jboss) works? How they handle the incoming http requests coming from all over the world? What are the things which make it happen behind the scene? How java servlet API (i.e. classes like ServletContext, ServletRequest, ServletResponse and Session) fit into picture? These […]