You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-user@tcl.apache.org by Jerry Lam <bo...@hotmail.com> on 2003/11/24 19:57:08 UTC

web::context

Hi, 

Let say I define this in my login page:

web::context appParam

I wonder if appParam will be defined in all subsequent pages and is appParam a share namespace for everyone who accesses the application?

Thanks,

Jerry

Re: web::context

Posted by Ronnie Brunner <ro...@netcetera.ch>.
Jerry

> Let say I define this in my login page:
> 
> web::context appParam
> 
> I wonder if appParam will be defined in all subsequent pages and is
> appParam a share namespace for everyone who accesses the
> application? 

Not automatically, no. You have to make sure that either the code that
creates and fills your context is called in every request or that it
has at least been called in the interpreter that handles your request.

It's all a matter of designing your application: will an interpreter
handle multiple requests (one after the other); will different pages
share an interpreter class and the like.
The easiest setup (because you'll never have session leaking) is to
have one request per interpreter. This however means, that for every
request, you *must* call web::context and fill your configuration
accordingly.

Ronnie
----------------------------------------------------------------------
Ronnie Brunner                             ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich   phone +41 1 247 79 79 fax +41 1 247 70 75