top of page

Team Discussions

Public·4 members

Core Servlets And JavaServer Pages (JSP)


Core Servlets And JavaServer Pages (JSP)

MARTY HALL is president of, Inc., a small company that provides training courses and consulting services related to server-side Java technology. He also teaches Java and Web programming in the Johns Hopkins University part-time graduate program in Computer Science, where he directs the Distributed Computing and Web Technology concentration areas. Marty is the author of four books from Prentice Hall and Sun Microsystems Press: the first edition of Core Servlets and JavaServer Pages, More Servlets and JavaServer Pages, and the first and second editions of Core Web Programming.

Servlets are Java technology's answer to CGI programming. They dramatically simplify the creation of dynamic Web pages and provide e-commerce and intranet developers with an efficient, powerful and portable means of building "Web enabled" applications. JavaServer Pages (JSP) technology is a new approach to separating the static parts of a Web page from the dynamic portion, making the power of servlets accessible to any Web site developer. Now that Servlets and JSP are officially part of the Java 2 Platform, Enterprise Edition (J2EE), virtually every major Web and application server now supports the technology, and it is rapidly becoming the preferred alternative to traditional CGI and the most important component in server-side Webprogramming.This book consists of five parts. Part I provides the reader with a review of the basics. Part II covers the major new servlet and JSP capabilities, and Part III covers Web applications. In Part IV the author covers tag libraries, and in Part V he provides in-depth coverage of optimizing servlet and JSP performance.This book is targeted at all Java or Web programmers as well as CGI developers.The CD-ROM includes all the source code from the book. What people are saying - Write a reviewWe haven't found any reviews in the usual places.About the author (2002)MARTY HALL is president of, a training and consulting company focusing on server-side Java technology. He has taught training courses and seminars on servlet and JSP technology in the United States, Canada, Australia, Japan, and the Philippines. He is the author of the best-selling books Core Servlets and JavaServer Pages and Core Web Programming.

JSP is a core Java web technology. As developers, we can build JSP pages relatively quickly and easily, and they interact seamlessly with servlets in a servlet container like Tomcat. You could say that JSP is the Java ecosystem equivalent of PHP and ASP in the .NET world.

JSP pages must be deployed inside a servlet container. In order to deploy a Java web application based on JSP and servlets, you will package your .jsp files, Java code, and application metadata in a .war file, which is a simple .zip file with a conventional structure for web applications.

Java Servlet technology and JavaServer Pages (JSP pages) are server-side technologies that have dominated the server-side Java technology market; they've become the standard way to develop commercial web applications. Java developers love these technologies for myriad reasons, including: the technologies are fairly easy to learn, and they bring the Write Once, Run Anywhere paradigm to web applications. More importantly, if used effectively by following best practices, servlets and JSP pages help separate presentation from content. Best practices are proven approaches for developing quality, reusable, and easily maintainable servlet- and JSP-based web applications. For instance, embedded Java code (scriptlets) in sections of HTML documents can result in complex applications that are not efficient, and difficult to reuse, enhance, and maintain. Best practices can change all that.

In this section, I present best practices for servlets and particularly JSP pages. The emphasis on JSP best practices is simply because JSP pages seem to be more widely used (probably because JSP technology promotes the separation of presentation from content). One best practice that combines and integrates the use of servlets and JSP pages is the Model View Controller (MVC) design pattern, discussed later in this article.

The Model 2 architecture, as shown in Figure 3, integrates the use of both servlets and JSP pages. In this mode, JSP pages are used for the presentation layer, and servlets for processing tasks. The servlet acts as a controller responsible for processing requests and creating any beans needed by the JSP page. The controller is also responsible for deciding to which JSP page to forward the request. The JSP page retrieves objects created by the servlet and extracts dynamic content for insertion within a template.

JSP stands for Java Server Pages. This technology is used to create dynamic web pages in the form of HyperText Markup Language (HTML). They have embedded Java code pieces in them. They are an extension to the Servlet Technology and generate Servlet from a page. It is common to use both servlets and JSP pages in the same web apps.

A Java servlet template engine is a technology for separating presentation from processing. Template engines have been developed as open-source products to help get HTML out of the servlets. These template engines are intended to be used together with pure code components (servlets) and use only web pages with scripting code for the presentation part.

JSP pages are often combined with servlets in the same application. The JSP specification is based on the Java servlet specification. Simply put, a servlet is a piece of code that adds new functionality to a web server, just like CGI and proprietary server extensions such as NSAPI and ISAPI. Compared to other technologies, servlets have a number of advantages: 59ce067264


Welcome to the group! You can connect with other members, ge...

bottom of page