ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Topic: JSP and Servlets

Java Server Pages (JSP) and Java Servlets are the presentation-tier Java API, typically used with HTML, xHTML, XML, WML, for Web appliction and services development.

O'Reilly Network articles about this topic:

Java Web Development with Stripes (ONJava.com)
Convention-over-configuration is the battle cry of popular web frameworks like Ruby on Rails, and Stripes brings the same kind of thinking to Java. In this article, Mark Eagle shows how to put together a basic Stripes framework and discusses the framework's integration with Ajax and Spring.

How to Publish Multiple Websites Using a Single Tomcat Web Application (ONJava.com)
While the idea of mapping several names onto one Apache instance with VirtualHost directives is well known, what do you do when you're serving web apps with Tomcat? Satya Komatineni has both the code and the configs that you'll need to make this work.

What Is Jetty (ONJava.com)
Of course Tomcat is the first Java application server you think of, but is it the right tool for every job? The open source Jetty serves up JSPs and servlets in just a fraction of the memory needed by other app servers and is designed for easy embedding in other applications and non-traditional Java environments. Ethan McCallum takes a look at the big things in this small package.

Upload Files with JSF and MyFaces (ONJava.com)
Want to support uploading of files from the user's browser to your web application? You could parse the multipart form data yourself--or you could let Java do it for you. JSF doesn't support this out of the box, but, as Andrei Cioroianu shows, several JSF-based frameworks do.

Caching Dynamic Content with JSP 2.0 (ONJava.com)
Server-side caching is a powerful and popular technique for improving the performance of server-side applications. After all, why compute twice what you can compute once and hang on to? Andrei Cioroianu shows you how to exploit this technique in JSP 2.0.

Advanced SiteMesh (ONJava.com)
Developing a web application with a consistent look and feel isn't easy, especially if parts of the site use different underlying technologies. But as Sunil Patil shows, SiteMesh offers a solution, with servlet filters called "decorators" that apply your appearance late in the game.

Unit Test Your Struts Application (ONJava.com)
Consistent unit testing is an essential part of development, but web applications aren't necessarily well-suited to unit testing--how to you validate the "correctness" of a returned stream of text or HTML? Lu Jian has an answer in the form of StrutsUT, a Cactus-based library for unit testing Struts web apps.

Handling Events in JavaServer Faces, Part 2 (ONJava.com)
In the JSF event model, user actions take place in a client separated from the server, causing delays in the delivery of some types of events. In last week's part one of this two-part excerpt from JavaServer Faces, author Hans Bergsten provided examples to show how JSF deals with this, by using a strict request processing lifecycle. Here in part two, Hans implements event handling for parts of the sample application discussed in part one.


Handling Events in JavaServer Faces, Part 1 (ONJava.com)
In this excerpt from Chapter 8 of JavaServer Faces, author Hans Bergsten looks at the event model in JSF and how it relates to the request processing lifecycle. Next week, in part two of this excerpt, Hans implements event handling for parts of the sample application.

JSP 2.0: The New Deal, Part 4 (ONJava.com)
The wait is almost over: the latest version of the JavaServer Pages (JSP) specification, JSP 2.0, is about to be released. Hans Bergsten shows how the new changes make using JSP and its expression language cleaner and more powerful.

SQL Database Access with DBTags (ONJava.com)
Jakarta DBTags is a custom tag library that consists of tags to access and modify a database. This tutorial explains the procedure to incorporate Apache Jakarta DBTags custom tag library tags in an example JSP.

JSP 2.0: The New Deal, Part 3 (ONJava.com)
In this third article on JSP 2.0, Hans Bergsten (author of JavaServer Pages, 3rd Edition) shows the improvements made in JSP 2.0 for writing JSP pages as XML documents.

Introduction to JavaServer Faces (ONJava.com)
Swing developers enjoy a well-defined set of high-level components for building GUI applications, but what about web applications? JavaServer Faces attempts to bring the same kind of toolkit to the web-app space. Alexander Prohorenko offers an introduction to this new technology.

What's New in Tomcat 5 (ONJava.com)
In December 2003, the Apache Tomcat developers released version 5.0.16 as the first stable release of Tomcat 5. Jason Brittain looks at the latest features and offers insight into the goals established for version 5.0, which had a direct impact on development. Jason is a coauthor of Tomcat: The Definitive Guide.

Object Caching in a Web Portal Application Using JCS (ONJava.com)
One way to improve server-side performance is to cache data instead of generating it over and over again. Srini Penchikala takes a look at how the Java Caching System makes this possible.

JSP 2.0: The New Deal, Part 2 (ONJava.com)
The wait is almost over: the latest version of the JavaServer Pages (JSP) specification, JSP 2.0, is about to be released. Hans Bergsten shows how the new changes make using JSP and its expression language cleaner and more powerful.

Using JSF (ONJava.com)
Sun's recently released Web Services Developer Pack 1.2 includes an early-access release of JavaServer Faces. Andrei Cioroianu demonstrates building web forms, managing user input, and binding UI components to JavaBean properties.

Introducing JavaServer Faces (ONJava.com)
JavaServer Faces, or JSF, is heralded as the next step in server-side programming. It promises to make your life easier, your programs more maintainable, and maybe even your job more enjoyable. Budi Kurniawan demonstrates JSF, explaining why it's useful and if it lives up to its promises.

Why Web Developers Need JavaServer Faces (ONJava.com)
Several good frameworks exist to make the Java server programmer's life easier. Unfortunately, several hard problems still exist, including multiple output-format support and separation of content from presentation. In this first Java Q&A column, Chuck Cavaness explains why JSF matters.

XML Publishing with Cocoon 2, Part 2 (ONJava.com)
Apache Cocoon is an XML-publishing framework that allows you to build powerful applications from customized components. Collin VanDyck and David Cummings demonstrate writing Cocoon Actions and generating complex XML.

XML Publishing with Cocoon 2, Part 1 (ONJava.com)
Apache Cocoon is an XML-publishing framework that allows you to build powerful applications from customized components. Yeah, that's a mouthful. Collin VanDyck and David Cummings demonstrate Cocoon's sitemap and XML generation capabilities.

How Servlet Containers Work (ONJava.com)
Having explained how a Java web server works, Budi Kurniawan next turns his attention to explaining how servlet containers. He presents two examples that handle simple servlets and static content.

Creating Richer Hyperlinks with JSP Custom Tags (ONJava.com)
Gone are the days where one destination per link was enough. With mirroring, localization, and internationalization, your readers might want the choice of several different resources for any given link. Until XLink and XPointer are well-supported in browsers and authoring tools, most alternatives are clumsy. Amit Goel demonstrates a better approach by creating a custom JSP tag to control a dynamic menu of destination links.

A Custom JSP Tag Library for Dynamic Menus (ONJava.com)
Customizing your web site based on user preferences can be difficult. You can go full-bore with JavaScript, or rely on some sort of plugin language or applet. Prabu Arumugam demonstrates another option for JSP users--a tag library that can render dynamic, hierarchical menus defined in XML or a relational database.

Handling Multiple Submits (ONJava.com)
Whether by accident or out of frustration, users may accidentally submit the same web form multiple times. The results could be as serious as buying a new refrigerator each time! Al Saganich demonstrates techniques for ameliorating the "multiple submits" problem with Java.

Creating a Web Application with Ant and Tomcat 4 (ONJava.com)
Ever wondered how to put JSPs and Java Beans together? In this article, Paul Wood develops and deploys a database-backed Web application into a Tomcat 4 servlet/JSP Container. Oh yeah, and he's using Ant to build, install, and deploy things.

Servlet Best Practices, Part 2 (ONJava.com)
In part two of three in this series of book excerpts on servlet best practices from Java Enterprise Best Practices, learn about caching with servlets.

Servlet Best Practices, Part 1 (ONJava.com)
Servlets have dominated the recent server-side Java landscape and have become the standard way to interface Java to the Web. This chapter, the first of three book excerpts from Java Enterprise Best Practices, discusses effective servlet-based development and deployment.

Configuring Tomcat with IIS Web Server (ONJava.com)
In this installment of Using Tomcat, James Goodwill continues his discussion of the JK1.2 connectors with a turotial on configuring Tomcast with Microsoft's IIS server.

Programming Jakarta Struts: Using Tiles, Part 4 (ONJava.com)
We conclude this book excerpt series on using tiles from Programming Jakarta Struts by showing you how to use definitions. You'll also find coverage on support for internationalization of tiles.

Improve Your Career with Tomcat and Aspire (ONJava.com)
RDMS staff can be easily trained to develop Web-based Java apps with Tomcat and Aspire. This article tells how.

Programming Jakarta Struts: Using Tiles, Part 3 (ONJava.com)
In part 3 in this series of book excerpts on using tiles from Programming Jakarta Struts, learn how to use the tile tag library.

Implementing Templates with Struts (ONJava.com)
Creating a portal site gets much easier with templates. This article shows you how to implement a portal site with Struts Templates.

Configuring Tomcat and Apache With JK 1.2 (ONJava.com)
The JK modules are a conduit between Apache and Tomcat. This series of articles covers using mod_jk with Apache and Tomcat. The first article shows you how to configure the servers for use with JK 1.2.

Programming Jakarta Struts: Using Tiles, Part 2 (ONJava.com)
In part two in this series of book excerpts on using tiles from Programming Jakarta Struts, learn how to install and configure tiles, as well as get an overview on tiles.

Learning the New Jakarta Struts 1.1, Part 2 (ONJava.com)
Part 2 of Sue Spielmann's article on Struts 1.1 covers nested tag libraries, the Validator framework, the PlugIn API, and declarative exception handling.

Learning the New Jakarta Struts 1.1, Part 1 (ONJava.com)
In this first part of a two-part series, you'll learn about the new 1.1 release of Struts, how to work with it, and how to migrate from v.1.0.x.

Jakarta Struts: Seven Lessons from the Trenches (ONJava.com)
Chuck Cavaness, author of Programming Jakarta Struts, describes for Java programmers some of lessons he learned the hard way when he used the Struts framework to build a company application.

JSTL 1.0: What JSP Applications Need, Part 3 (ONJava.com)
In the final installment in this series on JSTL Hans Bergsten, author of JavaServer Pages, 2nd Edition, shows you how to leverage the JSTL classes when developing your own custom actions.

JSTL 1.0: What JSP Applications Need, Part 2 (ONJava.com)
Part 2 of our JSTL series focuses on internationization, localization, and database access.

JSP Overview, Part 2 (ONJava.com)
In this excerpt from JavaServer Pages, 2nd Edition, the second in a two-part series providing an overview of JSP, you'll find an introduction to JSP application design with MVC and learn about JSP processing.

JSP Overview, Part 1 (ONJava.com)
In part one of two book excerpts on JSP Overview from JavaServer Pages, 2nd Edition, understand the problem with Servlets as well as the anatomy of a JSP page.

JSTL 1.0: Standardizing JSP, Part 1 (ONJava.com)
JSTL offers a set of standardized JSP custom actions to handle common tasks. This article, the first in a series, provides an overview and shows how to use the most common tags.

JSP Standard Tag Libraries, Part 2 (ONJava.com)
In the second part of her series on the JSTL, Sue Spielman describes how to work with the tag libraries and the expression language.

Accelerating JSP Tag Development with Jakarta Velocity (ONJava.com)
Tags are cool. They are, however, a pain to write, as they put HTML inside of Java code, which is neither pretty nor maintainable, even in the short term. This article shows how to improve the situation by using Jakarta Velocity.

Java API Map (ONJava.com)
Is the world of Java getting a little unweildy for you? Use our Java API map and directory to track all significant Java platforms and respective Java APIs. Includes the JAX Pack and MIDlets.

JSP Standard Tag Libraries, Part 1 (ONJava.com)
Custom tags make working with JSP easier and more efficient, but wouldn't it be good to have standard ways to perform common tasks? Enter JSP Standard Tag Libraries, an attempt to provide a common and standard set of custom tags.

Transparent Data Pipelines for JSP (ONJava.com)
The author presents Transparent Data Pipelines as a solution to the fact that JSP breaks the MVC model, addressing several other shortcomings as well.

Invoking JavaServer Pages from MIDlets (ONJava.com)
Wireless and the enterprise go great together, but how do we make it happen? This article shows how to invoke JSPs from wireless apps such as MIDlets.

Writing JSPs in XML using JSP 1.2 (ONJava.com)
Stephanie Fesler covers using XML syntax within a JSP -- part of the new JSP 1.2 specification. Learn why you would want to do this and what the differences in syntax are.

Learning Jakarta Struts, Part 3 (ONJava.com)
In the last article in her Jakarta Struts series, Sue Spielman shows you how to use Struts tags to access the ApplicationResource file from a JSP.

JSP 1.2: Great News for the JSP Community, Part 2 (ONJava.com)
O'Reilly author Hans Bergsten concludes his review of the JSP 1.2 specification by detailing the changes and additions in the custom tag handler API.

Learning Jakarta Struts, Part 2 (ONJava.com)
In Part 2 of her series on Jakarta Struts, Sue Spielman shows you how to build a simple application from scratch in Struts 1.0.

JSP 1.2: Great news for the JSP Community, Part 1 (ONJava.com)
O'Reilly author Hans Bergsten explores the recently-released JSP 1.2 specification, covering the brand new features, as well as corrections and clarifications of areas that were not quite right in the previous version.

Introduction to Jakarta Struts Framework (ONJava.com)
Sue Spielman shows us how to use Apache's Jakarta Struts framework, which encourages an application architecture based on the Model-View-Controller (MVC) design pattern, useful in building servlet- and JSP-based Web applications.

Learning Servlet Filters (ONJava.com)
Filter usage is a new mechanism that is being introduced into the Servlets 2.3 standard. This article explores the implications of filters to the Servlet architecture.

Using Tomcat 4 Security Realms (ONJava.com)
In part 4 of his Using Tomcat series, James Goodwill covers Tomcat 4, focusing on security realms using both memory and JDBC realms (with a MySQL database example).

Web Server Java -- Servlets and JSP (ONJava.com)
Ian Darwin gives us two examples in this book excerpt from Java Cookbook: Solutions and Examples for Java Developers using Servlets and JSP: Task of displaying a web page with five randomly chosen integer numbers and a dictionary (list of terms).

Web DbForms (ONJava.com)
Many developers find themselves writing similar JSP and servlet code, again and again, when creating Web-based database applications. The open source project DbForms provides a solution which reduces the amount of coding to an absolute minimum.

JSP Security for Limiting Access to Application-Internal URLs (ONJava.com)
Jamie Jaworski covers a technique for designing and building simple JSP applications, which provides some security benefits such as limiting access to application-internal URLs.

Jakarta Taglibs (ONJava.com)
Sue Spielman covers Apache's Jakarta Taglib project, and how you can take advantage of some great open source JSP tag libraries.

Writing Servlet 2.3 Filters (ONJava.com)
Stephanie Fesler shows us how to write Servlet 2.3 API Filters.

Enterprise Servlets and J2EE (ONJava.com)
Jason Hunter demonstrates how the robust Servlets API and its containers are used and integrated with other J2EE API on a growing number of enterprise-based Web sites in this excerpt from O'Reilly's Java Servlet Programming, 2nd Edition.

Designing JSP Custom Tag Libraries (ONJava.com)
In this article, you'll learn what a JSP custom tag library is, why you'd want to use it, and how to build and use a complete tag library.

Servlet App Event Listeners (ONJava.com)
Stephanie Fesler covers the proposed Servlet 2.3 application lifecycle events and shows you how to write event listeners.

Uploading Files with Beans (ONJava.com)
Ever wondered how developers at Hotmail or Yahoo Mail process the attachments to email? Rest assured, you're not the only one.

Consilient: Workflow Among Peers (openp2p.com)
Andy Oram demystifies Sitelets -- Consilient's Java-based framework for creating projects that control their own workflow. Sitelets enable different people to work on a project in a peer-to-peer fashion.

Installing and Configuring Tomcat (ONJava.com)
James Goodwill covers the installation and configuration for the Tomcat Web Server.

Servlet 2.3 API Features Exposed (ONJava.com)
Stephanie Fesler unveils the latest features and tricks of the new Java Servlet 2.3 API.

Java Web Applications (ONJava.com)
James Goodwill discusses the definition, directory structure, deployment descriptor, and packaging of a Tomcat web application.

Pseudo Sessions for JSP, Servlets and HTTP (ONJava.com)
Kurniawan discusses pseudo sessions and using them to overcome drawbacks in JSP and Servlet applications.

JSP vs. XSP (ONJava.com)
Sue Spielman looks at JSP and XSP to help you decide which is right for your development needs.

Advanced Features of JSP Custom Tag Libraries (ONJava.com)
In part two of Sue Spielman's JSP Custom Tag Libraries series, she covers advanced features: JSP container interaction with tags, tags with bodies, nested tags, tag extra info, and cooperating tags.

Developing, Applying and Optimizing XSLT with Java Servlets (ONJava.com)
O'Reilly's upcoming Java and XSLT book author, Eric Burke, explains the fundamental patterns and techniques commonly used when XSLT and Java Servlets are combined.

Other documents about this topic:

Below are other references available on the web for this topic. Since other sites may change their links, please if you find any that may need to be updated.

Servlets and JSP Forum
Great resource for learning, developing and troubleshooting JSP and Servlet issues. [Source: theserverside.com]

Tomcat is the Reference Implementation for the Java Servlet 2.2 and JavaServer Pages 1.1 Technologies. Tomcat is the official reference implementation for these complementary technologies. To download Tomcat, click here. [Source: Jakarta]

Tomcat 4.0 Beta 3 Upgrade
Tomcat 4.0 Beta 2 has a security problem; therefore, you should download the Beta 3 that's now available. (source: JavaWorld). [Source: JavaWorld/Apache]

JSP Tutorial
This is a jGuru JSP Tutorial. [Source: Sun/jGuru]

Jakarta Taglibs Project
The goal of this Jakarta Taglibs project is to provide an open-source taglib repository. Tag Library Overview Tag libraries are composed of a set of custom tags. These custom tags help separate presentation from implementation. What this means is that web designers can change the layout without worrying about modifying the underlying logic. Custom tags also help developers avoid embedding scripting code within the JSP page as well as encourage reuse and ease maintainability. [Source: Apache]

The Jakarta Taglibs Project, Part I
This article, the first of two parts, explores the Jakarta Taglibs Project (part of the not-for-profit Apache Software Foundation), which provides a wide array of open-source custom tag libraries for use in JavaServer Pages. First, a brief review of the concept of custom tag libraries is offered, followed by an overview of the workings of the Jakarta Taglibs Project and its various custom tag libraries, and concluding with the open-source development experiences of several members of the Jakarta community. [Source: java.sun.com]

JSP Taglibs Tutorial
This is a JSP Taglibs tutorial session, presented by O'Reilly JSP book author Hans Bergsten at the O'Reilly Enterprise Java Conference 2001. [Source: O'Reilly]

JSP Custom Actions
O'Reilly Servlets book author Jason Hunter presents this JSP custom actions tutorial session at the 2001 O'Reilly Enterprise Java Conference. [Source: O'Reilly]

JSP Tag Libraries Tutorial
This tutorial describes how to use and develop JavaServer Pages (JSP) tag libraries. The tutorial assumes that you know how to develop servlets and JSP pages and are familiar with packaging servlets and JSP pages into Web application archives. [Source: Sun]

JSP Tag Libraries Map
This is a general roadmap for JSP taglibraries, in an attempt to show possible implementation areas for a standard tag library, as well as possible implementations of some of the tags where available. This list is far from authoritative; it's been generated from casual observance and implementation. [Source: Epesh.com]

JSP Tags Library Download
This site is a resource of links to many JSP custom tag libraries for download or reference. [Source: jsptags.com]

XSP Tutorial
This is a XSP (eXtensible Server Pages) tutorial as presented at the 2001 O'Reilly Enterprise Java Conference by ONJava JSP columnist, Sue Spielman. [Source: O'Reilly]

Web Components Tutorial
When a web-based client such as a browser communicates with a J2EE application, it does so through server-side objects called web components. There are two types of web components: Java Servlets and JavaServer Pages (JSP) pages. Servlets are Java programming language classes that dynamically process requests and construct responses. JSP pages are text-based documents that execute as servlets, but allow a more natural approach to creating static content. While servlets and JSP pages can be used interchangeably, each has its strengths. Servlets are best suited to managing the control functions of an application, such as dispatching requests, and handling non-textual data. JSP pages are more appropriate for generating text-based markup such as HTML, SVG, WML, and XML. This chapter describes the packaging, configuration, and deployment procedures common to servlets and JSP pages. Subsequent chapters, Java Servlet Technology and JavaServer Pages Technology, cover how to develop the web components. Many features of JSP technology are determined by Java Servlet technology so you should familiarize yourself with that material, even if you do not intend to write servlets. [Source: java.sun.com]

JavaBeans in JSP Pages
JavaBeans components are Java classes that can be easily reused and composed together into applications. Any Java class that follows certain design conventions can be a JavaBeans component. JavaServer Pages technology directly supports using JavaBeans components with JSP language elements. You can easily create and initialize beans and get and set the values of their properties. This chapter provides basic information about JavaBeans components and the JSP language elements for accessing JavaBeans components in your JSP pages. For further information about the JavaBeans component model see http://java.sun.com/products/javabeans. [Source: java.sun.com]

Web Development with JSP
Web applications developed using JavaServer Pages (JSP) may require some interaction with J2EE services. For example, a web-based inventory control system may need to access J2EE's directory services to gain access to a database. Or you may want to use Enterprise JavaBeans (EJB) in your application. This article presents a brief overview of J2EE, then it shows how to: Describe J2EE services in a Web Deployment Descriptor (web.xml) Reference J2EE services Access and use J2EE services from JSPs [Source: java.sun.com]