Thanks all

I have done it.

 

 

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 ü

 

From: java-ee-j2ee-programming-with-passion@googlegroups.com
[mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com] On Behalf Of
Haroon Chaudhry
Sent: Saturday, September 18, 2010 12:15 AM
To: dfpark...@yahoo.com
Cc: java-ee-j2ee-programming-with-passion@googlegroups.com
Subject: Re: [java ee programming] JSP Problem

 

Hi,

Try getting in habit of using tags. Java code in "view" is not a good idea.
You can do same as follows:

<c:if test="${sSAPNo == '01199'}">
     <a href="Temp.html">Administrator</a>
</c:if>    
</span></p>


You will need to define tag lib if you have not already done that.
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c"%>

Hope this helped.

Haroon



On Fri, Sep 17, 2010 at 2:22 PM, dfparker1 <dfpark...@yahoo.com> wrote:

 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
<mailto:java-ee-j2ee-programming-with-passion%2bunsubscr...@googlegroups.com
> <java-ee-j2ee-programming-with-passion%2bunsubscr...@googlegroups.com
<mailto:java-ee-j2ee-programming-with-passion%252bunsubscr...@googlegroups.c
om> >

>> For more options, visit this group at
>>
>>
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?h
l=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
<mailto: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?h
l=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?h
l=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

Reply via email to