Application Servers G22.3033-011
Session 3 - Main Theme Page-Based Application Servers (Part II)
Dr. Jean-Claude Franchitti
New York University Computer Science Department Courant Institute of Mathematical Sciences
1
Agenda
Q Microsoft IIS with COM+, and ASP Environment
Q Servlet and JSP Environments
Q JRun
Q eXtensible Server Pages (XSP) Environment
Q Apache Cocoon2
Q Summary
Q Readings
Q Assignment #3
2
Summary of Previous Session
Q ColdFusion 5.0 Environment
Q PHP 4.0.6 Environment
Q XML-Based Application Servers
Q Summary
Q Readings
Q Assignment #2
3
1 Session 2 - Review
Q Application Servers for Enhanced HTML
Q a.k.a., Page-Based Application Servers
Q Examples:
Q Macromedia ColdFusion 5.0 Server
Q Microsoft IIS with ASP
Q WithEnterprise Pty Ltd Tango 2000
Q etc.
Q Typically less expensive than Servers for standalone use, and servers with IDEs
Q Technology stays within the familiar HTML confines
Q Create pages with mixture of HTML and proprietary tags or script code using (third-party) IDE, HTML editor, or plain text editor
Q Application server evaluates the code upon user requests and provides HTML pages 4
Part I
Microsoft IIS with COM+ and ASP Environment
Also See Session 3 Handout on:
“Active Server Pages”
5
Microsoft Active Platform (Logical Architecture)
6
2 Microsoft Active Platform (Features)
Q Logically centralized architecture
Q Physically de-centralized architecture
Q Scripting
Q Client-Side: Improved user interface and data validation
Q Server-Side: Business rules and data access
Q VBScript and JavaScript built-in support
Q PerlScript support via ActiveX scripting engine (e.g., ActiveState’s)
Q Ability to mix scripting languages
Q Active Server Components
Q Provide OS services to ASPs
Q Encapsulate business rules to ease programming
Q e.g., TextStream Component (FileSystem object) 7
Microsoft Active Platform (Physical Architecture)
8
Microsoft IIS with COM+/ASP Features Q IDE:
Q Visual InterDev (ASP)
Q Management of site development process
Q Scripting
Q Alternative IDEs
Q Macromedia Drumbeat, Ultradev, Dreamweaver
Q NetObjects Fusion
Q Microsoft FrontPage 2000
Q Adobe GoLive
Q Server Platforms
Q Windows 2000/NT
Q Use ChiliSoft for other platforms (http://www.chilisoft.net/)
Q Platforms: Solaris, Linux, AIX, HP-UX, Windows
Q Immunity from current IIS attacks (e.g., code red worms on Win 2000)
Q Web Server: Apache, iPlanet
Q Chili!Beans support for Java (similar to Microsoft with COM+ and ASP for C++) 9
3 Microsoft IIS with COM+/ASP Features
Q See “Microsoft IIS, COM+, and ASP” in “Web Server Brains”
Q COM+ / ASP
Q Equivalent to J2EE EJB / JSP
Q Included in Microsoft Windows 2000 Advanced Server
Q COM+
Q Attributes (declare what runtime services are needed by the component)
Q Threads and database connection pools (access via Active Data Object API)
Q ASP Object Model sub-systems
Q HTTP request
Q COM+ transaction
Q External COM+ components
Q Other solution components:
Q Visual Studio 6.0
Q Internet Security and Acceleration Server (ISA)
Q static content caching, fault tolerance, load balancing, request handling 10
Part II
Servlets and JSPs Environment
Also See Session 3 Handout on:
“Applets, Servlets, and Java Server Pages” “Servlets”
11
Introduction to Servlets and JSPs
Q See http://www.java-shop.com/jsp.htm
Q Servlets (http://java.sun.com/products/servlet/)
Q Java’s standard mechanism for writing code that runs and extends the functionality of a servlet engine
Q A servlet is to a server what an applet is to a browser
Q HTTP servlets
Q Replacement for CGI
Q Standard mechanisms for handling cookies, sessions, session/application contexts
Q Advantages over CGI: performance, platform and web-server independance
Q Servlet filters are new in the Java Servlet Specifiation 2.3
Q Java Server Pages (http://java.sun.com/products/jsp/)
Q Answer to Microsoft’s Active Server Pages
Q Provide mechanism for including tags/scriptlets into an HTML or XML page
Q JSPs have .jsp extension and are processed using a special servlet
Q JSP page is compiled into a servlet upon first access or after each modification 12 Q Ability to instantiate and access JavaBeans within JSP pages
4 MVC or Model 2 Design Pattern
Q Used to implement Modern Web Applications as a combination of
Q Servlets/Servlet filters
Q Controller receiving/filtering requests from the user
Q Updates the application’s model composed of JavaBeans
Q Passes the page request to a view JSP
Q Java Server Pages
Q Display information based on the current state of the application’s model
Q JavaBeans
Q Enable component reuse
Q Custom Tag Libraries
Q Make it possible to move source code out of the JSP where it is difficult to maintain and into reusable JavaBeans
Q Rich array of Java APIs
Q See http://www.mhsoftware.com/resources/iisjserv.html for a comparison of IIS/ASP and Servlet/JSP technology 13
Servlets and JSPs Examples
Q JSP displaying a banner image based on who is referring the user to the site: <%@ page import="com.ibm.jspredbook.*;” errorPage="error.jsp" %>