Re: context path

"Michael Nash JGlobal.com" <[email protected]> Thu, 3 Jun 2004 16:32:54 -0400
Newsgroups gmane.comp.java.keel.user
Organization JGlobal
Message-ID <20040603163254.307895fa@jglobal>
Louis:

Further thought: It would be *very* easy (like 1 line of code easy) to add this value (the current context path) to the request attributes passed from the client, just like we do the sessionid and IPaddress of the client now. In fact, it's probably a handy thing to have.

If this would be useful, let me know I'll slap it in there.

Mike

On Thu, 3 Jun 2004 16:12:53 -0400
"Michael Nash JGlobal.com" <[email protected]> wrote:

> Louis:
> 
> By context path, you mean the current directory in which the webapp is running? There are some circumstances (e.g. running in distributed mode) where this might not be meaningful to a Keel model, so as far as I know there's no way to access it directly. There is, however, a system property (keel.config.dir) that can tell you what directory the server is running within, which you can use to determine the current directory of the Keel instance. If it's a single-VM instance (e.g. running in a webapp, which is the default), this will give you the webapp path too.
> 
> Try System.getProperty("keel.config.dir") and see if it's helpful.
> 
> Mike
> 
> On Wed, 2 Jun 2004 14:42:43 -0700
> "Louis Moore" <[email protected]> wrote:
> 
> > Hi,
> > 
> > Is there a method for getting the context path within a model, from the
> > ModelRequest object maybe? Sorry if this is a no-brainer but I can't
> > seem to find a way.
> > 
> > Thanks,
> > Lou 
> > _______________________________________________
> > User mailing list
> > [email protected]
> > http://lists.keelframework.org/listinfo.cgi/user-keelframework.org
> 
> 
> -- 
> Michael Nash
> 
> JGlobal Ltd 
> Next-Generation Web Application Development and Open Source Support
> http://www.jglobal.com
> 
> Bahamas Commerce and Trade
> Offshore eCommerce Hosting and Business Services
> http://www.bahamascommerce.com
> 
> _______________________________________________
> User mailing list
> [email protected]
> http://lists.keelframework.org/listinfo.cgi/user-keelframework.org


-- 
Michael Nash

JGlobal Ltd 
Next-Generation Web Application Development and Open Source Support
http://www.jglobal.com

Bahamas Commerce and Trade
Offshore eCommerce Hosting and Business Services
http://www.bahamascommerce.com