| |
| Site
Processing |
| The
sites are configured in a manner very similar
to the ZDE itself - via configuration files
and properties files. The zdeSiteServer.conf
file contains similar information (as the
zdeServer.conf file), but for each site. The
one difference is the Rewrite directive -
there is no such directive for the sites.
It contains the reference to the JServ configuration
file - the zcSite_jserv.conf. There, the mount
point declared is zcSite. The Apache JServ
properties file is zcSite_jserv.properties,
which contains the zone declaration for zcSite.
It also contains a reference to the configuration
file for the zone zcSite.properties. this
file includes the names of the runtime libraries
for zeroCode-generated applications (zeroCode.jar
and the site-specific dbObjects.jar) and the
reference to the run-time "traffic cop" site-specific
servlets - instances of UdmServlet. |
| |
The
sequence of execution on the site side is
a little more intricate than the ZDE, since
it involves FreeMarker in a very strong role.
The sequence is described below. |
|
1.
|
The
user keys in the URL of a zeroCode-generated
site and clicks enter; the URL includes the
IP address of the server,
the port number and the URI (the slashes and
site name) of the site. |
|
2.
|
The
IP address is resolved by the browser and
the web server at that IP is contacted (Apache
on Linux or IIS on NT). |
|
3.
|
The
web server recognizes the URI as belonging
to the zcSite zone and invokes the appropriate
site-specific servlet (based
on the Alias specified in the zcSite.properties
file). |
|
4.
|
The
invoked servlet processes the request as needed.
For example, for a request asking for index.html,
the page is displayed directly,
while a request for anything else results
in the servlet checking for a session in that
user's name (via a session ID in a cookie
that is passed back to the server) and then
responding with the appropriate
processing and page. |
| |
| In
a generated site, the UDMs are stored in directories
that are analogous to the HTML - for example,
for the …/testSites/Adept/webfiles/templates/custom/addcustomer.html
page, the UDM is …/testSites/Adept/udmfiles/
custom/addcustomer.xml. The typical page-specific
processing sequence for a List page is : |
| |
|
a.
|
UdmServlet (or a related piece of code) invokes
the Java object that fills the UDM. |
|
b.
|
The
object:
Looks
for a UDM in the appropriate directory
Builds the SQL needed
Retrieves the data components
Fills the UDM-related data structure
Returns it to the servlet |
|
c.
|
The
servlet passes the data object to FreeMarker,
along with the HTML template. |
|
d.
|
FreeMarker
fills the HTML template with the data from
the object and delivers the completed page
to the web server. |
|
e.
|
The web server delivers the page to the browser,
as requested. Server-side object extensions
are invoked in step b above,
based on references to them in the retrieved
UDM. |
|
|
|
|
|
|