Re: Need some help with generateToken
I've got a question here. When you say somewhere in the Action, which action do you refer to ? The action that catches the form, or the action that forwards control to the form ? Thanks Jefferson Ted Husted wrote: Not much to it really. Before forwarding to the form that needs to be part of the transaction, just call saveToken(request); somewhere in the Action. If the form the Action forwards to uses the Struts html:form tag, it will write out the token for you as a hidden field, so there's nothing new to do. On the Action that catches the form, call isTokenValid(request); If the token is not valid, branch to an error page. Otherwise, call resetToken(). If another copy of the form tries to submit it again, now isTokenValid() will return false. The token is a random number that gets stored in the user's session. A second copy is suppose to be stored in the request. If the session and request tokens are missing or is different, then the transaction is out of synch. saveToken() puts it into the request. The Struts tags write it out as a hidden field or parameter. resetToken() clears it from the request. Loop closed. The Core J2EE Patterns book covers this and a ton of other handy strategies and patterns. Highly recommended. See the Struts Resource page for a link. -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services Daniel Jaffa wrote: Ok, I have searched around and have not found much info on the following classes isTokenValid, saveToken, generateToken I Think that i could use these classes to help prevent some on from hitting the back button issues. My question is has anybody used these and if so, could u provided me an example. (I saw an answer from Ted, where he explained it a little but i did not see any example code) Thank You daniel Jaffa -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
more than one click in submit button
I'm developing an application, and I found an error, which is: I have a JSP page with a form, and if the user clicks in the submit button twice (one click immediatly after the first one) the Action is executed twice. What's the best practice to treat this behavior ? I mean, only one action should be executed. How do I handle this ? Thanks a lot Jefferson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
who do I make my app secure ?
Hi guys, I have a question. I have an application which has a login page. Once the user puts this login and password and click submit, the data is transfered to FormBean. My question is how can I make this data secure ? I mean, the data goes opened through the net. How can I encrypt it ? thanks Jefferson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: who do I make my app secure ?
Could you tell me where I can get some example of how to implement it ? Thanks in advance Jefferson James Mitchell wrote: SSL (Secured Socket Layer) JM -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jefferson Rodrigues de Oliveira e Silva Sent: Tuesday, May 07, 2002 2:47 AM To: 'Struts Users Mailing List' Subject: who do I make my app secure ? Hi guys, I have a question. I have an application which has a login page. Once the user puts this login and password and click submit, the data is transfered to FormBean. My question is how can I make this data secure ? I mean, the data goes opened through the net. How can I encrypt it ? thanks Jefferson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
changing menu option in JSP
Hi guys, I have the following situation: when the user enters the site, there is a menu page (JSP) which displays some menu options. After logging, the login menu option is not displayed anymore, and a logoff option has to be displayed. What's the best way to do that ? Thanks in advance Jefferson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
off topic - ARGO UML - URGENT
Sorry about this question, but I really need some help here. How can I make a constructor using ARGO UML ? If I just add a method with the same name as the class, the tool puts a void ?? ClassName() How can I take the void ?? out ? Thanks Jefferson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
site hosting
Hi guys, A friend of mine and I are developing a new application using struts, but not for any company, just for ourselves. We are looking for some site hosting service, free ones. Does anybody here know about that ? Is there anyone here that has already done that ? Thanks a lot Jefferson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: New Site
Yes, it took some time to come up totally! Jefferson Galbreath, Mark wrote: This is not very encouraging. At 6:30 AM EST on a T-1 I finally gave up when the page had not fully loaded after 3 minutes(!!). My personal experience with Struts (we are committed to it at this point for VoiceStream Global Wireless's new ecommerce sites) is that it slows processing and page deleivery considerably. Anyone else notice this? Mark -Original Message- From: Martin Samm [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 09, 2002 8:27 AM To: [EMAIL PROTECTED] Subject: New Site Just thought i'd another 'Powered By Struts' site to the list - www.peoplenews.com. Its a showbiz / gossip site which until recently ran on Vignette (yuk) . While the content may not be to everyone's taste, it is popular, about 19M hits last month. It's been running for 2 days, so may have a couple of teething problems, but it does seem to have scaled well. -- Martin Samm [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
set form int field
Hi guys, I'm having a problem with a bean int field. When the user clickes in the form, the cursor goes to the end of the text field. Then it types the value (let's say 3) and click in the submit button. What is happening is that the value (3) does not go to the bean field, instead, the bean field gets a 0. How can I do a trim in the form before the set is applied to the bean field ? Thanks in advance Jefferson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
nested:image
Hi guys, I have a new problem. I'm using a nested:iterate, and one bean attribute is a key to an image in my properties file. public class TeamBean { private String team = team.brazil ... } in the properties file I have the following entries team.brazil=Brazil team.brazil.flag=brazil.gif Now I need to insert the team name and its flag gif inside the nested:iterate Does anybody know how do I do that ? Thanks in advance Jefferson -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: bean tags
it comes from the Resources file. Take a look in your file.properties, mainMenu.registration should be there. K J wrote: in: bean:message key=mainMenu.registration/ where does the value of registration(mainMenue.registration) come from? can someone explain to me how this works? also, does anyone know of any good on-line tutorials on using tag libraries, other than the ones on Strut' site? many thanks! __ Do You Yahoo!? Yahoo! Tax Center - online filing with TurboTax http://http://taxes.yahoo.com/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problem with arraylist and iterate
Hi all, I have the following problem: I have a bean User which has a hashtable attribute bets. The getBets method returns a Bet[] array. The Bet class has 6 attributes. In the bets.jsp page, I show in a table all the values from the Bet objects (using iterate), one row for each object, and two of these values from each object the user is able to edit. The bets.jsp page is ok, all the values are being displayed, and the user can edit the two fields for each row. My problem is when the user submit this bets.jsp. How can I get all the fields (two for each table row) in a Form bean ? I want that the FormBean to handle the submit is the BetsForm ? I implemented the BetsForm with a single attribute, an ArrayList called bets. How should I implement this BetsForm bean ? How can it receive all the fields from the bets.jsp page in the arraylist attribute ? Thanks in advance Jefferson