JSP Controls Tag Library
 

JSP Controls Tag Library: Overview

Overview

JSP Controls Tag Library (the "Library") provides the lifecycle for portlet-like JSP components. The Library does not require a portal engine or other central controller. The components built with the Library can be used in any JSP-based application.

Login Component

Reloadable Page Fragments (RPF) Technology

The Library utilizes two request processing concepts:

  • Traditional synchronous HTTP request/response cycle (Non-Ajax mode), and
  • In-place updating for browsers supporting XMLHTTPRequest object (Ajax mode).

RPF is based on the idea that web applications should treat input and output as two distinct phases. On input phase (or accept phase) a browser sends an event and accompanying data to a component, usually by submitting an HTML form. On output phase (or render phase) the component displays a view matching its state.

By default, in non-Ajax mode each phase corresponds to a separate HTTP request. On input phase browser submits data to a component, and component accepts and processes it. After that, the component reloads the page by redirecting browser to original page location. A request that follows, compels page components to [re]render themselves according to updated state. Redirection is a preferred way of switching from accept to render phase, because it allows to avoid issues related to Back and Refresh buttons, and prevents implicit double submits. Nevertheless, it is possible to use server-side forwarding instead of redirection.

In Ajax mode an application renders a view directly in response to asynchronous input event, no reloading is needed. An HTML fragment, returned by component, is inserted into the larger composite page without full page refresh.

Pages composed with JSP Controls Tag Library look and behave the same way whether they run in Ajax mode or not. In fact, a browser that renders web page in an off-screen buffer, may deliver the same flicker-free experience in non-Ajax mode as other browsers do in Ajax mode.

System Requirements

  • Java SDK 1.4.2+
  • Servlet container, supporting servlet specification 2.3+ and JSP specification 1.2+ (for example, Tomcat 4)
  • A browser supporting either bare HTTP 1.1 (almost any browser) or Javascript + XMLHTTPRequest object (MSIE 5+, Firefox 1.x, Safari 1.2+).
  • Samples use JSTL 1.0

Online Demo

The live demo can be found at http://www.superinterface.com/jspcontrols/. Pure JSP and Struts/JSP samples produce the same HTML so you won't notice the difference unless you look in the source code (see the link below).

Download

Download JSP Controls tag library, samples and the source code.

Licence

The JSP Controls Tag Library is released under Apache 2.0 licence.

Copyrights

All code, documentation and images on this site copyright by Michael Jouravlev unless expressly stated otherwise. Some images are based on page template found at TemplatesBox.com website.

Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. JSP Control Tag Library is not affiliated with, or endorsed by, Sun Microsystems, Inc.