WebSpeed
Developer’s Guide


Moving Application Files to Appropriate Directories

After you create a working directory, move the appropriate application files into the working directory. However, you must move some files to an appropriate Web server directory, such as the document root. Here is a list of common files that you must place in appropriate directories:

Web objects and procedures

Whenever you create a runnable procedure using the AppBuilder, you create a Web object. Sometimes, you create Web objects that are mapped to HTML files, but this is not required to dynamically generate HTML pages. Either way, during development, you must move all of your WebSpeed procedure files (.w, .p, or .i) into your application PROPATH. This ensures that the Agents can find and execute your WebSpeed procedures. If you precompile all of your procedures (creating .r files), you can remove the source files when you actually deploy the application. For more information, see the "Compiling Web Objects" section.

HTML and other static files

As described earlier in this document, some of the HTML files and images that you use in your Web presentation might never be processed by WebSpeed. These HTML files are served as static HTML pages that never change throughout the life of your Web presentation. You must place these files on your Web server machine so that your Web server can serve them directly to the Web user. However, if your WebSpeed application uses HTML files to dynamically generate HTML pages, you must make the HTML files visible to the Broker and Agents. The easiest way to achieve this is to place them in your application working directory (the Broker’s default directory) or elsewhere in PROPATH.

Java class files

You should place Java class files in a subdirectory of the Web server root directory. Then you can reference the subdirectory in the CODEBASE attribute of the APPLET tag and the Java class file in the CODE attribute of the APPLET tag.

For example, if the Java class file, myclass.class is in a subdirectory of the Web server root directory called java_classes, the APPLET tag might look like the following:

<APPLET CODE=“myclass.class” CODEBASE=“/java_classes”></APPLET>
JavaScript files

You should place JavaScript (.js) files in a subdirectory of the Web server root directory. Then you can reference the relative path in the SRC attribute of the SCRIPT tag.

For example, if the JavaScript file, myscript.js is in a subdirectory of the Web server root directory called javascript, the SCRIPT tag might look like the following:

<SCRIPT LANGUAGE="JavaScript" SRC="/javascript/myscript.js"></SCRIPT>
tagmap.dat

If you modify the default tagmap.dat, place a copy of the modified tagmap.dat into your working directory. If you do not modify the file, you do not have to copy the file because the default tagmap.dat is used.

Offset files

An offset file (.off) is created whenever you use the AppBuilder to map an HTML file to a Web object. Agents use the offset file information to dynamically generate an HTML page. The purpose of the offset file is to provide the location of the HTML form fields in the HTML file. You ensure that the Agents can find your offset files by placing them in your working directory or in the directory with your running Web objects (or r-code). If an offset file is not current for its HTML-mapping Web object, the Agent generates a new offset file from your mapped HTML file and the available tagmap.dat file.

NOTE: Some of the above files are ASCII files and some are binary; therefore, when you transfer the files, make sure you use the ASCII or Binary transfer mode appropriate to each set of files.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095