In that checking one of the variable is == null.
before that if statement add if (var == null) var ="";
for both variables and problem will go away.
Tarik
----- Original Message -----
From: "Tony Einarsson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 30, 2001 3:43 PM
Subject: Re: NullPointerException error
> Thanks.
> And yes, I am aware that this error has a broad scope.
>
> Nothing strange on line 80. Just a simple IF statement checking if a
string variable is equal to a particular string. I most certainly haven't
touched that code or any associated code in quite a while. Yet suddenly I
got this error. I also copied this app (as a .war) to somebody else's
machine, ran it there fine. Next day I was going to look at something on
that machine and I got the error again. I asked the owner of the machine
what had been changed but was told nothing (which I didn't believe). After
examinig the code I gave up on it because everything seemed ok. For the
heck of it, I checked the page again and it worked fine !?! (i.e. the Reload
action did it as has been reported before by others).
>
> Just a fluke?
>
> T.
>
> P.S. Not getting any values from a property file.
>
> > -----Original Message-----
> > From: Fabio Luis Rodrigues Pelissoni
> > [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, March 30, 2001 8:22 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: NullPointerException error
> >
> >
> > Find
> >
> > _0002ftemplate_0002ejsptemplate_jsp_2.java
> > file in directory tomcat\work:
> >
> > then find the line 80 in this file
> >
> > []'
> >
> >
> >
> > Tony Einarsson wrote:
> >
> > > Occasionally I have gotten this NullPointerException error
> > and can't figure out what is causing it.
> > > I did several searches for solutions or hints and all that
> > I can find is that if you hit Reload, sometimes that does the
> > trick. It worked for me, but I would still like to know why
> > this happens.
> > >
> > > What do I need to look for and fix to avoid this situation
> > alltogether?
> > >
> > > java.lang.NullPointerException
> > > at
> > _0002ftemplate_0002ejsptemplate_jsp_2._jspService(_0002ftempla
> > te_0002ejsptemplate_jsp_2.java:80)
> > > 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$JspServletWrapper.service
> > (JspServlet.java:177)
> > > at
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet
> > .java:318)
> > > at
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
> > > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > at
> > org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper
> > .java:404)
> > > at org.apache.tomcat.core.Handler.service(Handler.java:286)
> > > at
> > org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> > > at
> > org.apache.tomcat.facade.RequestDispatcherImpl.forward(Request
> > DispatcherImpl.java:194)
> > > at
> > org.apache.jasper.runtime.PageContextImpl.forward(PageContextI
> > mpl.java:421)
> > > at
> > _0002fhome_0002ejsphome_jsp_1._jspService(_0002fhome_0002ejsph
> > ome_jsp_1.java:158)
> > > at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> > >
> > > T.
> > >
> > >
> > ==============================================================
> > =============
> > > 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
> >
>
>
===========================================================================
> 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