Home » Tag Archives: Servlets

Tag Archives: Servlets

On Servlets and Async Servlets

java-interview-questions-answers

The Servlet API, part of the Java EE standard, has long been (since 1998, when the 2.1 specification was officially released) an important building block of Java-based enterprise architectures. It is an opinionated API to serve request/response protocols built around a few fundamental concepts:             A compliant container, that is a dedicated runtime that is either a ...

Read More »

EE JSP: The Reversed Jacket of Servlet

java-interview-questions-answers

Generating HTML from Servlet is only practical if you have small amount of pages, or needed fine control of the content you are generating, (binary PDF etc). For most application, the output is going to be HTML, and we need a better way to do this; and that’s where the JSP (Java Server Pages) comes in. With JSP, you write ...

Read More »

EE Servlet 3: Developing User Login with Session and Filter

java-interview-questions-answers

I have introduced the Application class in my previous post where you can setup backend services. One example service I added is the UserService. This service will load a Java users properties file that contains username and password sets; and it’s used later to authenticate users to login into the web application. Now I will show how the login part ...

Read More »

EE Servlet 3: How to Setup Backend Services in a Web Application

java-interview-questions-answers

In a web application, providing user interfacing (UI) is often only half of the job. Many applications have requirements that’s supported by backend services. Some example of backend services are scheduler process (batch processing), listen to a queue and respond when messages come in, or simple thing such as storing information for the entire application to use. These global data ...

Read More »

EE Servlet 3: Simple Form Processing

java-interview-questions-answers

Form handling in web application is like bread and butter for most Web developers. It will not be much use if we can not capture users input and process it. So I have included a simple FormServlet in my servlet3-example  that demonstrated few frequently used form inputs you might encounter. Here is how it looks like:         ...

Read More »

EE Servlet 3: Generating HTML output in Servlet

java-interview-questions-answers

If you just need to handle a handful of requests URI in your EE web module, then it might be easier to generate your own HTML response in your Servlet code instead of using a full blown template library. As part of my examples, I tried out a very simple Java DSL that generate html output when writing your own ...

Read More »

Securing WebSockets using Username/Password and Servlet Security

java-interview-questions-answers

RFC 6455 provide a complete list of security considerations for WebSockets. Some of them are baked in the protocol itself, and others need more explanation on how they can be achieved on a particular server. Lets talk about some of the security built into the protocol itself:               The Origin header in HTTP request ...

Read More »

115 Java Interview Questions and Answers – The ULTIMATE List (PDF Download)

java-logo

In this tutorial we will discuss about different types of questions that can be used in a Java interview, in order for the employer to test your skills in Java and object-oriented programming in general. In the following sections we will discuss about object-oriented programming and its characteristics, general questions regarding Java and its functionality, collections in Java, garbage collectors, ...

Read More »

Partitioning SPA Resources and API Implementations in Separate WAR Components

java-interview-questions-answers

Single Page Applications are quickly gaining traction as a way to implement rich, robust, and mobile friendly web-based applications. Essentially, this requires a shift in application architecture where the entire application user interface is implemented using JavaScript and the server side code supplies a RESTful, JSON-based API for  server side application logic and data access. This model is shown below: ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.