Now, I can not display the page when I changed flag == "download" to
flag.equals("download") ???
Here is the file services.jsp :
<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>
<% } %>

<%
System.out.println("Before if ..");
System.out.println(flag);
if (flag.equals("download"))
{ %>
<%
System.out.println("After if ..");
System.out.println("downloading ..."); %>
<%@ include file="download.html"%>
<% } %>
</BODY>
</HTML>



>From: "A.C." <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>     reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: simple jsp question ? thanks
>Date: Mon, 12 Mar 2001 20:27:17 +0200
>
> > Could you please just tell me, why when I click in the link
>"Downloading" ,
> > the if (flag == "download")  is not working :
>
>two compare two strings:
>if (string1.equals(string2))
>...
>
>===========================================================================
>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

_________________________________________________________________
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

Reply via email to