Re: Struts Token help

2007-12-21 Thread Alberto A. Flores
Assuming you are referring to Struts 1.x, when you work with tokens the servlet will ensure that your response will have a hidden token everytime your action finishes execution. It does this so that it knows what to expect and control multiple logins. Once it's compared (1 and only once), the s

Re: struts token

2006-05-22 Thread Lixin Chu
i think the hidden field is automatically created if you use html:form tag.

Re: struts token

2006-05-19 Thread Michael Jouravlev
Search for renderToken() in FormTag.java: http://svn.apache.org/viewvc/struts/action/trunk/taglib/src/main/java/org/apache/struts/taglib/html/FormTag.java?view=markup Michael. On 5/19/06, temp temp <[EMAIL PROTECTED]> wrote: What hidden field should I use in jsp to pass the generated token to

Re: struts token

2006-05-19 Thread temp temp
What hidden field should I use in jsp to pass the generated token to next action class? Thanks & Regards Manfred Wolff <[EMAIL PROTECTED]> wrote: Hi mr. temp.temp 1. The Action calls saveToken(request); 2. A unique token will be generated and saved in the session and in the jsp as a hidden

Re: struts token

2006-05-19 Thread Manfred Wolff
Hi mr. temp.temp 1. The Action calls saveToken(request); 2. A unique token will be generated and saved in the session and in the jsp as a hidden field. 3. The next action calls |*isTokenValid

Re: struts token

2006-05-19 Thread temp temp
Can you tell me how can I use struts token mechanisim with out a form bean? Thanks & Regards Manfred Wolff <[EMAIL PROTECTED]> wrote: Yes, you can. The token will be stored in the request. temp temp wrote: > Can I use struts token mechanism for an action without a form bean ? >

Re: struts token

2006-05-18 Thread Manfred Wolff
Yes, you can. The token will be stored in the request. temp temp wrote: > Can I use struts token mechanism for an action without a form bean ? > Thanks & Regards > > > > - > Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculou

Re: Struts token doesn't work problem

2005-01-21 Thread Will Stranathan
Just include a hidden element with the token name and value. Like: You'll have to look in the session to get the token value. I *think* the session key this is under is org.apache.struts.action.TOKEN (looking at the javadoc for that). w On Fri, 21 Jan 2005 09:21:44 +0800 Anthony Hong <[EMAI

Re: Struts token doesn't work problem

2005-01-20 Thread Anthony Hong
Actually I use xslt to do as my view. So I couldn't use struts tags at all. Is there any other mechanism that I could use to control double click? I have to simulate struts's token action? -- Anthony Hong - To unsubscribe, e-ma

Re: struts token to prevent duplicate submission

2005-01-20 Thread Hubert Rabago
>From http://www.husted.com/struts/catalog.html -- Use the Action Token methods to prevent duplicate submits There are methods built into the Struts action to generate one-use tokens. A token is placed in the session when a form is populated and also into the HTML form as a hid

Re: Struts token doesn't work problem

2005-01-20 Thread Jim Barrows
On Thu, 20 Jan 2005 09:54:00 -0500, Jeff Beal <[EMAIL PROTECTED]> wrote: > Look at the source for the tag and see how it inserts the > token. The token is just a session-scoped attribute and it's inserted > on the page as a hidden form field. You can probably write it to the > page easily withou

Re: Struts token doesn't work problem

2005-01-20 Thread Jeff Beal
Look at the source for the tag and see how it inserts the token. The token is just a session-scoped attribute and it's inserted on the page as a hidden form field. You can probably write it to the page easily without using the tag. -- Jeff Anthony Hong wrote: I think my problem is I didn't

Re: Struts token doesn't work problem

2005-01-20 Thread Anthony Hong
I think my problem is I didn't use html:form struts tag, I use form tag in html directly. So it didn't work. Thanks. -- Anthony Hong - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Struts token doesn't work problem

2005-01-20 Thread Will Stranathan
You have to do a couple of things: 1) While preparing the form, call generateToken(request); 2) Make sure you use the html:form tag - otherwise the token won't get put on the page. 3) When the user submits, do two things 3a) Check isTokenValid(request) - if it is, contiue, if not, warn the user.