Forums Register Login

Request Parameters

+Pie Number of slices to send: Send
Hi
does anyone have a problem working with request parameters. My servlet has an If construction based around the value of a request parameter. I see the value of this parameter in the URL and I display it on the page but when i compare it to this value, i don't get a match. Is there a simple solution to this?
thanks
frank
+Pie Number of slices to send: Send
Are you using '==' for the comparison? Make sure you are using "equals()", or "equalsIgnoreCase()". If this is not the problem, can you put a small code-snippet of where you read and use the parameters here.
+Pie Number of slices to send: Send
Thanks Frank
That solved my problem. I just reread page 100 of Just Java 1.2; it says "Failing to use 'equals()' to compare two strings is probably the most common single mistake made by Java novices." this java novice won't make this mistake again
frank
+Pie Number of slices to send: Send
AMEN!
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 556 times.
Similar Threads
request paramter problem
getting element value not attribute value
jsp:param more deatils needed
search from list.
How do I add request attributes from my spring controller?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:53:31.