On Friday 14 December 2001 23:44, Tripp Lilley wrote:
> Chuck told me to just post enhancement requests here, since the
> Tracker isn't currently configured with different categories for
> enhancements, bugs, etc.
>
> Note that I'm not just expecting this stuff to magically "happen".
> I'm just recording the ideas for posterity so other people know
> about them (and maybe get inspired by them), and so I have
> somewhere to go to find them all when I'm ready to tackle some of
> them :)
>
> With that hefty disclaimer out of the way, here's one:
>
>       In Application.config, I ought to be able to specify a context as
>       an alias for another context. Specifically, I want the "default"
>       context to be an alias for some other context.
>
>       E.g., "default : 'alias:foo'"  or what have you.

I've implemented something similar in the experimental code I've been 
working on:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/expwebware/Webware/

I've used the concepts 'Applications' and 'VirtualDirs' rather than 
'contexts'.  The experimental code allows you to have multiple 
Applications running in the AppServer, each with its own pool of 
servlets, sessions, shared data, etc.  Applications are mapped to 
requests in the same way as 'contexts', but are different in all 
other respects.  They are more like the original 'ServletContexts' 
from J2EE, that WebKit's 'contexts' where named after.

VirtualDirs belong to Applications, are the same as 'aliases' in 
Apache.

Applications:
    ROOT:
        VirtualDirs:
            Home = '/home/WK/home'
            Products = '/home/WK/Products'
            ROOT = Home
    MyOtherApp:
            Home = '/home/WK2/home'
            Products = '/home/WK2/Products'
            ROOT = Home
# this will launch 2 applications


http://myhost.com/WK/Home/MyServlet.py
will map to the ROOT Application's 'Home' virtual dir.  So will 
http://myhost.com/WK/MyServlet.py

http://myhost.com/WK/MyOtherApp/Products/MyServlet.py will map to the 
'MyOtherApp' application's 'Products' virtual dir.  
http://myhost.com/WK/MyOtherApp/MyServlet.py will map to its 'Home' 
virtual dir.

You can also do this:
Applications:
    MyOtherApp:
            Home = '/home/WK2/home'
            Products = '/home/WK2/Products'
            ROOT = Home
    ROOT = 'MyOtherApp' # an alias 
# this will launch 1 application

Cheers,
Tavis

_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to