It's Java101, not JSP at all!!! You are comparing 2 objects instead of
comparing to content.
Use key.equals( "AT" ) and not the == and start to look at the
documentation.
Frédérik Delacourt
-----------------------
"A mind once stretched by a new idea never regains its original
dimension." --Oliver Wendell Holmes
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Aaron Prohaska
Sent: Thursday, September 07, 2000 1:40 PM
To: [EMAIL PROTECTED]
Subject: Problem with if statement
I am trying to do something based on if key is equal to "AT", but I am not
getting any results. It acts as if key is not equal to "AT", but I can use
out.println(key) get "AT". Does anyone know why this might not be working?
if (key == "AT") {
..do something...
}
thanks,
Aaron
<<:::..:::...::: Aaron Prohaska :::..:::...:::>>
VerdeSoft Internet Services
mailto:[EMAIL PROTECTED] http://www.verdesoft.net/
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets