Showing posts with label Servlet. Show all posts
Showing posts with label Servlet. Show all posts

Wednesday, November 18, 2020

How To Get Client IP Address In Java Servlets

1. Overview

In this quick tutorial, you'll learn how to get the client ip address when a request comes to server. But, this can be done only in the java servlet application.

Simply, you can call directly on the request object as "request.getRemoteAddr()" on the javax.servlet.http.HttpServletRequest object.

How To Get Client IP Address In Java Servletsq

Tuesday, December 31, 2019

Java Servlet Session Timeout and Examples

1. Overview


In this tutorial, how to set up and configure a session timeout in a java Servlet based web application.

Configure Session Timeout in the web.xml of a Java Servlet web application, and globally for a Tomcat or Jetty Server.

This can be done in many ways as follows.

A) web.xml
B) Programmatically
C) Tomcat or any server configuration


Java Servlet Session Timeout