You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Newton <ne...@yahoo.com> on 2007/06/04 22:33:06 UTC
[OT] Re: [S2] Accessing URL encoded GET data (bug found?)
--- yitzle <yi...@users.sourceforge.net> wrote:
> "Note that all parameter values for a given name
> will be returned, so the type of the objects in the
> map is java.lang.String[]."
>
> When I try reading data from the Map and converting
> to a String, I get a casting error:
> java.lang.ClassCastException: [Ljava.lang.String;
> cannot be cast to java.lang.String
>
> I did this:
> public void setParameters (Map map)
> {
> Object m = map.get("criteria");
> message = m.toString();
> }
> then displayed the message. I get
> "[Ljava.lang.String;@e35bb7"
>
> Any clues? Bug?
You quote the documentation, which tells you
*precisely* what's happening, then you write code that
does something differently, and are suprised when you
get an exception verifying what the documentation you
quoted states.
> Note that all parameter values for a given name
> will be returned, so the type of the objects in
> the map is java.lang.String[].
Why would you not use a String[] as the type of
variable you're retrieving from the map when the
documentation states that the type of the objects in
the map is String[]?
d.
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] Re: [S2] Accessing URL encoded GET data (bug found?)
Posted by yitzle <yi...@users.sourceforge.net>.
That's why I prefer Perl ;)
On 6/4/07, Christopher Schultz <ch...@christopherschultz.net> wrote:
> That depends on your perspective:
>
> if("10" != 10)
>
> doesn't even compile. Some people would say that makes Java broken. :(
>
> - -chris
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [double OT] Re: [S2] Accessing URL encoded GET data (bug found?)
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Animesh,
animesh.saxena@wipro.com wrote:
Christopher Schultz wrote:
>> That depends on your perspective:
>>
>> if("10" != 10)
>>
>> doesn't even compile. Some people would say that makes Java broken. :(
>
> hahahaha....
> ....................
> Apply the same concept to windows operating system, and i guess the
> true answer wil be fundamentally broken OS.
Huh? I'm a linux fanboy myself, but I must be missing something.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGZIdV9CaO5/Lv0PARArGyAJ9rCusNRTky6wBTwrP7M6Guy7XCMQCgml1t
P/P0jxmr0HYJVSRrhA0sKEs=
=IXik
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: [OT] Re: [S2] Accessing URL encoded GET data (bug found?)
Posted by an...@wipro.com.
hahahaha....
....................
Apply the same concept to windows operating system, and i guess the true answer wil be fundamentally broken OS.
Animesh
http://inlovewithlinux.blogspot.com
________________________________
From: Christopher Schultz [mailto:chris@christopherschultz.net]
Sent: Tue 6/5/2007 3:02 AM
To: Struts Users Mailing List
Subject: Re: [OT] Re: [S2] Accessing URL encoded GET data (bug found?)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dave,
Dave Newton wrote:
> --- yitzle <yi...@users.sourceforge.net> wrote:
>> I appreciate you taking the time to point out my
>> obvious mistakes.
>
> They're only obvious *after* you see them!
>
> I spent 10 minutes wondering why:
>
> if ("bar" == foo)
>
> didn't work. Turns out Java's fundamentally broken.
That depends on your perspective:
if("10" != 10)
doesn't even compile. Some people would say that makes Java broken. :(
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org <http://enigmail.mozdev.org/>
iD8DBQFGZITv9CaO5/Lv0PARAlz9AJ9SbDcaux4henjM6z1Ws7LXkrFzuQCgvDwW
NwPkmyHd60tcU7yvnZLXGig=
=a5Ka
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] Re: [S2] Accessing URL encoded GET data (bug found?)
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Dave,
Dave Newton wrote:
> --- yitzle <yi...@users.sourceforge.net> wrote:
>> I appreciate you taking the time to point out my
>> obvious mistakes.
>
> They're only obvious *after* you see them!
>
> I spent 10 minutes wondering why:
>
> if ("bar" == foo)
>
> didn't work. Turns out Java's fundamentally broken.
That depends on your perspective:
if("10" != 10)
doesn't even compile. Some people would say that makes Java broken. :(
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGZITv9CaO5/Lv0PARAlz9AJ9SbDcaux4henjM6z1Ws7LXkrFzuQCgvDwW
NwPkmyHd60tcU7yvnZLXGig=
=a5Ka
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] Re: [S2] Accessing URL encoded GET data (bug found?)
Posted by Dave Newton <ne...@yahoo.com>.
--- yitzle <yi...@users.sourceforge.net> wrote:
> I appreciate you taking the time to point out my
> obvious mistakes.
They're only obvious *after* you see them!
I spent 10 minutes wondering why:
if ("bar" == foo)
didn't work. Turns out Java's fundamentally broken.
d.
____________________________________________________________________________________
Get the Yahoo! toolbar and be alerted to new email wherever you're surfing.
http://new.toolbar.yahoo.com/toolbar/features/mail/index.php
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] Re: [S2] Accessing URL encoded GET data (bug found?)
Posted by yitzle <yi...@users.sourceforge.net>.
All working.
I've been doing well at making a perfect fool of myself...
I appreciate you taking the time to point out my obvious mistakes.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org