One more thing on this.  I have it working so that my URL looks like this:

/sa/app/reset/1/4xYD6JctlSPwU23eN%2Fm1isA5Cf8%3D/0/tauren

The "key" is the PageParameter #1.  I'm encoding a value using Base64,
which appears to include slashes, =, etc.  When this string is used in
a browser, the value is URLdecoded and ends up with an extra slash,
which messes everything up:

ERROR RequestCycle - URL fragment has unmatched key/value pair:
1/4xYD6JctlSPwU23eN/m1isA5Cf8=/0/tauren

Is there a built-in way in Wicket to url-encode the string again,
making it doubly encoded?  Or is there a different solution?  Perhaps
using something besides Base64, but I don't know what would be good to
use.

Thanks,
Tauren



On 4/30/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
> Igor,
>
> Thanks so much!
>
> Tauren
>
>
> On 4/30/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
> > class resetpage extends webpage {
> >  public resetpage(pageparameters params) {
> >        string key=params.get(0);
> >        ...
> >   }
> >
> >   public static urlfor(string key) {
> >        pageparameters params=new pageparameters();
> >        params.put("0", key);
> >        return requestcycle.get().urlfor(resetpage.class, params);
> >    }
> > }
> >
> > app.init() {
> >   mount("/reset", new indexedurlcodingstrategy(resetpage.class));
> > }
> >
> > resetpage.urlfor(key) should return something like /context/reset/yourkey
> > and you can email that to the user
> >
> > -igor
> >
> >
> >
> > On 4/30/07, Tauren Mills <[EMAIL PROTECTED]> wrote:
> > >
> > > I'm considering different ways to implement a "Forgot Password"
> > > feature.  I normally see it done one of two ways.
> > >
> > > 1.  On registration, get a Question and Answer from user.  Ask them
> > > this question when they forget their password.  On correct answer, let
> > > them change password.  I don't have any questions on implementing this
> > > method.
> > >
> > > 2.  When password is forgotten, they put in their email address.  A
> > > confirmation email is sent to user and they must click onto a link.
> > > On the response page, they can change their password.
> > >
> > > My preference is to implement #2. But I'm unclear on how to create a
> > > "confirmation link" and a page to read it.  I'd need to add a unique
> > > key of some sort to a URL.  That URL can't be session specific.
> > >
> > > Any suggestions on how to format this confirmation URL and what would
> > > need to go into the page's java to read the key from the URL?
> > >
> > > Thanks!
> > > Tauren
> > >
> > >
> > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > _______________________________________________
> > > Wicket-user mailing list
> > > Wicket-user@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to