Tag Archives: Servlet

Checking out what is new with Servlet 3.0

via Checking out what is new with Servlet 3.0 | My Journey Through IT.

With the JEE6 specification hitting the market, some major changes have taken place with respect to how you would approach developing applications in the enterprise application world. In this article i would be touching upon a few changes that were done with respect to web application development.

How to Install Jetty Application Server

via How to Install Jetty Application Server | Examples Java Code Geeks.

Jetty is an open-source Servlet container and Application Server which is known to be lightweight, portable, robust, flexible, extensible and providing support for various technologies like SPDY, WebSocket, OSGi, JMX, JNDI, and JAAS. Jetty is very convenient for development and also widely used in production environments.

In this post, we are going to detail how to install and configure a Jetty Server. We are first going to describe how to setup and run a standalone Jetty. Thereafter we will mention some configuration options and skim through the modular architecture of Jetty.

Jetty presents Standalone, Embedded and Jetty Maven Plugin modes of operation. In this post we are going to use standalone Jetty.

Jetty JSP Example

via Jetty JSP Example | Examples Java Code Geeks.

JSP (JavaServer Pages) which is core part of Java EE, enables developers to create dynamic web content based on the Java Servlet technology. In this example, we are going to enable Jetty for JSP. We will start with Embedded mode of Jetty. We are going to initialize our embedded Jetty to run JSP pages. Thereafter we will continue with standalone mode and shortly mention the JSP configuration in standalone mode.

Jetty supports two JSP Engine implementations: Apache Jasper and Glassfish Jasper. Starting from Jetty version 9.2, the default and favored implementation is Apache Jasper. In this example we are going to use this one; however we will show how we can switch to Glassfish implementation in the standalone mode.

At this point, we have to mention that, this example should not be considered as a JSP tutorial but a demonstration of JSP on Jetty container.

How to create a Web Application Project with Java/Maven/Jetty or Tomcat

via How to create a Web Application Project with Java/Maven/Jetty | Guru.

In this article, we create a simple web application with the Maven Archetype plugin. We’ll run this web application in a Servlet container named Jetty, add some dependencies, write simple Servlets, and generate a WAR file. At the end of this article, you will also be able to deploy the service in Tomcat.

System requirements

Spring Security Part 1 – Simple Login application with database

via Looping around with Rajith…: Spring Security Part 1 – Simple Login application with database.

Spring security is a framework that provides security solution, handling authentication and authorization at both the web request level and the method level. Spring security handle security in two ways. One is secure web request and other one is restrict access at the URL level. Spring security uses servlet filters.

In this post I’m going to create a simple web application that handle the login authentication and authorization.

Download project :  http://www.mediafire.com/?bb9x88uxvkb0uuv

Jetty OSGi Example

via Jetty OSGi Example | Examples Java Code Geeks.

The OSGi specification defines a modularization and component model for Java applications. Jetty leverages OSGi support providing an infrastructure that enables developers to deploy Jetty and web applications inside an OSGi container. One can deploy traditional Java Web Applications or Context Handlers on Jetty within the OSGi container; in addition to this, OSGi bundles can be deployed as web applications.

In this example, we are going to show how we can deploy Web Applications on Jetty within an OSGi container. We are going to enable a Jetty Server on an OSGi container first, thereafter we are going to deploy a Servlet on our OSGi powered Jetty.

Understanding Callable and Spring DeferredResult

via Xavier Padró’s Blog: Understanding Callable and Spring DeferredResult.

Asynchronous support introduced in Servlet 3.0 offers the possibility to process an HTTP request in another thread. This is specially interesting when you have a long running task, since while another thread processes this request, the container thread is freed and can continue serving other requests.

This topic has been explained many times, but there seems to be a little bit of confusion regarding those classes provided by the Spring framework which take advantage of this functionality. I am talking about returning Callable and DeferredResult from a @Controller.

In this post I will implement both examples in order to show its differences.