Lock
class allows safe sharing of information with multiple incoming requests. See "Sharing Objects Safely with Locking" on page 268.SendMail
class lets you generate email from JavaScript. See "Mail Service" on page 277.project
, server
, and request
objects. In particular, you can now use project
and server
objects to store references to other objects. See "The project Object" on page 250, "The server Object" on page 251, and "The request Object" on page 239. Array
objects can be created using literal notation. See "Creating an Array" on page 145.String
methods match
, replace
, search
, and split
. The RegExp
object has properties most of which are set when a match is successful, such as lastMatch
which specifies the last successful match. The Array
object has new properties that provide information about a successful match such as input
which specifies the original input string against which the match was executed. See Chapter 6, "Regular Expressions" for information.Number
function converts an object to a number. The String
function converts an object to a string. See "Number and String Functions" on page 135.eval
is no longer a method of individual objects; it is available only as a top-level function. See "eval Function" on page 133.delete
operator deletes an object, an object's property, or an element at a specified index in an array. See "delete" on page 94.<SCRIPT>
tag uses LANGUAGE=JavaScript1.2
, the equality operators ==
and !=
do not attempt to convert operands from one type to another, and always compare identity of like-typed operands. See "Comparison Operators" on page 87.break
and continue
statements can now be used with the new labeled
statement. See "break Statement" on page 123 and "continue Statement" on page 124.do...while
repeats a loop until the test condition evaluates to false. See "do...while Statement" on page 121.label
allows the program to break outside nested loops or to continue a loop outside the current loop. See "label Statement" on page 123.switch
allows the program to test several conditions easily. See "switch Statement" on page 119.livewire.conf
file is upgraded and renamed jsa.conf
. The new jsa.conf
file points to the new Application Manager and the new sample applications. It also contains entries for all other applications you had in the old livewire.conf
file. For details of the jsa.conf
file, see "Application Manager Details" on page 69.LiveWire/docs
directory, you must move (or copy) them to a new directory. In addition, you must manually recompile user-defined applications before you can use them with a 3.x web server, as described in "Backward Compatibility with Earlier Releases" on page 7. Be aware that an application can't be used with Enterprise Server 2.0 after recompiling. If you want to use an application with both servers, you should copy the application instead of moving it.world
, hangman
, cipher
, dbadmin
, and viewer
sample applications. In addition, the sample application lwccall
has been updated and renamed jsaccall
. The sample application video
has been updated and renamed oldvideo
; a new version of this application, using new LiveWire Database Service features, is named videoapp
. Finally, there are several new sample applications, bank
, bugbase
, flexi
, and sendmail
, that demonstrate other new server-side JavaScript features. For information on the sample applications, see Chapter 11, "Quick Start with the Sample Applications."samples
directory and you want to transfer your changes to the new server, you must move (or copy) them and recompile them, as you do your own applications. lwcomp
. It is now called jsac
and has additional options. For information on using the compiler, see "Compiling an Application" on page 56. Once you recompile your applications, they will not work under LiveWire 1.x.obj = new Object();
obj.prop = 42;
write(obj[0] == 42); //Illegal! Cannot refer to obj.prop as obj[0]
NULL
. In this release, it returns undefined
. Consider this code: <server>In earlier releases, that code would produce this output:
var myVar;
write("The value of myVar is: " + myVar);
<server>
The value of myVar is: NULLNow it produces this output:
The value of myVar is: undefined
client
and request
objects for an application's initial page. The properties of this client
object were not available on other pages. In this release, the runtime engine creates neither a client
object nor a request
object for an application's initial page. You can use the following statements to create these objects:client = new Object();Note, however, that if you create these objects, their properties are still not available on any other pages of the application.
request = new Object();
jsac
, to compile your applications.lock
method for the project
and server
objects has changed. In earlier releases, if you called project.lock
or server.lock
, no other thread (for either the same or a different application) could make any changes to the project
or server
object until you called project.unlock
or server.unlock
. That is, the locking did not require any cooperation.project.lock
or server.lock
, and if another thread then calls the same method, that method will wait until the first thread calls project.unlock
or server.unlock
or until a specified timeout period has elapsed. If, however, the second thread does not call project.lock
or server.lock
, it can make changes to those objects. For more information on locking, see "Sharing Objects Safely with Locking" on page 268.DbPool
objects and close all cursors opened either with database
or Connection
objects. For information on managing connections, see Chapter 15, "Connecting to a Database." For information on cursors, see "Manipulating Query Results with Cursors" on page 326.beginTransaction
. In this release, you must always use explicit transaction control (with the beginTransaction
, commitTransaction
, and rollbackTransaction
methods) when using an updatable cursor and making changes to the database. For information on cursors, see "Manipulating Query Results with Cursors" on page 326. For information on transactions, see "Managing Transactions" on page 335.database
object, the transaction is rolled back. If the transaction is through a DbPool
object, the value of the commitFlag
parameter when the connection was established determines whether the transaction is committed or rolled back. For information on establishing connections, see Chapter 15, "Connecting to a Database."Last Updated: 11/12/98 15:29:05