yeah, correct this one
-----Ursprüngliche Nachricht----- Von: r...@trialox.org [mailto:r...@trialox.org] Im Auftrag von Reto Bachmann-Gmuer Gesendet: Dienstag, 18. Januar 2011 12:56 An: clerezza-dev@incubator.apache.org Betreff: Re: Scala Page and Cookies On Tue, Jan 18, 2011 at 12:37 PM, Oliver Strässer < oliver.straes...@getunik.com> wrote: > i see your points. > > you aske about the connection between cookies and validation. I think about > using the cookies only as place to store data in a redirect (of the > validation service). > > > to give more flexibility to the developers it would be cool, that the > initial request (httpservletrequest) is available in every ssp (like the > uriInfo object). so I could read the cookies in every ssp template too and > many more informaiton (acceptlanguages for example). > > for me it isn't possible to extend the typehandler (I'm on a cms-widget of > trialox cms). > > > conclusion: > > what you think about extending the the available objects in the ssp, with > the httpservletrequest object? > > httpservletrequest is not possible as the clerezza-jaxrs implementation is not servlet based, what we could make available is javax.ws.rs.core.HttpHeaders reto > > > cheers > oli > > -----Ursprüngliche Nachricht----- > Von: r...@trialox.org [mailto:r...@trialox.org] Im Auftrag von Reto > Bachmann-Gmuer > Gesendet: Dienstag, 18. Januar 2011 11:16 > An: clerezza-dev@incubator.apache.org > Betreff: Re: Scala Page and Cookies > > before I activated some keyboard shortcut I didn't know about... > > On Tue, Jan 18, 2011 at 10:02 AM, Oliver Strässer < > oliver.straes...@getunik.com> wrote: > > > nobody an idea? > > i need the cookies to prefille my form, after I validate the form > > serverside. > > > > > > perhaps it's an architecture question of my application or a generall > > question. > > > > I'd like to save "session"-like data on a specific place, which is > conform > > with the rest approach. > > so I don't want so safe the form data in a user graph. > > > > > > so the question is: > > how you build systems like > > > > - a shop basket? (not logged in) > > > I see the following options: > - Client-side: You never actually change page, in the browser an ajax > application let you navigate through the shop but you never actually leave > the page with this application, with this you can keep variables in js > while > retrieving new content with background-requests > - Cookies: If the user is not logged in you cannot associate the data to > the > context-node (via UserContextProvider) but you can still read and set the > cookie in your root resources or typehandlers and add the contents of the > shopping basket to the returned resource > > > > - validate forms and prefille the form (not logged in) > > > - I don't see the connection between cookies and validation, validation is > ideally done both client-side and server-side. > - As for preventing the user from repeatedly entering the phone-number in > multiple forms asking for it, I see that reading cookies from ssp might be > a > more straight-forward way than adding the infromation to the > response-resource. Alternatively this values could be read from cookies > using javascript. > > > > - collect data over a few sites (a process with a few steps) (not logged > > in) > > > - Cookies can be used but there's no need to set or read them in the ssp. > Alternatively the data entered in previous steps cen be contained as hidden > form fields in the current page > > > > > - create a questionnaire or a quiz over a few sites (not logged in) > > > - Same as above > > how you save and retrieve the data in a secure way and in a rest conform > > way? > > > as long as you don't create a session on the server, but have the client > deal with data (either using cookies, hidden fields of javascript) you're > on > the RESTfull side. > > > Cheers, > reto > > > > > > > > > cheers > > oli > > > > > > > > > > -----Ursprüngliche Nachricht----- > > Von: Oliver Strässer > > Gesendet: Mittwoch, 12. Januar 2011 17:58 > > An: clerezza-dev@incubator.apache.org > > Betreff: AW: Scala Page and Cookies > > > > Hi tsuy > > > > i tried your approach today. > > I retrieve from the RequestProperties. getHttpHeaders method only a > > MultivaluedMap. > > So I havn't access to the cookies. > > > > Isn't the a way to access the javax.ws.rs.core.HttpHeaders object in ssp? > > > > > > oli > > > > > > -----Ursprüngliche Nachricht----- > > Von: Tsuyoshi Ito [mailto:tsuy....@trialox.org] > > Gesendet: Donnerstag, 23. Dezember 2010 18:08 > > An: clerezza-dev@incubator.apache.org > > Betreff: Re: Scala Page and Cookies > > > > Hi Oli > > > > There is the possibility to retrieve some of the header information > > from requestProperties (an inner class in > > org.apache.clerezza.platform.typerendering.Renderlet) > > > > e.g. you can use requestProperties.getHttpHeaders in your ssp > > > > But I haven't used it yet. So I am not sure if it is possible to set > > or read cookies - also I am not sure if this task should be done in > > ssp. > > > > Cheers > > Tsuy > > > > 2010/12/23 Oliver Strässer <oliver.straes...@getunik.com>: > > > some ideas? > > > > > > Von: Oliver Strässer > > > Gesendet: Mittwoch, 22. Dezember 2010 09:29 > > > An: clerezza-dev@incubator.apache.org > > > Betreff: Scala Page and Cookies > > > > > > Hi > > > > > > I need to write and read Cookies, while I render the scala server > page. > > > Is there a posibility to retrieve the request object and the response > > bject in scala? > > > > > > cheers > > > oli > > > > > > > > > > > > > > > --[cid:image001.png@01CBA1BA.ADAA76D0]<http://twitter.com/getunik > > >-[cid:image002.png@01CBA1BA.ADAA76D0]< > > http://www.facebook.com/pages/getunikcom/124320320041 > > >---------------------------------------------- > > > > > > --getunik ag------------------------------------------- > > > > > > oliver straesser oliver.straes...@getunik.com<mailto: > > oliver.straes...@getunik.com> > > > hardturmstrasse 101 fon: +41 (0)44 388 55 88 > > > ch-8005 zuerich fax: +41 (0)44 388 55 89 > > > > > > --aktuelles getunik projekt------------------------- > > > Agieren Sie lokal! Geo Marketing für Ihre E-Mail Kampagne: > > www.geomarketing.com<http://www.geomarketing.com/> > > > > > > --best of swiss web awards 2009------------------ > > > Gold & Silber für Connect2Earth / Bronze für WWF UK > > > > > > we make the web a better place - www.getunik.com< > http://www.getunik.com/ > > > > > > > > > > > > > > > > > > ***************************************************************** > > > P Bitte drucken Sie dieses E-Mail nur bei Bedarf aus. Die Umwelt dankt > es > > Ihnen. > > > ***************************************************************** > > > > > > > > > > > > > > -- > > --trialox ag-------------------------------------- > > > > Tsuyoshi Ito > > Binzmuehlestrasse 14 > > CH-8050 Zürich > > Tel. +41 44 635 75 77 > > URL: http://trialox.org > > >