-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------

[EMAIL PROTECTED] wrote:
> 
> I have two questions, one specific and one general, concerning the
> relationship between JSP and servlet zones, and the management of
> application-specific sessions.
> 
> Firstly, to the specific - is there a way to easily integrate servlet zones,
> which are partitioned in URL space, with a system such as GNUJSP that relies
> on association between an extension (such as .jsp) and a handling servlet,
> that is declared globally, ie not partitioned? The problem is that, given
> servlet zones Dev and Prod for example, it is only possible to associate
> .jsp files with *one* of these zones using the APJservAction directive, such
> as
> 
>         APJServAction .jsp /Dev/gnujsp
> 
> The difficulty is that, unlike the servlet space, the JSP URL space is not
> partitioned. Is the only way forward to use URL rewriting or virtual hosts
> in order to explicitly partition the JSP URL space as well?
> 
> This brings me to my second question, which is really the reason why I am
> grappling with the first. I would like to roll out the JServ/JSP combination
> at a complex site in which seven independent client "installations" exist.
> Each of these installations has at least three, usually more, "environments"
> - Production, Test, Parallel and so on. This means at least twenty, in
> reality more like thirty, individual environments to roll out. Furthermore,
> users of the existing (character-based) system are used to logging into
> multiple environments simultaneously from the same desktop. In order to
> ensure full session separation, particularly within the same desktop, this
> presumably means thirty servers or virtual hosts.
> 
> The production environments should definitely have separate servers, but
> ideally I would like to minimise the amount of administration for the
> non-production environments (particularly as I am trying to demonstrate an
> advantage over the legacy system) by combining some of these environments
> onto a much smaller number of servers. A particular headache then is users
> attempting to simultaneously connect to multiple environments on a single
> server and corrupting their unique session, since it appears that
> HttpRequest.getSession() returns the same session object for all requests
> from all browser windows on the same desktop (although, interestingly, only
> for that make of browser). Something like servlet zones would be ideal for
> this (hence my first question) but then I am presumably going to have a lot
> of virtual hosts and/or rewrite rules, which is hard work. Or - and here's
> the real question - is it worth, or even sensible, abandoning zones and
> implementing custom session management so that the JSP applications
> themselves distinguish between different environments based on
> client-supplied information? Or are there products/frameworks/toolkits that
> can already do this?
> 
> Somewhat broad-ranging questions, I know, but any opinions would be much
> appreciated.
> 
Response tp 2nd question : we here have already had some discussions
about sharing/not sessions across zones.
In 1.0 final, yes we have one sessionid name, and the sessionId value is
overwritten by the latest session created.
in 1.0.1 we should discover 1 sessionId name per zone, which avoid
collisions between zones. The sessionId name will be
JServSessionId+zone. The patch is already in CVS, I did test it at home.
It does not break the load-balancing stuff (hopefully).
This is the cookie version, the browser sends all cookies to the web
server, and the cookie used will be the "zone cookie", other cookies
will be ignored.
But, this will possibly not work with sessions contained in URLs, as I
don't think all sessions will be sent all the time (I didn't look deep
enough in the code). Has to be checked.

for your 1rst Q, I have no answer now. I think the easiest solution is
using virtual hosts, or maybe using mod_rewrite this way :
rewrite Dev/xxx.jsp in something like Dev/xxx.jspd
and use :
APJServAction .jspd /Dev/gnujsp
APJServAction .jsp /Prod/gnujsp
Don't know if it works. ;-)

Jean-Luc Rochat


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to