Though simple, the WebSnap "Hello world" application demonstrates the essential steps for creating an WebSnap application.
Building the WebSnap "Hello world" application consists of five major steps:
- Create a WebSnap project.
- Accept the default included components.
- Set the page title in the page options.
- Modify the HTML template.
- Run the application.
To create a WebSnap project
- Choose FileNewOther. The New Items dialog appears.
- In the New Items dialog, select WebSnap Application from the Delphi ProjectsWebSnap or C++Builder ProjectsWebSnap folder.
- Click OK. The New WebSnap Application dialog appears.
- Select the Web App Debugger executable radio button.
- In the Class Name field, enter HelloWorld.
- Select your application model components.
- In the Page Name field, enter HelloWorld.
- Select your caching type from the Caching drop-down.
To change included components (optional)
- In the New WebSnap Application dialog, click Components. The WebApp Components dialog appears.
- Select the components you want to include.
Tip: In most cases, the default settings will suffice.
- Click OK.
To set the page title in the page options
- In the New WebSnap Application dialog, click Page Options. The WebApp Components dialog appears.
- In the Title field, enter Hello World!.
To modify the HTML template
- Click on the HTML tab in the IDE.
- Below the line <h2><%= Page.Title %></h2>, insert a line saying This is my first WebSnap application.
- Save the application.
To run the "Hello world" application
- Choose RunRun. An application window opens, and the COM server registers your WebSnap application with the Web Application Debugger.
- Close the application window.
- Choose ToolsWeb App Debugger . The Web Application Debugger launches.
- In the Web App Debugger, click the Start button.
- Click on the Default URL to launch the browser.
- In the browser, select your Hello World application from the list of applications and click Go. Your application appears in the browser with the text Hello World! This is my first WebSnap application.
- Close the Web browser to return to the IDE.
WebSnap is being deprecated in RAD Studio. Although WebSnap is still documented in the online help, the WebSnap product is no longer fully supported. As an alternative, you should begin using IntraWeb (VCL for the Web). IntraWeb
is documented in this online help. For more documentation on VCL for the Web, go to http://www.atozed.com/intraweb/docs/