Le lundi 22 juin 2009 à 11:22 +0200, Joachim Jaeckel a écrit : > Hello, > > I'm currently have 2 ideas and ... no idea, how to handle it... > > 1.) I would like to save a database connection into the session. How > that would be done is known, but I want to close the connection in the > case, the session is closed. Does someone know, which method should be > overwritten in this case?
You should probably subclass Iliad.Session, then use it in the SessionManager: Iliad.SessionManager sessionClass: MySession Then in your session subclass, you can add your code in the #expire method. > > 2.) I want to display an image (picture) to the user, only in the case, > the user is logged in. And this image is - for security reasons - not > accessible through a normal http-get. It is saved in another path. To > achieve this, I think I need access to the session, which means for me, > I need a class, subclassed from Widget (e.g.). But I currently have no > idea, how to stream the image-content than to the user... > Unfortunately, there is currently no easy way to do that if your image isn't in the Public directory. You can have a look at Core/RequestHandlers/FileHandler.st, but I'll try to provide a better answer soon. Cheers! Nico
signature.asc
Description: Ceci est une partie de message numériquement signée
_______________________________________________ help-smalltalk mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-smalltalk
