RAD Studio
ContentsIndex
PreviousUpNext
Building a WebSnap "Hello World" Application

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:

  1. Create a WebSnap project.
  2. Accept the default included components.
  3. Set the page title in the page options.
  4. Modify the HTML template.
  5. Run the application.

To create a WebSnap project

  1. Choose FileNewOther. The New Items dialog appears.
  2. In the New Items dialog, select WebSnap Application from the Delphi ProjectsWebSnap or C++Builder ProjectsWebSnap folder.
  3. Click OK. The New WebSnap Application dialog appears.
  4. Select the Web App Debugger executable radio button.
  5. In the Class Name field, enter HelloWorld.
  6. Select your application model components.
  7. In the Page Name field, enter HelloWorld.
  8. Select your caching type from the Caching drop-down.

To change included components (optional)

  1. In the New WebSnap Application dialog, click Components. The WebApp Components dialog appears.
  2. Select the components you want to include.
    Tip: In most cases, the default settings will suffice.
  3. Click OK.

To set the page title in the page options

  1. In the New WebSnap Application dialog, click Page Options. The WebApp Components dialog appears.
  2. In the Title field, enter Hello World!.

To modify the HTML template

  1. Click on the HTML tab in the IDE.
  2. Below the line <h2><%= Page.Title %></h2>, insert a line saying This is my first WebSnap application.
  3. Save the application.

To run the "Hello world" application

  1. Choose RunRun. An application window opens, and the COM server registers your WebSnap application with the Web Application Debugger.
  2. Close the application window.
  3. Choose ToolsWeb App Debugger . The Web Application Debugger launches.
  4. In the Web App Debugger, click the Start button.
  5. Click on the Default URL to launch the browser.
  6. 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.
  7. 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). IntraWeb is documented in this online help. For more documentation on VCL for the Web, go to http://www.atozed.com/intraweb/docs/.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!