null pointer exception problem
Hi everyone, can anyone help please. I am using neatBeans 6.5.1 to learn how to develop web application. when run the application an error ocurred 'java.lang.NullPointerException' . Thanks alot
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Murach's Java Servlets and JSP</title>
</head>
<body>
<h1>Join our email list</h1>
<p>To join our email list, enter your name and
email address below. <br>
Then, click on the Submit button.</p>
<p><i>${message}</i></p>
<form action="AddEmailToListServlet" method="get">
<table cellspacing="5" border="0">
<tr>
<td align="right">First name:</td>
<td><input type="text" name="firstName"
value="${user.firstName}">
</td>
</tr>
<tr>
<td align="right">Last name:</td>
<td><input type="text" name="lastName"
value="${user.lastName}">
</td>
</tr>
<tr>
<td align="right">Email address:</td>
<td><input type="text" name="emailAddress"
value="${user.emailAddress}">
</td>
</tr>
<tr>
<td></td>
<td><br><input type="submit" value="Submit"></td>
</tr>
</table>
</form>
</body>
</html>
Re: null pointer exception problem
This is an HTML page. Not an application
Re: null pointer exception problem
Your error description doesn't really help much.
What part of web applications are you studying?
Like, are you doing pure servlets, or jsp or struts? How did you setup your environment for it?
Also, where are you getting the null pointer exception?
Re: null pointer exception problem
Hey dude..
Just, Your code is sufficient to show HTML page, there is none line of jsp,servlet or any java code, so i can't help u,
u should mention the java code here so i can solve it..:(