Sufi,
The code would work, but it isn't the most robust or maintainable code. If
the form was changed so that one of the parameters wasn't sent or the name
was changed, you would get a null pointer exception. That is why I
suggested using "".equals(varname) instead. It is just defensive programming.
-Richard
At 02:53 PM 9/12/01 +0000, you wrote:
>Hi, I asked the same question last week, please what's wrong with this if
>statment :
><%
>String ipaddress = request.getParameter("ipaddress");
>System.out.println("ipaddress ??????????" + ipaddress);
>String user = request.getParameter("user");
>String newname = request.getParameter("newname");
>String jack = request.getParameter("jack");
>String os = request.getParameter("os");
>String pc = request.getParameter("pc");
>String processor = request.getParameter("processor");
>String memory = request.getParameter("memory");
>String domain = request.getParameter("domain");
>%>
>
><% if (
>!ipaddress.equals("")&& !user.equals("")&& !newname.equals("")&&
>!jack.equals("")&&
>!os.equals("") && !pc.equals("") && !processor.equals("") &&
>!memory.equals("") && !domain.equals("")
>) {
>%>
>
>Thanks
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>===========================================================================
>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