• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Setting a parameter in redirect URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting a parameter in redirect URL


  • Subject: Setting a parameter in redirect URL
  • From: Jeff Schmitz <email@hidden>
  • Date: Tue, 31 Jul 2007 10:28:17 -0500

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 = "">
"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 "&amp;" 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 &amp; 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      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Setting a parameter in redirect URL
      • From: Zak Burke <email@hidden>
References: 
 >takeValueFromRequest phase (From: Lachlan Deck <email@hidden>)

  • Prev by Date: Re: WODisplayGroup and checkboxes [solved]
  • Next by Date: Re: Java.lang.IllegalStateException: _obtainOpenChannel
  • Previous by thread: Re: takeValueFromRequest phase
  • Next by thread: Re: Setting a parameter in redirect URL
  • Index(es):
    • Date
    • Thread