Thanks to everyone who answered my plea for help. The .equals and the
.equalsIgnoresCase were very helpful suggestions solving a number of problems.
The strange approach, coming from a Perl standpoint (and if you've written Per,
Perl can't be considered normal), to radio buttons was confusing. I now
understand what is occurring with the radio buttons and their values. I have
been away from Java for a number of months and this was my first time to write a
servlet so some things are different and rusty. One thing Java could use is a
good regular expression capability, but Javascript or calling a Perl script from
a servlet will probably work just as well, maybe not as pretty but work
nonetheless.
Thanks again.
Ted Neward wrote:
> Peter--
>
> You're beating your head against a *Java* problem, not a servlet one. In
> particular, you're confusing the "==" operator's role.
>
> Within Java, "==" compares two *references* to determine whether or not
> they point to the same object. That is, given
>
> String s = new String("This is a test");
> String t = new String("This is a test");
>
> s==t will always return false, even though the *contents* of these two
> String objects are identical. What you want, instead, is
>
> s.equals(t)
>
> which will, given the above declarations, always return true.
>
> I recognize you're comfortable with Perl, and that it must be frustrating
> to beat your head against issues like this, but I strongly suggest you
> pick up a good Java language book before you dive deeply into servlets.
> Just as you can't write good Perl scripts without knowing the Perl
> language, you can't write good servlets without knowing the Java language.
>
> <SHAMELESS PLUG>
> Alternatively, DevelopMentor (the folks I teach for) has a *very* good
> Java course, "Essential Java". They have campuses in Boston, Portland and
> Torrance (Southern California), as well as London, and hold
> open-enrollment classes there about once a month or so. Might see about
> getting the boss to cover one for you.
> </SHAMELESS PLUG>
>
> Ted Neward
> http://www.javageeks.com/~tneward
>
>
--
Peter Tierney
[EMAIL PROTECTED]
http://www.mckenzie-int.com
The very wise person, when
wishing to elevate people,
Places their position below others.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html