The basic user profile does not, by default, have macro access enabled. To use macros, a session must be configured for an intermediate, advanced, or custom user profile.
There are two types of templates that can be used: a page template for sessions embedded in a browser window, or a âcustom login pageâ template for sessions configured to appear in their own window.
- When configuring a session in Session Manager, select âDisplay session embedded in a web browser windowâ and provide the name of a template .jsp file in /rweb/templates.
Samples are provided in /rweb/templates/samples. If you start with one of the sample templates, we recommend that you copy the sample to the main /rweb/templates folder; for example, copy /rweb/templates/samples/scripttemplate.jsp to /rweb/templates/scripttemplate.jsp.
- Make sure that the session configuration includes the applet parameter preloadJSAPI=true.
Note: If different embedded sessions all have the same scripting requirement, they can all name the same template .jsp. In other words, you donât have to have one template per session if all of the sessions need to do the same script task.
Custom Login Page Templates
- When configuring a session in Session Manager, select âDisplay session in its own window.â
- Copy the sample template âcustomloginpage.jspâ from /rweb/templates/samples to /rweb/templates.
- On the General tab in the Administrative WebStation Settings, enter customloginpage.jsp in the "Custom login page name (optional)" field.
Note: A unique callback function name is necessary if multiple sessions are to perform different scripting operations because code for multiple sessions launched through the links list will be found on the same âcustomloginpage.jspâ page. (It is also possible to change the parameter jsapiInitCallback for embedded, browser-based sessions, but in this case there is really no need to do so.)
Documentation for the JSAPI object is included with the Reflection for the Web Administrative WebStation, and the RWebSDK is available in a zip file on the product CD. It is also available as a separate download in the Maintenance Entitlements section at https://download.attachmate.com.
Java Attachment Classes
- When the session first starts, or when it closes.
- A toolbar button, keystroke, or button palette button can be set to run the class.
Comprehensive documentation discussing how to create, package, and deploy attachment classes is found in the Reflection for the Web SDK.
Java Standalone Applets
You can create a new Java applet providing whatever custom user interface you wish, and this applet code can create a new ECLSession object to connect to a host system. The ECLSession object, transparent to the end user, can be driven through code to collect host data or send input as necessary, and any result can then be displayed using your own custom applet interface. An HTML page containing an applet tag for this custom applet will be kept on the Reflection for the Web server, and optionally, the access to the applet can be controlled by the Reflection for the Web management server just as regular sessions are. For more information, see the Reflection for the Web SDK.
Java Standalone Applications
The Reflection for the Web SDK provides a single .jar file, RWebSDK.jar, that contains all classes that make up the Reflection for the Web Emulator Class Library. Normally, this .jar is used only by Java programmers while developing and testing attachment classes and standalone applets. However, it is possible to use the RWebSDK.jar to create a Java terminal emulation application based on Java frame or window classes with no dependency on the Reflection for the Web server. Documentation about this type of application is in the Reflection for the Web SDK, and example code is available from the Attachmate Download Library: RwebTerminalApp.zip.
Note: Each desktop to which this kind of application is distributed must be a licensed Reflection for the Web user.