Home » Servlet » Page 2

Tag Archives: Servlet

Async Servlet Feature of Servlet 3

java-interview-questions-answers

Before we jump into understanding what Async Servlet is, let’s try to understand why do we need it. Let’s say we have a Servlet that takes a lot of time to process, something like below.                 LongRunningServlet.java package com.journaldev.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; ...

Read More »

Servlet Upload File and Download File Example

java-interview-questions-answers

File Upload and Download and common tasks in a java web application. Since I have written a lot about java servlet recently, I thought to provide a sample example of file upload and download using servlet. Use Case Our use case is to provide a simple HTML page where client can select a local file to be uploaded to server. ...

Read More »