Just change the line 52 to the following and it should work :
if ((telepon==null)  || ("").equals(telepon) ) {
Assume this should help.
Have a nice day.
With regards,
Sachin S. Khanna
http://www.emailanorder.com
----- Original Message -----
From: Isak Rickyanto <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, September 30, 2001 1:33 PM
Subject: Bean Error


> Hello I have a bean to manage form registration....
>
> I think it is because nullpointerexception... (from the error below) at
the
> foo.FormBean1.validate .. right?
> I read the error say (FormBean1.java.52)... it means that the error code
in
> the line 52 right?
> the code :
> it is on line 52:    if (telepon.equals("") || (telepon==null)) {
>                           errors.put("telepon","Please enter your last
> name");
>                           telepon="";
>                           allOk=false;
>                            }
>
> and I don't know how to solve it
> ...........
>
> Please hellp me.......
>
> Error: 500
> Location: /vcdshop/pendaftaran.jsp
> Internal Servlet Error:
>
>
> Root cause:
> java.lang.NullPointerException
>  at foo.FormBean1.validate(FormBean1.java:52) --------------> it mean the
> error on line 52 of FormBean.java ... right or not?
>
>  at
>
_0002fpendaftaran_0002ejsppendaftaran_jsp_0._jspService(_0002fpendaftaran_00
> 02ejsppendaftaran_jsp_0.java:106)
>  at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
> va:130)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:282)
>  at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
>  at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>  at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>  at org.apache.tomcat.core.Handler.service(Handler.java:287)
>  at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>  at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81
> 2)
>  at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
>  at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:213)
>  at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>  at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>  at java.lang.Thread.run(Thread.java:484)
>
>
===========================================================================
> 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

Reply via email to