Finally, Java 8 arrives on March 18, 2014. This release has been announced at EclipseCon 2014. It is the first major release in Java after two years of time. Java 8 comes with lot of new features which are new to the Java programming itself. From today you can download Java 8 and use it …
Prime Number Generation in Java
This simple example demonstrates how to get the prime numbers using Java program for the given range. What is prime number?. A number which is divided only by 1 and itself is known as the prime number. If you take an example, 7 is a prime number, because it can be divided by only itself(7) …
Log4j 2 Example
This tutorial explains how to configure the Log4j 2 in your standalone application. Note that, this example will work only of your application is running as standalone. I will write another post for the web application configuration. The following steps explains how the Log4j 2 library loading the suitable configurations. Log4j will check the system …
Cookies In Servlet
Java EE Tutorials Servlets Tutorials Servlets Interview Questions Cookies are text data sent by server to the client and it gets saved at the client local machine. This is a small bits of information that a web browser send to browser and that are browser returns unchanged after visiting the same page. Server can accept multiple …
How To Get Client IP Address In Servlet
Java EE Tutorials Servlets Tutorials Servlets Interview Questions The host name and IP address of the client requesting the servlet can be obtained using the HttpRequest object. In the following section we have a detailed java code to get clients address in a servlet. If the client uses proxy server , the real request to …
Servlets Tutorials
Servlet is Java technology for writing the server side applications. It is the core technology used for developing any Java server applications. Any other Java frameworks created are internally using the servlet for hiding the complex part of how servlet handles the web application request and renders the response. However, knowing the internals of servlet …
Request Headers In Servlet
Java EE Tutorials Servlets Tutorials Servlets Interview Questions Request Header Request header is used to pass additional information about the request or itself to the server. Request header can be used by client to pass useful information. getHeaderNames() and getHeader() methods of javax.servlet.http.HttpServletRequest interface can be used to get the header information. Following important request header …
How To Refresh Servlet
Java EE Tutorials Servlets Tutorials Servlets Interview Questions We can refresh the server in two ways Through client side and another through server side. Consider the webpage containing the live score of the match or any live activities we want to see in web page in such cases we have to either refresh the web …