Hello,

I'm doing a simple redirect to a DirectAction and want to add a couple parameters to the URL. I do this with the following code:

  public WORedirect login() {
        NSMutableDictionary dict = new NSMutableDictionary();
        dict.takeValueForKey(username, "NICK");
    dict.takeValueForKey(userID, "USER");
    String url = context().directActionURLForActionNamed(
                                        "login", dict );
    WORedirect redirect = new WORedirect(context());
    redirect.setUrl(url);
    return redirect;    
}

However, when I pick up the parameters on the other side, there is a stray "&" being added before the NICK parameter. Just wondering why? Here's the code for picking up the parameters and printing out their values:

                NSDictionary formVals = this.request().formValues();
                System.out.println("login Hyperlink values: " +
                                   formVals);
System.out.println("login cookie values: " + this.request ().cookieValues().toString());
                UserInfoWindow page = (UserInfoWindow) 
pageWithName("UserInfoWindow");
                String username = (String) formVals.valueForKey("NICK");

When I print the dictionary out it shows:

login Hyperlink values: {amp;NICK = ("FireBreathers"); USER = ("1004"); amp;wosid = ("a1snzyY9gzOgLCObCkS5kg"); }

When I try to retrieve the NICK value, I get a null returned. Retrieving the USER value works fine.

Any ideas? I'm guessing it has to do with the extra & value, but I'm not sure how to get rid of it.

Thanks,
Jeff
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to