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.64 date: 2018/04/26 10:49:12
user: cg
file: WebDemoApp1.st directory: goodies/webServer
module: stx stc-classLibrary: webServer
Author:
Claus Gittinger (cg@exept)

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 registerServiceIn:(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.


Related information:

    HTTPServer

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

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, 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  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 registerServiceIn:aServer.


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Wed, 19 Sep 2018 12:43:11 GMT