Adding applets and JavaBeans

Adding applets and JavaBeans to a JSP page inserts the appropriate JSP action. To view JavaBeans and applets on the Components tab of the System Tree, you must make sure that the component you want and the WTInfo105.jar file are included in the Java class path. The WTInfo105.jar is installed in the Sybase\Shared\Web Targets directory. It should be included in the class path by default.

Adding applets

When you drag an applet from the Components tab to a JSP page in Page view or Source view, the jsp:plugin Properties dialog box displays with default values for the applet you selected. When you click OK, the applet is added to the page in a jsp:plugin action tag.

When you add an applet to a JSP page, you must make sure the applet classes are stored in a location accessible to client browsers. You can assign this location, using a file or http protocol, to the codebase attribute of the jsp:plugin directive.

Adding JavaBeans and JavaBean properties

When you drag a JavaBean from the Components tab to a JSP page in Page view or Source view, the jsp:useBean Properties dialog box displays with default values for the JavaBean you selected. When you click OK, the JavaBean is added to the page in a jsp:useBean action tag. If the JavaBean is in a class file, the class file is added to the Web-Inf\classes directory for your target. If the JavaBean is in an archive file, the archive file is added to the Web-Inf\lib directory for your target.

JavaBean properties with both read and write permissions are listed twice on the Components tab: one time for the read property and another time for the write property. The icon for the read-enabled property is a yellow arrow pointing upward. The icon for the write-enabled property is a green arrow pointing downward.

Shown in a Tree View is a Java bean called Prime - folder with its Properties folder expanded to show two entries for the prime property, one with a down arrow and one with an up arrow.

When you drag a read-enabled JavaBean property from the Components tab to a JSP page, the jsp:getProperty Properties dialog box displays with default values for the JavaBean property you selected. When you drag a write-enabled JavaBean property from the Components tab to a JSP page, the jsp:setProperty Properties dialog box displays with default values for the JavaBean property you selected.