You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Huy Banh <hu...@yahoo.com> on 2002/12/31 08:57:56 UTC
where can i download struts-example about using tokens
Hi all,
Im a new Struts, can anyone tell me where i can download Struts-Example
about using token for testing.
Thanks alot,
Huy
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
LabelValueBean example
Posted by "Sterin, Ilya" <Is...@ciber.com>.
Can someone provide me a simple example of utilizing the LabelValueBean
class with <html:multibox>, the example provided on husted.com and in Struts
in Action book, doesn't utilize it, though states that you can. I just need
a small guidance on how to utilize it with <html:multibox>
Thanks.
Ilya
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: where can i download struts-example about using tokens
Posted by James Mitchell <jm...@apache.org>.
It is used in the struts-example.war that ships with the binary distribution
or you can build your own from the source.
If you want to go straight to an example of using tokens, when you deploy
the struts-example.war file open your browser and:
1. Log in to the example
(the username and password are stored in the
database.xml file under /struts-example/WEB-INF/)
2. Go to [Edit your user registration profile]
( At this point you will be at the "Current Subscriptions" screen )
3. Open a new browser, using the same session
(Ctrl + n for IE, copy paste url in new tab for Mozilla,
NN, Phoenix)
4. Now, in the first browser (or tab), [Add] a new subscription
(you will be taken back to the "Current Subscriptions" screen
if you filled in the fields correctly)
5. Use the second browser (or tab) to [Add] another subscription
6. Go back to the first browser and click on the Save button
Considering the way the example was designed, throughout the
workflow of this application, nothing is written to disk until
you save from this spot (that's why its a memory database).
So, from here we are trying to submit a form which happens to
have an old token (the current one is within browser #2 form).
When you submit this page, you should see:
Validation Error
You must correct the following error(s) before proceeding:
* Cannot submit this form out of order
If you see that message, you have just tested that validation by token
is working properly.
Now that you know the url's, you can trace into the code (by finding
the mappings in the struts-config.xml) and really see what's happening.
Good Luck with it!!!
--
James Mitchell
Software Engineer/Open Source Evangelist
http://www.open-tools.org
"C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg."
- Bjarne Stroustrup
----- Original Message -----
From: "Huy Banh" <hu...@yahoo.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, December 31, 2002 2:57 AM
Subject: where can i download struts-example about using tokens
> Hi all,
>
> Im a new Struts, can anyone tell me where i can download Struts-Example
> about using token for testing.
>
> Thanks alot,
> Huy
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>