I'm ready to apply this patch to Webware CVS, but now I'm wondering if
"pathContext" is the best choice of a name for these fields. I can think
of additional possibilities:
- call them "pathFields", "pathValues", or "pathVariables".
- these values can just be merged into the fields along with the POST/GET
variables. This would be my preference unless there's some compelling
reason they need to be separate. I would make the POST/GET values override
the path values if both were present.
Also, the patch doesn't include any accessor methods in HTTPRequest.py to
actually retrieve the values in self._pathContext. If we just merge them
into the fields, it's not necessary, but otherwise accessors are needed.
Comments?
At 11:32 PM 8/11/01 -0400, Clark C . Evans wrote:
>Please find attached a patch for HTTPRequest.py
>and Applicaiton.py which generalizes Heiko Hees's
>wonderful "Path Based Session" to allow for
>session-like variables to be included in the
>path *before* the servlet context.
>
>Benefits:
>
> This patch allows for contextual variables
> to be provided to all servlets within
> a given context independent of session.
>
> For example, if the user has more than one
> window open, a window handle can be placed
> in this context region. Or if the language
> used must be known before the login-screen,
> then this can be used to encode the language
> used by the system, etc.
>
> The advantage is that this information is
> not tied to a session, and thus can differ
> for each window a user is browsing with
> and/or does not expire. And yet, these
> variables need not be included in a
> relative URL and are relatively persistent.
>
>Operation:
>
> In the request initialization code, the path
> is scanned for KEY=VALUE pairs immediately
> following the adapter, but preceding the
> context and/or default context.
>
> Any KEY=VALUE pairs are extracted and
> put into the request's _pathContext,
> which is a map. After extraction, the
> path is re-written to remove said
> KEY=VALUE pairs.
>
> The Path Based Context (_SID_) is
> implemented then by checking this
> pathContext rather than by a specific
> scan for _SID_ following the adapter.
>
>
>Impacts:
>
> This will break users that are using a
> servlet context containing the equal
> sign, or using the default context
> having a directory or servlet with
> the equal sign.
>
> This should be a minor, if non-existant
> impact since most path and servlet names
> do not include an equal sign.
>
>Example:
>
> If given the URL of
>
> http:\\localhost\WK\A=B\C=345\context\servlet
>
> then the request object is populated with
> a _pathContext map of
>
> {'A':'B', 'C':'345' }
>
> and the URL is re-written so that the
> remaining WebKit system is shown...
>
> http:\\localhost\WK\A=B\C=345\context\servlet
--
- Geoff Talvola
[EMAIL PROTECTED]
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel