TRY
String X=request.getParameter("collection");
If(X.compareTo("yoiurstring")==0) ecc...



Regards
Rinaldo

-----Messaggio originale-----
Da: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]] Per conto di
Lance Prais
Inviato: sabato 22 giugno 2002 5.12
A: [EMAIL PROTECTED]
Oggetto: If..else issue


I am through confused to as one the following if statement is not
working: Could someone please look at it and let me know what I am doing
wrong.  As
you can see it is very simple.   You will se the output below the code
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="java.net.*" %>

<%
        String Collection="";
        Collection = request.getParameter("collection");
%>
<%=Collection%>

                <%
if (request.getParameter("collection")=="scopus")
                {%>
You
                <%}
                else if (Collection=="securetrak")
                {%>
me
                <%}
                 else
                {%>
they
                <%}%>


OUTPUT:
scopus they

As you can see it is recognizing the "Collection "  but  ignoring the
Statement.

Thank you in advance

________________________________________________________________________
___
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

___________________________________________________________________________
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

Reply via email to