
JavaScript to Java Class Conversions
Appendix B Converting SSJS Applications 101
JavaScript to Java Class Conversions
The objects used in an SSJS application must be converted to classes in Java. Table
B-2 can help you convert these objects.
SSJS includes a special library to handle database connectivity. Since JSPs are Java,
all database connectivity is handled through JDBC. JDBC database drivers are
available directly from the database vendors. It is a good idea to use pure Java
(type 4) drivers whenever they are available. Table B-3 lists the database
connectivity classes.
Table B-2 JavaScript and Java basic classes
SSJS Class Java Class Comments
Client Session A Java session is not as automatic as an
SSJS client.
Project Context
Request Request
Server System or Context Methods are split between two Java
classes.
Table B-3 JavaScript and Java database classes
SSJS Class Java Class Comments
Connection Connection
Cursor ResultSet There is no Cursor object; you can use
methods in the ResultSet class to
move the cursor.
DbPool PooledConnection This class is in the JDBC optional
package.
Stproc CallableStatement
ResultSet ResultSet
Kommentare zu diesen Handbüchern