In the page you are calling:
String B = null;
if ( request.getParameter("B") != null )
{
B = request.getParameter("B");
}
This will keep String B as null in your page if nothing is passed
over for the value of "B".
Rick
On 30 Aug 2000, at 13:55, sumit shah wrote:
> Hi,
> i am passing two values, A and B in the url as querystrings, when
> going from one page to another.
> So to retrieve the values i simply do request.getParameter("A") and
> simillarly for B. When the first time i load the page i dont want to
> pass the value for B.
> What should i write in my code to check for the null value of B. I
> tried
> doing request.getParameter("B")==null, but still while running i got a
> nullPointerException.
> how should i check for a null value of request.getParameter()
>
> thanks.
> ______________________________________________________________________
> ___ Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
> ======================================================================
> ===== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST". 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".
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