* Fixes for typos from Reinier Olislagers (bug 23895)

git-svn-id: trunk@23699 -
This commit is contained in:
michael 2013-03-06 08:34:20 +00:00
parent 823e3ea398
commit 02f64db373
8 changed files with 51 additions and 53 deletions

View File

@ -1,9 +1,9 @@
Responds with the calling and system parameters, example
================================================
Demonstrates how to create a basic fpweb application. It responds to a request
with a list of received/sent parameters, server settings and variables.
Example that responds with the calling and system parameters
============================================================
This demonstrates how to create a basic fpweb application. It responds to a
request with a list of received/sent parameters, server settings and variables.
Note, that other than the main project file (echo.lpr) there is not much that
Note: apart from the main project file (echo.lpr), there is not much that
needs to change with using fpweb, no matter if we create CGI/FCGI applications
or Apache modules. The web server config is different for each, of course.
@ -25,7 +25,7 @@ in the cgi/fcgi/apache directories.
1.a; with FPC
-------------
Enter to the directory (cgi/fcgi/apache) that has the .lpr file you wish to
Go to the directory (cgi/fcgi/apache) that has the .lpr file you wish to
compile, and then execute the command
fpc -Fu../webmodule echo.lpr
@ -35,8 +35,9 @@ three web applications share the same web module code.
1.b; with Lazarus
-----------------
It needs the WebLaz Package installed. Open the .lpi file from the choosen
application directory (cgi/fcgi/apache), and then
The example needs the WebLaz Package installed.
If that is done, open the .lpi file from the choosen application directory
(cgi/fcgi/apache), and then
Run -> Build from the menu.
@ -48,7 +49,7 @@ Run -> Build from the menu.
-----------
http://<WebServer>/cgi-bin/<CGIExecutableName>/ should start the example if
everything is set up properly.
ex: http://127.0.0.1:8080/cgi-bin/echo.exe/
example: http://127.0.0.1:8080/cgi-bin/echo.exe/
Note: You need to change the CGI application name if needed (for example, on
Linux it is not echo.exe).
@ -62,7 +63,7 @@ http://<WebServer>/<ApacheLocationName>/ should start the example if
everything is set up properly.
ex: http://127.0.0.1:8080/myapache/
if in the Apache configuration file (ex: httpd.conf) it was set up as:
An example for the needed Apache configuration file (example: httpd.conf) snippet:
LoadModule mod_echo "<path_to_mod>/echo.dll"
<Location /myapache>
@ -76,9 +77,9 @@ the module can be libecho.so or just simply libecho and not echo.dll .
Note: If you recompile an Apache module while the module itself is loaded into
the Apache server, the compilation will fail, because the file is in use
(Apache modules stay in the memory). So first, you always need to stop the
Apache server before you recompile or before you copy over the new version of
the created module.
(Apache modules stay in memory).
So first, you always need to stop the Apache server before you recompile
or before you copy over the new version of the created module.
2.c; as FCGI
@ -86,7 +87,8 @@ the created module.
http://<WebServer>/<ApacheScriptAliasName>/ should start the example if
everything is set up properly.
ex: http://127.0.0.1:8080/myfcgi/
if in the Apache configuration file (ex: httpd.conf) it was set up as:
An example for the needed Apache configuration file (example: httpd.conf) snippet:
LoadModule fastcgi_module "<path_to_mod>/mod_fastcgi-2.4.6-AP22.dll"
<IfModule mod_fastcgi.c>
@ -102,7 +104,7 @@ LoadModule fastcgi_module "<path_to_mod>/mod_fastcgi-2.4.6-AP22.dll"
</IfModule>
Note: You need to change the module name if needed. For example on Linux,
the module is not mod_fastcgi-2.4.6-AP22.dll but mod_fastcgi.so (need to be
the module is not mod_fastcgi-2.4.6-AP22.dll but mod_fastcgi.so (needs to be
compiled from sources found at http://www.fastcgi.com/dist/ ).
The port (2015 in this example) must match the one set in the project main
file (echo.lpr).

View File

@ -1,13 +1,14 @@
FPTemplate examples
===================
These examples are demonstrating some uses of templates (with FPTemplate) when
These examples demonstrate some uses of templates (with FPTemplate) when
generating HTML pages by CGI/FCGI programs or Apache modules.
The main idea is to leave the web page designing and look&feel to the web page
The main idea is to leave the web page design and look&feel to the web page
designers. Separating the web page design from the back-end CGI/FCGI/Apache
application makes it possible to design, change or redesign a whole website
without modifying a single line of code in the CGI/FCGI/Apache application.
Back-end programmers and web page designers can work parallel easily, and
Back-end programmers and web page designers can easily work parallel, and
neither side needs extensive knowledge of the other (does not hurt, just not
necessary most of the time).
@ -24,7 +25,7 @@ CGI/FCGI/Apache application when generating the response page -> {TagName1}
See README.txt
2. /tagparam/*.*
Demonstrating the set up and use of template tag parameter(s)
Demonstrates the set up and use of template tag parameter(s)
-> {+DATETIME [-FORMAT=MM/DD hh:mm:ss-]+}
3. /listrecords/*.*
@ -34,7 +35,7 @@ See README.txt
4. /fileupload/*.*
Demonstrates uploading file(s) to a web server with the help of a CGI/FCGI
program or Apache module by using so called "multipart" html forms.
program or Apache module by using so called "multipart" HTML forms.
See README.txt
5. /sessions/*.*

View File

@ -1,9 +1,9 @@
Hello world, example
============
Hello world example
===================
The simplest "Hello World" example using fcl-web (fpweb) that uses a web action
called "func1call" in the web module to generate the response page.
Note, that the only difference between CGI/FCGI and Apache module is in the
Note that the only difference between CGI/FCGI and Apache module is in the
main project .lpr file and the web server (Apache) configuration.
=====================
@ -24,7 +24,7 @@ in the cgi/fcgi/apache directories.
1.a; with FPC
-------------
Enter to the directory (cgi/fcgi/apache) that has the .lpr file you wish to
Go to the directory (cgi/fcgi/apache) that has the .lpr file you wish to
compile, and then execute the command
fpc -Fu../webmodule helloworld.lpr
@ -60,7 +60,7 @@ the :8080 part from the calling URL.
http://<WebServer>/<ApacheLocationName>/func1call should start the
example if everything is set up properly.
ex: http://127.0.0.1:8080/myapache/func1call
if in httpd.conf it was set up as:
Example Apache configuration file (e.g. httpd.conf) snippet for this:
LoadModule mod_helloworld "<path_to_mod>/helloworld.dll"
<Location /myapache>
SetHandler mod_helloworld
@ -85,7 +85,7 @@ On Linux, it is enough to simply reload Apache after recompile.
http://<WebServer>/<ApacheScriptAliasName>/func1call should start the example
if everything is set up properly.
ex: http://127.0.0.1:8080/myfcgi/func1call
if in the Apache configuration file (ex: httpd.conf) it was set up as:
Example Apache configuration file (e.g. httpd.conf) snippet for this:
LoadModule fastcgi_module "<path_to_mod>/mod_fastcgi-2.4.6-AP22.dll"
<IfModule mod_fastcgi.c>

View File

@ -11,7 +11,7 @@ begin
Writeln('Usage : testhttp DocumentRoot [Port]');
Writeln('Where');
Writeln(' Documentroot location to serve files from. It is mapped to location /files');
Writeln(' Port port to listen on (default 8080)');
Writeln(' Port port to listen on (default 8080)');
Halt(1);
end;

View File

@ -1,21 +1,21 @@
This is an example of how to use JSON-RPC.
It requires lazarus to compile.
It requires Lazarus to compile.
The various *.in files are input for JSON-RPC requests.
The application can be tested as follows from the command-line
The application can be tested as follows from the command line:
testcgiapp -i demo -p echo/manual < echo.in
testcgiapp -i demo -p echo/dispatch < echobatch.in
testcgiapp -i demo -p echo/registered < echobatch.in
testcgiapp -i demo -p echo/extdirect < extdirect.in
testcgiapp -i demo -p echo/dispatch <notification.in
testcgiapp -i demo -p echo/dispatch < notification.in
testcgiapp -i demo -p echo/extdirectapi
testcgiapp -i demo -p echo/content <echobatch.in
testcgiapp -i demo -p echo/module <echobatch.in
testcgiapp -i demo -p echo/content < echobatch.in
testcgiapp -i demo -p echo/module < echobatch.in
The response is printed on standard output.
the testcgiapp application is located in fcl-web/tests
The testcgiapp application is located in fcl-web/tests

View File

@ -12,7 +12,6 @@ type
{ TFPWebModule1 }
TFPWebModule1 = class(TFPWebModule)
procedure DataModuleCreate(Sender: TObject);
procedure TFPWebActions0Request(Sender: TObject; ARequest: TRequest;
AResponse: TResponse; var Handled: Boolean);
procedure TFPWebActions1Request(Sender: TObject; ARequest: TRequest;
@ -44,10 +43,6 @@ Uses fpjson,jsonparser,fpjsonrpc,webjsonrpc, fpextdirect;
{ TFPWebModule1 }
procedure TFPWebModule1.DataModuleCreate(Sender: TObject);
begin
end;
procedure TFPWebModule1.TFPWebActions0Request(Sender: TObject;
ARequest: TRequest; AResponse: TResponse; var Handled: Boolean);
{
@ -128,7 +123,7 @@ procedure TFPWebModule1.TFPWebActions1Request(Sender: TObject;
{
Demo 2. Use a dispatcher to dispatch the requests.
The handler is located on the owner module
(it is created run-time, though)
(it is created run-time, though).
}
Var
@ -181,9 +176,9 @@ end;
procedure TFPWebModule1.TFPWebActions2Request(Sender: TObject;
ARequest: TRequest; AResponse: TResponse; var Handled: Boolean);
{
Demo 3. Use a dispatcher to dispatch the requests,
The handler is registered in the JSONFPCHandlerManager.
(it is created run-time, though)
Demo 3. Use a dispatcher to dispatch the requests.
The handler is registered in the JSONFPCHandlerManager
(it is created run-time, though).
}
Var
@ -235,8 +230,8 @@ procedure TFPWebModule1.TFPWebActions3Request(Sender: TObject;
{
Demo 4. Ext.Direct dispatcher
The handler is registered in the JSONFPCHandlerManager.
(it is created run-time, though)
The handler is registered in the JSONFPCHandlerManager
(it is created run-time, though).
}
Var
@ -289,8 +284,8 @@ procedure TFPWebModule1.TFPWebActions4Request(Sender: TObject;
{
Demo 5. Using a TJSONRPCContentProducer.
The handler is registered in the JSONFPCHandlerManager.
(it is created run-time, though)
The handler is registered in the JSONFPCHandlerManager
(it is created run-time, though).
}
Var
@ -325,9 +320,9 @@ end;
procedure TFPWebModule1.TFPWebActions5Request(Sender: TObject;
ARequest: TRequest; AResponse: TResponse; var Handled: Boolean);
{
Demo 6. creating an API response for Ext.Direct
The handler is registered in the JSONFPCHandlerManager.
(it is created run-time, though)
Demo 6. Creating an API response for Ext.Direct
The handler is registered in the JSONFPCHandlerManager
(it is created run-time, though).
}
Var
@ -356,7 +351,7 @@ procedure TFPWebModule1.TFPWebActions6Request(Sender: TObject;
{
Demo 6. Using a TJSONRPCModule instance to handle the request.
The handler is registered in the JSONFPCHandlerManager.
(it is created run-time, though)
(it is created run-time, though).
}
Var

View File

@ -49,7 +49,7 @@ end;
{
When a new session is detected
- either because there was no session,in which case NewSession is the default
- either because there was no session, in which case NewSession is the default
- The URL contained the newsession action in the 'DemoSession' action variable,
something like:
@ -93,7 +93,7 @@ end;
that is currently stored in the session object.
If the user supplied a new value for 'var', we store it in the session.
to supply the value, append
To supply this value, append
?var=value
to the URL.
}

View File

@ -1,7 +1,7 @@
The demo directories demonstrate the use of the TFPWebDataProvider
components, using ExtJS. It demonstrates the use of JSON and XML
communitation between a ExtJS Datastore and the webdataprovider.
communication between an ExtJS Datastore and the webdataprovider.
ExtJS must be installed, it can be downloaded for free from
http://www.extjs.com/