Die Weihnachtszeit rückt unhaltbar näher. Bei Aldi gibt es seit langem schon wieder Dominosteine, Lebkuchen usw.
Auf der ständigen suche nach einer Verknüpfung zwischen der Windowsanmeldung und dem WISE Login hat Gorden einen Lösungsweg mit mod sspi für den Apache eingeschlagen.
Dafür benötigt er noch etwas Hintergrund zum setzen und auslesen von Cookies in DTML
Hier stehen einige meiner ungefilterten Rechercheergebnisse zum Thema. die aufzählung wird ständig erweitert…..
Hier die Info aus den ZOPE Labs:
Using Cookies with ZopeSubmitted by: grifter |
|
||
Description: (Note: This is not my material. My footnote says it was |
|||
Source (Text): Set cookie: <dtml-call "RESPONSE.setCookie('favorite_language', 'Python', expires='Wed, 19 Feb 2020 14:28:00 GMT')"> Read cookie: <dtml-if "REQUEST.has_key('favorite_language')"> <dtml-var favorite_language> </dtml-if> |
|||
Explanation: Say you want to set a cookie that stores the name of your favorite <dtml-call “RESPONSE.setCookie(‘favorite_language’, ‘Python’, expires=’Wed, 19 Feb 2020 14:28:00 GMT’)”> Note:The expiration date can be any date you want but if you do not set one the cookie will expire when the browser is shutdown. Now, if you wanted to get it back you need to check for it and call <dtml-if “REQUEST.has_key(‘favorite_language’)”> Example Two Now you want to store some user name and email address (like I do <dtml-call “RESPONSE.setCookie(‘user_name’, user_name, expires=’Wed, 19 Feb 2020 14:28:00 GMT’)”> <dtml-call “RESPONSE.setCookie(’email_address’, email_address, expires=’Wed, 19 Feb 2020 14:28:00 GMT’)”> Note: notice that the second email_address, the actually zope Now in ZUBB I want to check for the cookie (user name/email address) Tips for Working with and Testing Cookies Find your cookie file and get ready to open it (you might have to Keep two different browsers open (IE, Netscape), leave one as the Set the test browser to “warn before accepting cookies” (or Be ready to shutdown and reboot your brower every five seconds. You can create a DTML Method called “cookies” or some such thing |
1. Formular zum Cookie setzen
<FORM NAME=”formular” METHOD=”POST” ACTION=”report”><P>
Name: <INPUT TYPE=”TEXT” NAME=”qkey” SIZE=30 MAXLENGTH=30><BR>
Value: <INPUT TYPE=”TEXT” NAME=”qvalue” SIZE=30 MAXLENGTH=30><BR>
<INPUT TYPE=”submit” VALUE=”Submit”>
</Form>
2. Formular auswerten Cookie setzen
<p>
Das Cokie ist plaziert !!!
<dtml-call “RESPONSE.setCookie(_[‘qkey’],_[‘qvalue’],
expires=’Wed, 19 Feb 2020 14:26:00 GMT’)”>
</p>
3. Cookie lesen
<p>
das Cokie heisst:<BR>
<dtml-in expr=”REQUEST.cookies.keys()”>
<dtml-var sequence-item> –> <dtml-var expr=”REQUEST.cookies.get(_[‘sequence-item’])”><br>
</dtml-in>
</p>
Beispiele sagen mehr als tausend worte…..
Mickey