I believe the reason it is not working is because you are using the boolean
equals to compare two strings.  use this: flag.equals("download")

-----Original Message-----
From: sufi malak [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 10:11 AM
To: [EMAIL PROTECTED]
Subject: simple jsp question ? thanks


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.ca
b#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

===========================================================================
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

Reply via email to