eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Demos::WebDemoApp1':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: WebDemoApp1 (in Demos)


Inheritance:

   Object
   |
   +--HTTPService
      |
      +--HTTPSelectorService
         |
         +--Demos::WebDemoApp1

Package:
stx:goodies/webServer
Category:
Net-Communication-HTTP-Services-Demo-WebApplications
Version:
rev: 1.72 date: 2022/11/11 20:25:27
user: cg
file: WebDemoApp1.st directory: goodies/webServer
module: stx stc-classLibrary: webServer

Description:


Demonstrates some webApplication features.
To start:

  start the HTTPServer at some port
  aServer := HTTPServer startServerOnPort:8080

  register the class (towards the HTTPServer) with:
    Demos::WebDemoApp1 registerServiceOn:(HTTPServer runningServers first)

Open a netscape or internet explorer (somewhere);
enter the URL:
    httP://host:port/WebDemoApp1/test1
or (test2, test3, ...)

For each request, a corresponding method in this class is
invoked, which returns an html document.

copyright

COPYRIGHT (c) 2003 by eXept Software AG All Rights Reserved This software is furnished under a license and may be used only in accordance with the terms of that license and with the inclusion of the above copyright notice. This software may not be provided or otherwise made available to, or used by, any other person. No title to or ownership of the software is hereby transferred.

Class protocol:

class access
o  defaultReplyPresenterClass

defaults
o  linkName
return the default linkName path (with slash)

queries-service
o  isThreadSafe

o  settingsApplicationClass
a SettingsApplication class - or nil (used in the settings dialog if non-nil)


Instance protocol:

queries-service
o  addRequiredForeignServicesTo: anHTTPServer
I need a file service for the bitmaps and icons

o  allowedMessages

o  defaultMessage

o  offeredItems

serving
o  acceptSource: aRequest

o  editSource: aRequest

o  openAsWebPage: aRequest

o  showSource: aRequest
raises an authentication error if not authorized

o  sourceForSelector: anArgument

o  test1: aRequest
a simple reply, with an URL refering to another method inside myself.

Invoke via the browser as URL:
host:port/<N>,test1:
where <N> is the registered name of this service.

o  test2: aRequest
another simple reply, with an URL refering to another method inside myself

Invoke via the browser as URL:
host:port/<N>,test2:
where <N> is the registered name of this service.

o  test3: aRequest
a dialogForm; when submitted, test3Action is invoked.

Invoke via the browser as URL:
host:port/<N>,test3:
where <N> is the registered name of this service.

o  test3Action: aRequest
a dialog's action; invoked when the dialog from test3 is submitted.
This one simply shows the entered values

o  test4: aRequest
another dialog form

Invoke via the browser as URL:
host:port/<N>,test4:
where <N> is the registered name of this service.

o  test4Action: aRequest
a dialog4's action; invoked when the dialog from test4 is submitted.
This one executes a unix command based on the input, and
shows the output in a textArea

o  test5: aRequest
send a file
- requires a test4.html file
to be found under the htmldialogs directory.

o  test6: aRequest
send a file
- requires a test6.html file
to be found under the htmldialogs directory.

o  test7: aRequest
a dynamic html page, showing a factorial table.
Invoke via browser as URL:
host:port/<N>,test7:
where <N> is the registered name of this service.

o  test8: aRequest
a dynamic html page to upload a file.
Invoke via browser as URL:
host:port/<N>,test8:
where <N> is the registered name of this service.

o  testGoogle: aRequest
a dynamic html page, showing a factorial table.
Invoke via browser as URL:
host:port/<N>,testGoogle:
where <N> is the registered name of this service.

o  testStauSuche: aRequest

o  test_svg1: aRequest
a reply, generating html using an HTMLBuilder

Invoke via the browser as URL:
host:port/<N>,svg1:
where <N> is the registered name of this service.

o  test_svg2: aRequest
a reply, generating html using an HTMLBuilder

Invoke via the browser as URL:
host:port/<N>,svg1:
where <N> is the registered name of this service.

o  theSVG1: aRequest
a reply, generating svg which is embedded by test_svg1:

o  theSVG2: aRequest
a reply, generating svg which is embedded by test_svg2:

o  timeNow: aRequest
a very simple reply: shows the current time.

Invoke via the browser as URL:
host:port/<N>,timeNow:
where <N> is the registered name of this service.

serving-helpers
o  addLinksForSource: selector previous: previousOrNil next: nextOrNil to: aRequest


Examples:


start the HTTPServer at some port and register the class (towards the HTTPServer) Open a netscape or internet explorer (somewhere); enter the URL: httP://host:port/WebDemoApp1:test1 or (test2, test3, ...)
  |aServer|

  aServer := HTTPServer serverOnPort:8081.
  self registerServiceOn:aServer.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 09:51:00 GMT