hi all
this is my first post and am new to
java am trying to
test the code given in headfirst
jsp&
Servlet this is my very basic code
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<table>
<tr>
<td>Enter FirstName : <input type="text" id="name" name="name"></td>
</tr>
<tr>
<td>Enter LastName : <input type="text" id="lastname" name="lastname"></td>
</tr>
</table>
<jsp:useBean id="person" class="PersonDetails">
<jsp:setProperty name="person" property="*" />
</jsp:useBean>
<input type="submit" value="Submit">
</body>
</html>
but i am getting this error
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 19 in the jsp file: /jsp/EntryPage.jsp
PersonDetails cannot be resolved to a type
16: <td>Enter LastName : <input type="text" id="lastname" name="lastname"></td>
17: </tr>
18: </table>
19: <jsp:useBean id="person" class="PersonDetails">
20: <jsp:setProperty name="person" property="*" />
21: </jsp:useBean>
22:
An error occurred at line: 19 in the jsp file: /jsp/EntryPage.jsp
PersonDetails cannot be resolved to a type
16: <td>Enter LastName : <input type="text" id="lastname" name="lastname"></td>
17: </tr>
18: </table>
19: <jsp:useBean id="person" class="PersonDetails">
20: <jsp:setProperty name="person" property="*" />
21: </jsp:useBean>
22:
An error occurred at line: 19 in the jsp file: /jsp/EntryPage.jsp
PersonDetails cannot be resolved to a type
16: <td>Enter LastName : <input type="text" id="lastname" name="lastname"></td>
17: </tr>
18: </table>
19: <jsp:useBean id="person" class="PersonDetails">
20: <jsp:setProperty name="person" property="*" />
21: </jsp:useBean>
22:
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
what should i do
am using eclips , toncate 6 , xp
thank you