Hi,
See flag is an object and download is an another
object. So when u compare both of them by == sign it
checks if both are point to same reference. As they
are different object obiviously they will point to
different refrences.
Check for this case now. "download" == "download".
Eventhough L.H.S and R.H.S are strings each will be a
object. But both of them point to same refrence.
--- sufi malak <[EMAIL PROTECTED]> wrote:
> Could you please just tell me, why when I click in
> the link "Downloading" ,
> the if (flag == "download") is not working :
>
> <HTML>
> <BODY bgcolor="#ffffff">
> <%@ include file="Ttest3.html"%>
> <jsp:include page="Menu.jsp" flush="true">
> <jsp:param name="highlighted" value="services"/>
> </jsp:include>
> <% String flag = request.getParameter("flag"); %>
> <% System.out.println("flag = " + flag); %>
> <table bgcolor="effff">
> <tr>
> <td><a
>
href="services.jsp?flag=download">Downloading</a></td>
> <td><a
> href="services.jsp?flag=upload">Uploading</a></td>
> </tr>
> </table>
> <%
> if (flag ==null)
> { %>
> <object
> classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"
> width="580" height="420">
> <param name=movie value="studentmain.swf">
> <param name=quality value=high>
> <embed src="../images/flash/studentmain.swf"
> quality=high
>
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
> type="application/x-shockwave-flash" width="580"
> height="420">
> </embed>
> </object>
> <% } %>
>
> <%
> if (flag == "download")
> { %>
> <%
> System.out.println("downloading ..."); %>
> <%@ include file="download.html"%>
> <% } %>
> </BODY>
> </HTML>
>
>
> Thanks
>
_________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.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://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
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.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://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