One suggestion. Try using single quote or \" for <jsp tags like
<jsp:include page='<%= request.getParameter("link"); %>' flush="true" />
with rgds
Uma Santharam,
Software Specialist,
Patni Computer Systems Ltd.,
(Phone: 761 1090 Ext. 1110
*E-mail: uma.santharam@patni,com <mailto:[EMAIL PROTECTED]>
-----Original Message-----
From: Le Tien Dung [SMTP:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 9:47 AM
To: [EMAIL PROTECTED]
Subject: Re: simple if statement
Hi,
the problem is occured when there is no "link" parameter.
i.e there is no object but you use equals() method.
to avoid this problem, please check if the "link" parameter is existe.
if(request.getParameter("link") != null) {
}
best,
Le Tien Dung
Eric Cho wrote:
> Hi,
> I'm new to jsps and to java itself so bear with me.
> what am i doing wrong with this?
>
> <%
> if (request.getParameter("link").equals(null)){ %>
>
> <jsp:include page="mainMenu.jsp" flush="true" />
>
> <%} else { %>
>
> <jsp:include page="<%= request.getParameter("link"); %>"
> flush="true" />
>
> <% } %>
>
> thanks,
>
> Eric
> _______________________________________________________
> eSafe Protect Gateway has scanned this mail for viruses, vandals and
> suspicious attachments.
>
> ===========================================================================
> 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
===========================================================================
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