SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 90 | Next

Deepak Vohra

"Ajax in Oracle JDeveloper"

execute(sql);
conn.close();
} catch (SQLException e) {
System.out.println(e.getMessage());
} catch (javax.naming.NamingException e) {
System.out.println(e.getMessage());
}
return null;
}
}
The JavaScript functions and the user registration entry form are
specified in the userregistration.jsp file. First, we need to include the
JavaScript file created from the Java class UserRegistration in
userregistration.jsp. The JavaScript file for the UserRegistration
class was specified as UserRegistration in dwr.xml. Include the
UserRegistration.js as follows.
src='/webapp1/dwr/interface/ UserRegistration.js'>

Webapp1 specifies the web application WAR file, which we shall
create from the DWR application later in the section. We also need to
include engine.js and util.js in userregistration.jsp. Engine.js
is required to marshall invocations from the dynamically generated
100 5 Ajax with Java-DWR
JavaScript functions for the Java class methods. In engine.js a DWR
engine is created as follows.
var DWREngine = dwr.engine;
The DWR engine may be used to specify options such as timeout or
specify handlers such as errorHandler, exceptionHandler, and
callback handler. The util.js JavaScript file contains functions to
update a web page using data returned by the server. Some of the
commonly used util.js functions are discussed in Table 5.1.
Table 5.


Pages:
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102