Show: Delphi
C++
Display Preferences
Building a WebSnap Hello World Application
From RAD Studio
Go Up to Developing Web Applications with WebSnap
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 File > New > Other . The New Items dialog appears.
- In the New Items dialog, select WebSnap Application from the Delphi Projects > WebSnap or C++Builder Projects > WebSnap 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 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 Run > Run. An application window opens, and the COM server registers your WebSnap application with the Web Application Debugger.
- Close the application window.
- Choose Tools > Web App Debugger. The Web Application Debugger launches.
- In the Web App Debugger, click the Start button.
- Click 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.
Note: 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). For more documentation on VCL for the Web, go to http://www.atozed.com/intraweb/documentation/index.aspx .