Java News Brief
July 2000 Issue
A companion technology, JavaServer Pages (JSP), came shortly after Servlets. JSPs are web page "templates" with special tags embedded into the HTML. These are actually compiled into Servlets, so JSPs share the same performance characteristics that have helped to make Servlets so successful.
Prior to version 2.2 of the Servlet specification, deployment of Servlets from the development environment to a production server was proprietary and vendor dependent. The new Servlet container specification removes most of the vendor-specific deployment issues, making true cross-platform development achievable.
Servlet applications can also be marked as distributable, meaning that they can be deployed to many replicated containers for maximum scalability. Since JSPs are really glorified Servlets, the same features are available to JSPs.
Custom tags are the most compelling new feature of JSPs. With custom tags, one can avoid cluttering up HTML code with too much Java code. As more standard tag libraries become available, non-programmers will be able to develop JSPs much more easily.
Instead, a style sheet is used to transform the XML document into something a browser can display, typically HTML. Different style sheets can be employed for browser-specific customizations.
Servlets do not cease to exist because of XML. In fact, a Servlet is a key component in an XML-enabled web application, performing many tasks:
In the MVC approach, Servlets, JSPs, and XML are all utilized in complementary roles. JSPs are generally restricted to the view portion of an application. JSPs are best when non-technical people need the ability to quickly update web pages. Programmers can provide custom tags which enable content authors to embed standard elements such as navigation bars and standard forms.
Servlets are generally considered to be controllers, which mediate between the client web browser and the back-end data sources. It is common to see applications which use a single Servlet that immediately passes off control to dedicated controller objects, each of which is dedicated to a particular web page or form.
XML can play the role of both model and view. The XML document presents a structured view of data, while style sheets are a key tool for creating HTML views. XML may be dynamically generated by an EJB component, or it may simply exist on the file system.
Overall, the best strategy is to focus on clean separation of user interface code (HTML) from underlying programming logic.
OCI Educational Services
OCI has one of the most comprehensive OO training curriculums in the country. Clients contract group training that is either taught at the client site or at an OCI Education Center in Tempe, AZ or St. Louis, MO. We encourage you to check our our Object-Oriented Technology Curriculum show below: (click on course titles for online descriptions)
For more information or to register, email training.
Object Computing, Inc. is a Sun Authorized Java Center in St. Louis and a Member of the Object Management Group, OMG. OCI specializes in distributed computing using object-oriented and web-enabled technologies and provides Consulting, Education, and Product Development services to clients nation-wide. For more information contact us at 314-579-0066 (St. Louis), 480-752-0042 (Tempe) or email info.
For Information on Employment
Click here OCI CAREER OPPORTUNITIES or email hr.
The Java News Brief is a monthly newsletter. The purpose and intent of this publication is to advance Java, provide technical value, and to announce available OCI Java services. If you would prefer to not receive this newsletter or would like to subscribe please email JNB and enter SUBSCRIBE or UNSUBSCRIBE within the Subject line.
Copyright (c) 2000. Object Computing, Inc. All rights reserved. Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Object Computing, Inc. is independent of Sun Microsystems, Inc.