See further info on string comparison http://leepoint.net/notes-java/data/expressions/22compareobjects.html http://download.oracle.com/javase/1.4.2/docs/api/java/lang/String.html
This format is preferred - equals or compareTo; e.g., <% if(sSAPNo.equals("01199")){ %> <a href="Temp.html">Administrator</a></span></p> <% } %> On 9/16/2010 8:22 PM, Ramesh K wrote: > Hi Nelson, > Try like this > <% > if(sSAPNo = "01199"){ > %> > > <a href="Temp.html">Administrator</a></span></p> > > <% > } > %> > > On Fri, Sep 17, 2010 at 9:12 AM, Nelson Rodrigo - LHQ < > nelson.rodr...@loadstarlk.com> wrote: > >> Dear Friends >> >> >> >> In my JSP I want to use as follows, like sSAPNo = "01199" then only >> display that link tag. >> >> So friends how can I code that\\\ >> >> >> >> >> >> <% >> >> *if*(sSAPNo = "01199"){ >> >> *<*a href="Temp.html">Administrator<*/*a>*</span></p>* >> >> } >> >> %> >> >> >> >> >> >> Thanks & Kind Regards, >> >> Nelson Rodrigo >> Executive – Software Development >> *LOADSTAR (PRIVATE) LIMITED >> *Sri Lanka | Tel: +94 11 483 7914 | Fax: +94 11 224 0892 | Mobile: +94 77 >> 311 6556 >> >> P *SAVE PAPER* - *Please consider our environment before printing *ü >> >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Java EE (J2EE) Programming with Passion!" group. >> To post to this group, send email to >> java-ee-j2ee-programming-with-passion@googlegroups.com >> To unsubscribe from this group, send email to >> java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com<java-ee-j2ee-programming-with-passion%2bunsubscr...@googlegroups.com> >> For more options, visit this group at >> >> http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en > > > -- You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en