With respect to your second question, the appserver not restarting, if
you are on linux then all you have to do is set autorestart to true, if
you are on windows you are out of luck, the autorestart does not work
with the appserver started as a service, however if you start it as a
consul window then it works just fine.  I am on Windows and so I usually
have the appserver running as a service, but if I am going through a
development phase I turn off the service and run the appserver as a
window with autorestart set to true.  This works for me (I know you
should not have a production server used as a development machine, I
server some non essential pages off of my development machine so if it
goes done it doesn't matter, but you do have to restart the server on
the main production machine from time to time doing it this way.  Oh
well nothings perfect).  

With respect to your first question why not just make a context which is
outside of your apache scope, in this way you could simply call it with
self.forward(secretcontext/file.psp).  Mind you if someone finds out
what your secret context is they may still be able to get to if via
http://host/WK/secretcontext/file.psp so you may want to add some code
which checks for the presents of a parent like:
if self.request().parent():
        Your code goes here
else:
        self.write("error you can't see this page")

Jose

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Randall Smith
Sent: Sunday, June 15, 2003 2:21 PM
To: [EMAIL PROTECTED]
Subject: [Webware-discuss] file placement


Below is my directory structure for my webware application.

+ webware_dir
|- 404Text.txt
|- AppServer
|- Launch.py
|- WebKit.cgi
|- address.txt
|- appserverpid.txt
|-+ Cache/
|-+ Configs/
|-+ ErrorMsgs/
|-+ Logs/
|-+ Sessions/
|-+ lib/
|  |- SitePage.py
|  |- db.py
|  |- quickSearch.py
|-+ MyContext/
|  |- Index.py
|  |-+ views/
|  |  |- main.psp
|  |  |- quickSearch.psp
|  |  |- quickSearch.py

The files in the 'views' folder are not accessed directly.  The servlet 
Index.py decides which view should be shown and forwards 
[self.forward('views/quickSearch.psp')] the transaction object to the 
view(main.psp or quickSearch.psp).  What I don't like about this is that

the files under the views folder could be accessed directly.  If a user 
typed http://site.domain/servlet/views/quickSearch.psp , s/he would be 
accessing the view directly, which I don't want.  Where can I put my 
views so that they can't be accessed directly?  Should I do this in 
apache, making the views/ directory inaccessible?  They need to be in a 
directory where I can update the psp and then refresh the page in a 
browser and see the results without having to restart the app server, 
which brings me to another subject.

The files in the lib/ directory are used by my servlets.  When I make a 
change to a file in the lib directory, or any imported module for that 
matter, I have to restart the appserver to see the changes.  Is there a 
way around this (besides oneshot)?

Also, any comments on my directory structure are welcome.  I'm trying to

separate core logic and view logic, leaving my psp's editable by someone

who is python clueless and making my corelogic usable by other 
front-ends (possibly a webservice or widget app).

Randall



-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Webware-discuss mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss





-------------------------------------------------------
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to