I am not sure of this, but I guess you are getting a
NullPointerException.
This can happen if 'request.getParameter("link")' returns a null.
I think if you modify the statement
if (request.getParameter("link").equals(null))
to
if (request.getParameter("link") == null)
it would work.
Regards,
Sunish.
Eric Cho <[EMAIL PROTECTED]>@JAVA.SUN.COM> on 06/20/2001 09:05:52
PM
Please respond to A mailing list about Java Server Pages specification
and reference <[EMAIL PROTECTED]>
Sent by: A mailing list about Java Server Pages specification and
reference <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc:
Subject: simple if statement
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