Thanks a lot for such fast answers. Julia -----Mensaje original----- De: sbpodila [mailto:[EMAIL PROTECTED]] Enviado el: jueves, 18 de abril de 2002 14:04 Para: [EMAIL PROTECTED] Asunto: Re: Question about page parameters type. String?
hi, check like this it will work if(color.equals("red") regards Sasi. ----- Original Message ----- From: "Villén Pizarro, Julia" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 18, 2002 5:22 PM Subject: Question about page parameters type. String? Hi all! I call my_page.jsp this way http://my_server/my_page.jsp?color=red Then I retrieve the value of the parameter "color" and then try to match it, in the following way: <% String color; color=request.getParameter("color") if (color=="red") { whatever1 } else {whatever2} %> The answer is whatever2. I made sure the page is getting the parameter right by writing it out. The question is if I have to do any kind of casting. Thaks in advance, Julia ========================= To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com ==========================================================================To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com