On Mon, 25 Jun 2001, Jonathan Asbell wrote:

> I will be implementing new scopes using Struts for our unique needs,
> and they need to be application server independent.
> 
> One scope will work across (between) web-applications:  Ex. user logs
> on, and an object representing the users values and state is placed
> into a scope where ALL WEB APPLICATIONS can see it.
> 
> Another scope is restricted to specified directories inside of an
> application:  Ex. data saved would only be visible when inside a
> specific sub-directory.
> 
> I am currently examining the 2.3 servlet spec.  Does anyone have any
> advice as to what to watch out for in implementing this considering I
> want to be able to be compatible with servlet containers in general
> and leverage container management and web.xml configuration.  Could
> anyone refer me to some specific sections in the servlet spec that you
> feel I should pay specific attention to while I am doing this.
> 
> Thank you
> Jonathan
> 

For the first, the servlet spec is not going to help you much.  It has
very little to say about cross-application support.  In particular, you
cannot even assume the existence of a "shared library" facility (like the
$TOMCAT_HOME/lib directory in Tomcat) that makes classes available
globally.  The standard advice is to use databases or EJBs for data that
needs to be available across web applications.

For the second, there is nothing the servlet container will do for you to
isolate information access *within* an app.  You'll have to provide your
own data access APIs for that purpose - but, it should be quite easy to
make this portable if you rely only on the standard servlet API facilities
(like sessions) underneath.

Craig


Reply via email to