![]() New Features in Active Web |
![]() Active Web |
![]() |
Previous versions of Active Web did not have the ability to provide a temporary directory to you as an application developer for use in an application. With the advent of the web application model where an application could be running from a compressed WAR file, it has been necessary to introduce a new function (getTmpDir()) to the global object that will return a temporary directory to you as an application developer.
When a web application executes in an application container, it is 'hosted' below a suitably named path known as a Context Path. This path is used to makeup the complete URL that is used to reference pages within an application. For example a URL of /ebuyers/concertox/stock/stockquery.html would map to an e-commerce application that had been installed into a web application container under /ebuyers context path; the remainder of the path refers to the Active Web page stock query.
The context path of a request is now available to you as an application developer via the new contextPath field of the request object.
Web application containers provide additional services to you as application developers, other than running servlets and serving static content; one of these is session management for the servlet.
Active Web now allows you as a developer access to the same servlet sessions that may have been created by other servlets that comprise the overall web application. So for example if as part of your e-commerce application you have already have a servlet that verifies the contents of a shopping cart and generates a pick list which is also placed in the session, any subsequent checkout pages written in Active Web would have access to that pick list. This mechanism also allows for the integration of Active Web pages into existing web applications that use servlets.
Active Web now allows you as a developer to have access to a Server object that holds the read only configuration of the application server. You also have a similar feature with the new Servlet object. In addition to providing the configuration of the servlet it also provides live statistic information relating to the number of pages that have been processed and how many errors have occurred. You as an application developer can leverage this to make runtime decisions dependant on the environment in which the application is running. For further details on the Servlet object see The ‘servlet’ Object.
Active Web now allows you as a developer to make use of multipart forms to upload files. The files are written to a temporary directory, specified in the servlet init parameters. For further details on uploading files see the Uploading a File to a Script Page.
The PreparedStatement object represents a pre-compiled SQL statement that can be used to efficiently execute a statement multiple times. For further details on prepared statements see the PreparedStatement Object.
Active Web adds connectivity features with Java 2 Enterprise Edition (J2EE) Java Naming and Directory Services (JNDI). The Directory object provides you as a script developer with the ability to perform simple searches of a JNDI service. For further details on use of directory object see Directory Services.
BinaryMode is a feature new to Active Web and it allows you as a developer to generate binary output from a script page instead of encoded characters. For further details on using binary output see Binary Mode Output.
Active Web has enhanced support for exceptions thrown from Java method calls. When an exception occurs Active Web will catch it and present it as a property (javaException) of the object whose method has been called. You as a developer can then take appropriate action depending on the contents of the Java exception object. For further details on handling Java exceptions see Java Objects.
The email object has been enhanced so that attachments can be specified as a comma delimited list in the ‘attachments’ property. For further details on using mail attachments see Email Objects.
Active Web provides you as a script developer access to the metadata associated with a given cursor object. This represents information such as column sizes, types, names etc. that can be advantageous for its subsequent display to the end user. For further details on cursor metadata see Cursor Objects.
The XMLWriter has been enhanced, so that via the setting of the CDATASection property element data will be encapsulated in CDATA tags, allowing you as a developer to produce consistently legal XML.
The XMLParser can be set to validate to the scheme specified by the Uri in the document. For further details on XML objects see XMLParser Objects or XMLWriter Objects.
The XMLTransform object is used in conjunction with the XMLTemplate Object to perform XSLT (Extensible Stylesheet Language Transformations). XSLT is a functional programming language that specifies the rules by which to transform an XML document into another text document, which maybe, but not necessarily an XML document. For further details on XML transforms see XMLTransform Objects.
Active Web offers the ability to run in production mode, which provides page load performance benefits by caching source code. For further details on the use of production mode see
Topic ID: 150029