Home
| | Sitemap
||Page number :7
Programmer's Guide Nokia WAP Server API 1.1 page 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
previous || guide home || next
4 Features in the Nokia WAP Server API The Nokia WAP Server APIs have been designed to make service authoring easier and to reduce the learning effort required of web service developers. Developers familiar with Java Servlet programming for web servers can get into WAP development directly. The Java Servlet concept is also open for additional functionality. When needs for more advanced WAP services occur, an existing servlet can be extended to use the additional services available in the WAP Service API, which has been designed to provide developers with an opportunity to use the full potential of WAP.
The following figure shows the logical groups of the interfaces that are available for servlet authoring.
Servlets
Java Servlet API Servlet
Servlet
WAP Service API
AckListener
Server Extension API
Servlet
SomeExtension Server mgmt API Interface
Java Servlet API. A set of standard interfaces defined by Sun that are implemented by the Nokia WAP Server and used by the WAP services.
WAP Service API. A set of Nokia WAP Server-specific interfaces that provide access to advanced information and functionality in the Nokia WAP Server. The interfaces are implemented by the Nokia WAP Server and used by the WAP services.
Server Extension API. A set of interfaces defined by the Nokia WAP Server. A servlet may provide an implementation of one of the defined interfaces and thus customise the server operation to meet specific needs. These servlets are called Server extensions.
Servlet. A standard Java interface that must be implemented by all servlets. The Interface is defined as part of the Java Servlet API.
AckListener may be implemented by a servlet in order to get detailed information about the response status. This interface is defined as part of the WAP Service API.
Server Management API is a programming interface that provides e.g. servlet installation and configuration services to allow e.g. installation program creation for WAP services written as servlets. In practice, that can be implemented as a script that utilises the commands available via the Nokia WAP Server Command Prompt [see details of the use of the Command Prompt in the Nokia WAP Server Administration Guide].The following sections present the interfaces, their purpose and the functionality of each interface.
4.1 Java Servlet API
The Nokia WAP Server provides a full implementation of the Java Servlet concept defined by Sun. The Nokia WAP Server implements the HTTP related Java Servlet interfaces on top of the WAP protocols. The Nokia WAP Server implements Java Servlet interfaces as specified for Java Servlet API 2.1. The Java Servlet API 2.1 includes several enhancements over the 2.0 version. The most important new feature is the ServletDispatcher interface. Servlets can delegate request processing to other servlets by using this interface. The Java Servlet API 2.1 specification is available at
http://www.javasoft.com/products/servlet/2.1/
A detailed specification of the interfaces in the Nokia WAP Server can be found in the [installation directory]\docs directory. The Nokia WAP Server contains the following interfaces and classes:
Defined in the javax.servlet package:
Interface ServletConfig Interface ServletContext Interface ServletRequest Interface ServletResponse Interface SingleThreadModel Class GenericServlet Class ServletInputStream Class ServletOutputStream Exception ServletException Class UnavailableException
Defined in the javax.servlet.http package:
Interface HttpServletRequest Interface HttpServletResponse Interface HttpSession Interface HttpSessionBindingListener Interface HttpSessionContext Class HttpServlet
19
Class HttpSessionBindingEvent
Interfaces and classes in the Java Servlet API 2.1 that can be used directly from the javax.servlet.http package:
Class Cookie // Can be used as such from javax.servlet.http Class HttpUtils // Can be used as such from javax.servlet.http
Every servlet must implement the servletinterface in order to be identified as a valid Nokia WAP Server servlet.
There are some basic differences in the underlying WAP protocols that may affect WAP service development when the Java Servlet API is used. For details, see Chapter 6 and the enclosed Nokia WAP Server API Reference in the[installation directory]\docs directory.
4.2 WAP Service API
This group of interfaces provides access to advanced information and functionality in the Nokia WAP Server. It is not required to use any of the interfaces listed in this group when creating a WAP service. However, the interfaces provide application developers with information and services that enable the development of user friendly and secure applications.
The interfaces are accessed via the ServletRequest.getAttribute() or via the ServletContext.getAttribute(), depending on the interface.
Programmer's Guide Nokia WAP Server API 1.1 page 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17
previous || guide home || next