Saturday, April 26, 2025

Top 5 Courses to Learn Servlet and JSP for Java Web Developers in 2025 - Best of Lot

Hello guys, if you want to learn Servlet and JSP and look for the best Servlet courses, you have come to the right place. In the past, I have shared the best Servlet and JSP books and free Servlet and JSP courses and today, I will share the best Sevelt and JSP online courses from websites like Udemy Coursera and Pluralsight. These courses have been created by experts and trusted by thousands of developers to learn Servlet and JSP. You can also join them to learn these key technologies online from your home or office. Servlet and JSP are two of the most important web technologies for Java developers. In the framework age, you may not directly work with Servlet and JSP but knowing fundamentals like this always helps. 

Thursday, March 7, 2024

Difference between Servlet and Filter in Java

Servlet and Filter are two of the essential concepts defined in Servlet specification. They are core of any web application because most of the request will pass through them. This is why they are also very popular on Java Web developer interviews. What is the difference between a Servlet and a Filter is one of the most common and interesting interview question related to Servlet. If you can explain the difference clearly, you improve your chance of hiring a lot. In order to understand and explain the difference, you must understand what is the purpose of Servlet and Filter, How they work and how they are used in various web applications. 

Saturday, July 8, 2023

Apach FreeMarker HelloWorld Tutorial and Example in Java

Apache FreeMarker is a free, open source, Java based template engine which allow you to create dynamic content by combining the static template with dynamic data. The template is written in their own proprietary language called FTL(FreeMarker Template language), which is like any scripting language which allows you to insert variables, looping constructs and conditional logic. FreeMarker is often used with JSP in MVC based Java application to generate dynamic content but it's not limited to Servlet or JSP and you can use with core Java as well. In fact, this FreeMarker Hello World Example is without JSP. We generate a dynamic HTML file by using Freemarker in the main() method itself. Apache FreeMarker is often used for generating source code, configuration files or personalised e-mails.

Saturday, April 22, 2023

Difference between Filter and Listener in Servlet - Java JEE

One of the frequently asked Servlet Interview question is what is the real difference between a Filter and a Listener? What is the role they play in a Java web application? In this article, I'll try to answer these question by explain what is Servlet Filter and Servlet Listener and what are their use in Java web application. A filter is used for pre-processing and post-processing. It can intercept the request before it hits to the servlet and can modify both header and body of Servlet, hence it is used to perform login, authentication, authorization and other security aspect which is require before client can access the resource e.g. a Servlet or JSP. Similarly, filters can also intercept the response and modify both header and body of response, hence you can use it both compress and encrypt the response before sending it to the client.