File: webserver-xotcl.html

package info (click to toggle)
nsf 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 13,208 kB
  • sloc: ansic: 32,687; tcl: 10,723; sh: 660; pascal: 176; javascript: 135; lisp: 41; makefile: 24
file content (180 lines) | stat: -rw-r--r-- 4,292 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">

<HTML>
<HEAD>
  <TITLE>XOTcl - Documentation -- ./apps/comm/webserver.xotcl</TITLE>
  <LINK REL="StyleSheet" HREF="xotcl-doc.css" TYPE="text/css">
</HEAD>

<BODY BGCOLOR="FFFFFF">
  <h1>
    <IMG SRC="./logo-100.jpg" ALT="./apps/comm/webserver.xotcl" ALIGN="MIDDLE">
  ./apps/comm/webserver.xotcl</h1>
  <HR>
  <P>
    <h2> Package/File Information </h2>
    <b> No package provided/required </b>
    <BR>
    <BR>
    <b>Defined Objects/Classes: </b>
    <UL>
      <LI>
        <A HREF="#SpecializedWorker">
          <em>SpecializedWorker</em>:
        </A>
        <a href="#SpecializedWorker-respond">respond</a>.
        <BR>
      </LI>
      <LI>
        <A HREF="#h1">
          <em>h1</em>:
        </A>
        
        <BR>
      </LI>
      <LI>
        <A HREF="#h2">
          <em>h2</em>:
        </A>
        
        <BR>
      </LI>
    </UL>
    <BR>
    <b> Filename: </b>
    <A HREF="./apps/comm/webserver.xotcl">
      ./apps/comm/webserver.xotcl
    </A>
    <BR>
    <BR>
    <TABLE BORDER="0">
      <TR VALIGN="top">
        <TD VALIGN="top">
          <em> Description:</em>
        </TD>
        <TD VALIGN="top">
          
    This small demo program starts two different webservers:
    <ul>
    <li>Firstly, it provides a sample web server that povides the documents in 
    ../../src/doc (or the files specified with -root) at port 8086 
    (or at the port specified via the -port option) as unprotected resources.
    <p>
    <li>Secondly, it starts a second webserver with basic access control
    (it accepts test/test as user/password) on port 9096 (or on the
    port specified via -protected-port). If it receives a request
    for an resource named "exit", it terminates. For all other requests
    it returns actual information about the user and the issued request.
    </ul>
    To see, how it works, contact it e.g. from netscape.
  
        </TD>
      </TR>
    </TABLE>
    <BR>
    <HR>
    <P>
      <A NAME="SpecializedWorker">
        
      </A>
      <h2> Class: <em> SpecializedWorker </em> </h2>
      <b>Class</b>: Class
      <BR>
      <b> Procs/Instprocs: </b> 
      <a href="#SpecializedWorker-respond">respond</a>.
      <TABLE BORDER="0">
        <TR VALIGN="top">
          <TD VALIGN="top">
            <em> Description:</em>
          </TD>
          <TD VALIGN="top">
            
  Specialized worker that can be passed to any webserver

          </TD>
        </TR>
      </TABLE>
      <h3>Instprocs</h3>
      <UL>
        <LI>
          <A NAME="SpecializedWorker-respond">
            
          </A>
          <b>respond </b>
          <TABLE BORDER="0">
            
            <TR VALIGN="top">
              <TD VALIGN="top">
                <em> Description:</em>
              </TD>
              <TD VALIGN="top">
                
  This method handles all responses from the webserver to the client.
  We implement here "exit", and we return the information about the  actual 
  request and  user in HTML format for all other requests.
  <p>This method is an example, how to access on the server side 
  request specific information.

              </TD>
            </TR>
          </TABLE>
        </LI>
      </UL>
    </P>
    <HR>
    <P>
      <A NAME="h1">
        
      </A>
      <h2> Object: <em> h1 </em> </h2>
      <b>Class</b>: Httpd
      <BR>
      
      
      <TABLE BORDER="0">
        <TR VALIGN="top">
          <TD VALIGN="top">
            <em> Description:</em>
          </TD>
          <TD VALIGN="top">
            unprotected web server
          </TD>
        </TR>
      </TABLE>
    </P>
    <HR>
    <P>
      <A NAME="h2">
        
      </A>
      <h2> Object: <em> h2 </em> </h2>
      <b>Class</b>: Httpd
      <BR>
      
      
      <TABLE BORDER="0">
        <TR VALIGN="top">
          <TD VALIGN="top">
            <em> Description:</em>
          </TD>
          <TD VALIGN="top">
            Web server with basic authentication using the specialized worker
          </TD>
        </TR>
      </TABLE>
    </P>
    <BR>
  </P>
  <HR>
  <P>
  </P>
  <A HREF="./index.html">
    Back to index page.
  </A>
  <BR>
  <HR>
  <P>
  </P>
</BODY>
</HTML>