Hi
This my code and I am having null pointer Exception
this is my function
<%!
public static String nulltostring(String obj){
if(obj==null)
{
obj = "";
}
obj = obj.replace('"',' ');
return obj;
}
%>
param1= nulltostring(request.getParameter("salesno"));
param2=nulltostring(request.getParameter("productno"));
param3=nulltostring( request.getParameter("sortno"));
param4=nulltostring( request.getParameter("shadeno"));
out.println(param1);
if(param1 == null || param1 == ""){
session.putValue("first","All");
}
else{
if(param1.equals("All")){//here it show the exception
appendStr="";
}
else{
appendStr=" and pp_hdr.sp_no="+param1;
first = " where sp_no="+param1;
}
session.putValue("first",param1);
}
---------------------------------------------------------------------------------------------------------
The secret of getting ahead is getting started.
The secret of getting start is
breaking your complex overwhelming
tasks into small manageable tasks,
and then starting on the first one.
===========================================================================
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://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com