self.request().serverSidePath()
If you inherit from WebKit.Page ... this will give you the Server Side
Path of the servlet you're currently in. A little pythonic-string magic,
and voila you can get what you need.
samples :
self.curPath = self.request().serverSidePath()
self.curPage = self.curPath[ self.curPath.rindex( '/' )+1 : ].split( '.'
)[0] #Gets the filename, sans extension ( drops the '.py' ).
self.curPath = self.curPath[ : self.curPath.rindex( '/' ) ]+'/' #This
creates something of the order "/blah/blah/xxx/" Strips off the
filename.
Ray
> Hi!
>
> Can I, from inside a Webware servlet (inherited from WebKit.Page) find
> out the server-side path of either the workdir or the context the
> servlet is running from?
>
> I'd like to do this in order to find the configuration files I use, in a
> non-sitespecific way.
>
> \EF
> --
> Erik Forsberg http://www.lysator.liu.se/~forsberg/
> GPG/PGP Key: 1024D/0BAC89D9
>
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Webware-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
--
Spam blocking address
eSystems Solutions, Inc.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss