Technologies and Enhancements in Web Server 7.0

                                                                                                                                                                                                                                                                                                                                      Back to [Book]     [Topic]

Technologies and Enhancements in Web Server 7.0

Web Server is a major new release with significant enhancements in the administration infrastructure. This release is the first 64-bit version of Web Server supported on Solaris SPARC®, AMD64 and Linux platforms.

This section discusses about these significant enhancements in the following topics:

Technologies and Enhancements

This section discusses about the technologies used and the enhancements made in Web Server 7.0 in the following topics:

Web Server 7.0 provides:

  • Comprehensive command-line interface support
  • Consolidated configuration
  • Enhanced security
  • Web-based Distributed Authoring and Versioning (WDAV)
  • Access control lists (ACL)
  • URL rewriting
  • Clustering support

This product also comes with a robust built-in migration tool that helps migrate applications and configurations from Web Server 6.0 and 6.1 to Sun Java System Web Server 7.0.

Sun Java System Web Server 7.0 introduces the following new features:

  • Management infrastructure
  • Java Web Services Developer Pack 2.0 support
  • Session replication support
  • Extensive real-time monitoring support
  • Integrated reverse proxy plug-in and FastCGI plug-in support

For more features and information, see What's New in This Release in Sun Java System Web Server Release Notes.

Supported Standards, Protocols, and Technologies

The following topics are discussed in this section:

Servlet 2.5 Support

Java servlets are server-side Java programs that generate content in response to a client request. Servlets can be thought of as applets that run on the server side without a user interface. Servlets are invoked through URL invocation or by other servlets.

Sun Java System Web Server 7.0 supports the Java Servlet 2.5 specification.

Note -
Java Servlet API version 2.5 is fully backward compatible with versions 2.1, 2.2, 2.3, and 2.5. Therefore, all existing servlets continues to work without modification or recompilation.

To develop servlets, use Sun's Java Servlet API. For information about using the Java Servlet API, see the documentation provided by Sun at http://java.sun.com/products/servlet/index.html.

For the Java Servlet 2.5 specification, see http://java.sun.com/products/servlet/download.html.

For information about developing servlets in Sun Java System Web Server, see Developing Servlets

JSP 2.1 Support

Web Server 7.0 supports the JavaServer Pages (JSP) 2.1 specification. A JSP page is, much like an HTML page, that can be viewed in a web browser. However, in addition to HTML tags, JSP can include a set of JSP tags and directives intermixed with Java code that extend the ability of the web page designer to incorporate dynamic content in a page. These additional features provide functionality such as displaying property values and using simple conditionals.

JSP pages can access full Java functionality using the following methods:

  • Embedding Java code directly into scriptlets
  • Using server-side tags that include Java servlets

Servlets are Java classes that must be compiled. Servlets can be defined and compiled by a Java programmer, who then publishes the interface to the servlet. The web page designer can access a precompiled servlet from a JSP page. For information about creating JSPages, see http://java.sun.com/products/jsp/index.html.

JSTL 1.2

The Java Server Pages Standard Tag Library (JSTL) encapsulates as simple tags the core functionality common to many web applications. JSTL has support for common, structural tasks such as iteration and conditionals, tags for manipulating XML documents, internationalization tags, and SQL tags. It also provides a framework for integrating existing custom tags with JSTL tags.

For more information on JSTL 1.2, see http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSTL.html#wp74644.

Java Web Services Developer Pack 2.0 Support

Web Services uses a Web Services Description Language (WSDL) file to describe the service and a registry service to register and lookup the services. The Simple Object Access Protocol (SOAP) binding is the standard interoperable binding for accessing Web Services. Based on Java Web Services Developer Pack (Java WSDP), Web Server supports integrated Java Web Services runtime and tools, and therefore supports portable Web Services implementations. For more information, see Web Services Overview.

JNDI Naming

Web Server 7.0 provides Java Naming and Directory Interface (JNDI) API support that enables web applications to look up for Java Enterprise Edition (Java EE) services such as Java DataBase Connectivity (JDBC) data sources. All functional aspects of this JNDI implementation are essential. However, the web server's implementation does not support the CosNaming service required for remote objects as well as lookup of UserTransaction, ORB, JMS resources, or the EJB references.

JDBC Connection Pooling

In Web Server, JDBCRESOURCE and JDBCCONNECTIONPOOL elements in server.xml have been merged into one element called jdbc-resource to simplify JDBC configuration. Many of the configuration parameters have been renamed. For more information on the jdbc-resource element, see Elements in server.xml, in Sun Java System Web Server Administrator's Configuration File Reference.

Using JNDI to Access the jdbc-resource Within a Web Application

Using JNDI, a web application can access a JDBC connection pool by looking up the jdbc-resource that configures it. The jdbc-resources can access the name in its web descriptor. The following web descriptors example refer to the connection pool created in the earlier example.

WEB-INF/web.xml

<web-app>
...
  <resource-ref>
    <description>JDBC Connection Pool</description>
    <res-ref-name>jdbc/myJdbc</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>
...
</web-app>

WEB-INF/sun-web.xml

<sun-web-app>
...
        <resource-ref>
            <res-ref-name>jdbc/myJdbc</res-ref-name>
            <jndi-name>jdbc/MyPool</jndi-name>
        </resource-ref>
...
</sun-web-app>

In the above example, jdbc/myJdbc is the name by which the pool is referenced in the web application and jdbc/MyPool is the JNDI name of the jdbc-resources configuration.

The following is an example for using the pool in a web application.

Context initContext = new InitialContext();
Context webContext = (Context)initContext.lookup("java:/comp/env");

DataSource ds = (DataSource) webContext.lookup("jdbc/myJdbc");
Connection dbCon = ds.getConnection();

Tools Support

Web Server 7.0 provides support for the following tools:

  • Sun Java Studio Enterprise 8.1– Java Studio Enterprise 8.1 enables you create Java, Web, and EJB projects from existing code.
  • NetBeans IDE 5.5 – NetBeans IDE 5.5 is an integrated development environment to create, deploy the Java EE based web applications.
    For more information, see Using NetBeans IDE 5.5.
  • Sun Java Studio Enterprise 8.1– Web Server 7.0 supports Sun Java Studio Enterprise 8.1, Standard Edition. You can use Sun Java Studio to assemble and deploy web applications. For more information, see Using Sun Java Studio Enterprise 8.1.
  • JSR 88 Support for Application Deployment - You can write your own Java Specification Request (JSR) 88 client to deploy applications to the Web Server 7.0. For more information, see http://jcp.org/en/jsr/detail?id=88.

Lifecycle Listeners and Modules

Sun Java System Web Server 7.0 enables you to write customized classes for the various phases of the server lifecycle. For instance, a user may have a startup code that ensures that a remote data source is available for the applications. Such classes are notified of server lifecycle events supporting Java based tasks within the Web Server environment. These tasks automatically perform actions such as starting the server and sending notification if the server shuts down. You can use this support to instantiate singletons, RMI servers, and so forth. For more information, see List of Elements in Sun Java System Web Server Administrator's Configuration File Reference.

Session Replication

The intention of session replication is to provide sufficient session failover support through in-memory-backup of HTTP sessions to another server instance of the same cluster. This feature covers most usage scenarios. For more information, see Configuring Session Replication in Sun Java System Web Server Administrator's Guide.

API Changes from Web Server 6.1 to Web Server 7.0

Sun Java System Web Server has the following core components:

  • Web container implements the JSP 2.1, Servlet 2.5, and JSTL 1.2 specification which are part of Java EE 1.4.
  • Monitoring and configuring interfaces.

For more information about non-Java APIs and programming technologies, see the Sun Java System Web Server Developer's Guide and the Sun Java System Web Server NSAPI Developer's Guide.

Labels

java java Delete
server server Delete
sun sun Delete
webserver webserver Delete
system system Delete
application application Delete
webtier webtier Delete
guide guide Delete
developersguide developersguide Delete
sunjava sunjava Delete
developers developers Delete
webserver70 webserver70 Delete
web web Delete
javawebapplications javawebapplications Delete
+jwadguide +jwadguide Delete
webapplications webapplications Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact