Server-Side Javascript

Server-Side Javascript

World Wide Web security URLmerchant systemChat community system server navigator TCP/IP HTML Publishing PersonalServer-Side JavaScript Guide Inter ww Version 1.2 Proxy SSL Mozilla IStore Publishing Internet secure sockets layer mail encryption HTMLhttp://www comp.syselectronic commerce JavaScript directory server news certificate Proxy Netscape Communications Corporation ("Netscape") and its licensors retain all ownership rights to the software programs offered by Netscape (referred to herein as "Software") and related documentation. Use of the Software and related documentation is governed by the license agreement accompanying the Software and applicable copyright law. Your right to copy this documentation is limited by copyright law. Making unauthorized copies, adaptations, or compilation works is prohibited and constitutes a punishable violation of the law. Netscape may revise this documentation from time to time without notice. THIS DOCUMENTATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN NO EVENT SHALL NETSCAPE BE LIABLE FOR INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY KIND ARISING FROM ANY ERROR IN THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION ANY LOSS OR INTERRUPTION OF BUSINESS, PROFITS, USE, OR DATA. The Software and documentation are copyright ©1994-1998 Netscape Communications Corporation. All rights reserved. Netscape, Netscape Navigator, Netscape Certificate Server, Netscape DevEdge, Netscape FastTrack Server, Netscape ONE, SuiteSpot and the Netscape N and Ship’s Wheel logos are registered trademarks of Netscape Communications Corporation in the United States and other countries. Other Netscape logos, product names, and service names are also trademarks of Netscape Communications Corporation, which may be registered in other countries. JavaScript is a trademark of Sun Microsystems, Inc. used under license for technology invented and implemented by Netscape Communications Corporation. Other product and brand names are trademarks of their respective owners. The downloading, exporting, or reexporting of Netscape software or any underlying information or technology must be in full compliance with all United States and other applicable laws and regulations. Any provision of Netscape software or documentation to the U.S. Government is with restricted rights as described in the license agreement accompanying Netscape software. Recycled and Recyclable Paper Version 1.2 ©1998 Netscape Communications Corporation. All Rights Reserved Printed in the United States of America. 00 99 98 5 4 3 2 1 Netscape Communications Corporation, 501 East Middlefield Road, Mountain View, CA 94043 New Features in this Release This section contains the following topics: • Changes to Server-Side JavaScript • Changes to Core JavaScript 1.2 • Upgrading from an Earlier Release • Backward Compatibility with Earlier Releases Changes to Server-Side JavaScript With the release of the 3.x versions of Netscape web servers, Netscape LiveWire 1.01 is fully integrated into the web servers. Since LiveWire database connectivity is now integrated as the LiveWire Database Service portion of server-side JavaScript, developers do not have to install LiveWire as a separate product. Simply turn on the JavaScript support in the Administration Server to make the necessary components available. The following improvements have been made to server-side JavaScript: • Support for core JavaScript 1.2. See “Changes to Core JavaScript 1.2” on page 5. • New Lock class. The Lock class allows safe sharing of information with multiple incoming requests. See “Sharing Objects Safely with Locking” on page 279. • New SendMail class. The SendMail class lets you generate email from JavaScript. See “Mail Service” on page 287. • Property value types. Property values can be of any data type, rather than just strings, for the 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 260, “The server Object” on page 261, and “The request Object” on page 249. 3 Changes to Server-Side JavaScript • Direct access to HTTP request and response headers. See “Request and Response Manipulation” on page 302. • Access Java classes. You can access Java classes using LiveConnect. See Chapter 21, “LiveConnect Overview.” • IIOP. You can access legacy applications using IIOP. See Chapter 22, “Accessing CORBA Services.” • Multiple simultaneous connections. LiveWire has support for multiple simultaneous connections to multiple databases. See Chapter 15, “Connecting to a Database.” • Span multiple client requests. LiveWire database connections and transactions (and the objects used with them) can span multiple client requests instead of having to be restarted for each request. See “Individual Database Connections” on page 323 and “Managing Transactions” on page 348. • Stored procedures. LiveWire has support for stored procedures. See “Calling Stored Procedures” on page 354. • ODBC support. LiveWire has ODBC support under Unix. See “Supported Database Clients and ODBC Drivers” on page 372. • Multithreading. LiveWire supports multithreading of Informix, Oracle, and Sybase database client libraries for improved performance and scalability. See “Supported Database Clients and ODBC Drivers” on page 372. This support is available only if the underlying platform supports multithreading. For information on which platforms support it, see Enterprise Server 3.x Release Notes 4 Server-Side JavaScript Guide Changes to Core JavaScript 1.2 Changes to Core JavaScript 1.2 JavaScript version 1.2 provides the following new features and enhancements: • Create objects with initializers. You can create objects using object initializers. See “Object Literals” on page 83 and “Creating New Objects” on page 141. • Changes to arrays. Array objects can be created using literal notation. See “Creating an Array” on page 148. • Regular expressions. Regular expressions are patterns used to match character combinations in strings. You create a regular expression as an object that has methods used to execute a match against a string. You can also pass the regular expression as an argument to the 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. • New top-level functions Number and String. The Number function converts an object to a number. The String function converts an object to a string. See “Number and String Functions” on page 137. • Changes to eval. eval is no longer a method of individual objects; it is available only as a top-level function. See “eval Function” on page 135. • New and changed operators. • The new delete operator deletes an object, an object’s property, or an element at a specified index in an array. See “delete” on page 98. •If the <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 90. 5 Upgrading from an Earlier Release • New and changed statements. • The break and continue statements can now be used with the new labeled statement. See “break Statement” on page 126 and “continue Statement” on page 127. • do...while repeats a loop until the test condition evaluates to false. See “do...while Statement” on page 124. • label allows the program to break outside nested loops or to continue a loop outside the current loop. See “label Statement” on page 125. • switch allows the program to test several conditions easily. See “switch Statement” on page 121. See the Server-Side JavaScript Reference for information on additional features. Upgrading from an Earlier Release If you have previously installed a 2.0 version of a Netscape web server, you should migrate the server settings when you install a 3.x version of a Netscape web server. For information on how to install the server and migrate settings, see the administrator’s guide for your web server. If you do not migrate old server settings when you install the server, you can migrate them later, using the “Migrate from previous version” link on the Netscape Server Administration Page. Information on this link is also in the administrator’s guide for your web server. If you have previously created JavaScript applications using LiveWire 1.x, you should be aware of the following changes that occur when you upgrade to 3.x and migrate old server settings: • Settings preserved. If the 2.x server had LiveWire turned on, the 3.x server will have server-side JavaScript turned on. Whether or not the Application Manager requires a password is also preserved. For more information, see “Configuration Information” on page 49. 6 Server-Side JavaScript Guide Upgrading from an Earlier Release • Config file upgraded and renamed. The existing 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 71. • Applications are not moved. Upgrading server settings

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    475 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us