On 03/03/2016 06:03 AM, Brice Hamon wrote:
I will give it a shot but after I understand something with 2.4.

I now use SeparateVirtualInterps set to on and ChildInitScript to init all
DB connections and sockets for each child processes. How do I get access to
them from a .rvt page?


you get access to them by fully qualifying the names of variables/commands that refer to them. You may store your I/O handles and DB connections in some namespace, provided you qualify its name *outside* the ::request namespace. Years ago I wrote this page for the manual about request processing

http://tcl.apache.org/rivet/manual2.2/request.html

it explain the default globals namespace :: is the namespace where script run except for code placed in rvt templates that runs within the ::request namespace. Obviously you can't store the application status in those variables, the Session package is there for this.

I tried ::request::global, or looking for [info vars xxx] etc but could not
find my variables.

Thanks


I usually do most of the work of processing a request in BeforeScript and put in the template just the code to fetch the data to be displayed (along with the page title and other metadata...)

 -- Massimo

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to