Hi,
1) You can use @Validate(encrypted=true) in your first action bean to encrypt
user.id and user.email fields. You can also use a suctom formatter and
converter to use your secret code mechanism.
If you user UrlBinding("/somelink.action/{user.id}/{user.email}"), it will hide
the parameter names.
2) If you do a redirect using RedirectResolution, you can flash (using
FlashScope) the user id and email so it will be available as a request
attribute when the second action bean is called. You can use the session too,
but you may need to clean it afterwards.
3) To validate an email, use
@Validate(converter=net.sourceforge.stripes.validation.EmailTypeConverter.class).
I think you will need mail.jar in your classpath to use EmailTypeConverter.
Christian
________________________________
From: azizi yazit [mailto:[email protected]]
Sent: Tuesday, March 31, 2009 12:42 AM
To: Stripes Users List
Subject: Re: [Stripes-users] Newbie Email Verification Questions
Hi Laura,
If u want to use any value from other jsp, I have two opinion..
first if u using ForwardResolution to other jsp, it will automatically give the
value in stripes tags that call it.
Second, why dont u use Session..stored the value to session.
Fyi, I am newbie too. However in my previous project I use the example above.
Stripes Admirer,
Azizi Yazit
On Mon, Mar 30, 2009 at 10:57 PM, AK
<[email protected]<mailto:[email protected]>> wrote:
Laura Ferguson <allend...@...> writes:
> Note: I am a desktop application developer trying to learn web development --
> so any help with these questions would be really appreciated. Many thanks!!
>
> I am working on email verification and I was trying to determine the best
> approach to the following problems, using stripes, jsp's, ActionBeans and
> hibernate.
>
> I've created a secret code mechanism using an md5hex, and I have two
> ActionBeans and jsp's (one for registration and one for verification).
>
> 1) How do I construct a link that will give me the users id and email address
> so that I can automatically verify them when they click that link?
>
> 2) How do I pass the users id and email address from one ActionBean jsp pair
> (the registration page) to the second ActionBean jsp pair (the verification
> page)? The page needs to be accessible after the session is over -- so I'm
> thinking that I should be embedding the users id and email address in the
link
Hi Laura -- I was thinking of developing a similar solution for an app I'm
developing.
I'm a newbe too, BTW, so please don't take the answers below as gospel.
For question #1, above, you should just be able to make a call to your action
bean passing in the id and e-mail as parameters. As long as your action has
get methods for those, it'll strip those out of the request and you should be
able to "act" on them within your logic.
Not sure I follow question #2. Isn't the user going to register and then get
an e-mail? If so, the link to the action (in the e-mail) should take the user
to the verification JSP that that action will direct the user to.
------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[email protected]<mailto:[email protected]>
https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------------
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users