Try OpenEdge Now
skip to main content
Online Help
Overview of Progress Application Server for OpenEdge : Tasks : Working with PAS for OpenEdge : Working with PAS for OpenEdge for WebApp : Creating a WebHandler Class
 
Creating a WebHandler Class
The web-disp.p control program available for WebSpeed applications for traditional servers does not exist in PAS for OpenEdge. Web object execution is controlled by a built-in handler object. This default handler class can be modified to implement any web-disp.p customizations that you want to replicate. However, you cannot migrate web-disp.p to a PAS for OpenEdge instance.
To modify the default handler class, create a new WebHandler class.
To create a new WebHandler class:
1. Select File > New > WebHandler from the Progress Developer Studio menu bar. The New WebHandler wizard opens.
Note: You can alternatively right-click the project and select New > WebHandler.
2. Specify an open project that will contain the class code and other project code in the Package root field. Click Browse if you want to select a project other than the current one (the default value).
3. Specify a package name in the Package field that corresponds to a sub-folder of the package root, and will contain the class file. Click Browse if you want to select a project other than the current one (the default value). A period (.) must separate each subfolder from its parent folder in the path name.
4. Specify the name of the Web handler class in the WebHandler name field.
5. Select the Final check box if you do not want to allow inheritance from this Web handler class. A FINAL option is included in the generated ABL code. A Final class cannot be Abstract.
6. Select the Abstract check box to specify that the Web handler class is abstract and cannot be instantiated. An abstract class is designed to serve as a super class from which other classes inherit and implement members. Therefore, an Abstract class cannot be Final.
7. Select the Widget pool check box to specify that a USE-WIDGET-POOL option is included in the generated ABL code.
8. Select the Serializable check box to mark the Web handler class as serializable by including the SERIALIZABLE modifier in the generated ABL code.
Note: If the class inherits from a super class that is not serializable, then it cannot be marked as serializable. The WebHandler class should always inherit 'OpenEdge.Web.WebHandler' directly or through other classes.
9. Specify another class in the current project as a super class (or a different project that is available in the propath) from which the new class inherits state and behavior in the Inherits field. Click Browse or enter the class path by typing. A period (.) must separate each node from its parent folder in the path name.
Note: By default, the super class name is populated as OpenEdge.Web.WebHandler. The super class cannot be generic.
10. Specify one or more interfaces in the current project or a different project that is available in the propath that the class implements using the Implements section. Click Add and select the required interfaces in the Interface Selection dialog. Click Remove to remove an interface from the list after adding it.
11. Select the methods in the Method stubs section that you want to generate in the Web handler class.
Note: The GET method is selected by default.
12. Select one of the following error-handling statements to add it to the generated ABL code:
*Block level: Includes the BLOCK-LEVEL ON ERROR UNDO, THROW statement in the generated ABL code.
*Routine level: Includes the ROUTINE-LEVEL ON ERROR UNDO, THROW statement in the generated ABL code.
13. Select Throw a Not Implemented exception option button to specify that "METHOD NOT IMPLEMENTED" error code is added to stubs for members implemented via interface and stubs for inherited abstract members.
14. Select Return a default value option button to specify that the default return values are added to stubs for members implemented through interface and stubs for inherited abstract members.
15. Click Finish.