javascript - org.apache.jasper.JasperException: java.lang.NullPointerException Repeatedly Occuring -


i keep having issue whenever try run program, comes error:

http status 500 -  type exception report  message  descriptionthe server encountered internal error () prevented fulfilling request.  exception  org.apache.jasper.jasperexception: java.lang.nullpointerexception root cause  java.lang.nullpointerexception note full stack traces of exception , root causes available in glassfish server open source edition 3.1.2.2 logs.  glassfish server open source edition 3.1.2.2 

this code have:

<%@page contenttype="text/html" pageencoding="utf-8" import="java.text.numberformat"%>  <!doctype html> <html>     <head>         <meta http-equiv="content-type" content="text/html; charset=utf-8">         <title>jsp page</title>     </head>   <body>  <%  string strvalue, strlife;  strvalue=request.getparameter("pvalue");  strlife=request.getparameter("plife");        double value, life, depreciation,totaldepreciation=0;  value=double.parsedouble(strvalue);  life=double.parsedouble(strlife);     numberformat nf = numberformat.getcurrencyinstance();     depreciation=value/life;  totaldepreciation=depreciation;   %>     <p>straight line depreciation table</p>  <p>property value: <input type='text' name='pvalue' value='<%=nf.format(value)%>' /></p>  <p>property life: <input type='text' name='plife' value='<%=life%>'/></p>       <table border='1' width='400' cellspacing=1>     <thead>          <tr> <th>year</th> <th>value @ beginyr</th>              <th>dep during yr</th> <th>total endofyr</th>         </tr>      </thead>     <tbody>     <%     (int count = 1; count <= life; count++)      {     %>         <tr>             <td width='25%'><%=count%></td>             <td width='25%'><%=nf.format(value)%></td>             <td width='25%'><%=nf.format(depreciation)%></td>             <td width='25%'><%=nf.format(totaldepreciation)%></td>         </tr>     <%      value -= depreciation;     totaldepreciation+=depreciation;     }      %>         </table> 

what reason having issue? error report incredibly unhelpful, , not finding online. thank much!


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -