0

I'm trying to learn some struts through this tutorial: http://www.netbeans.org/kb/docs/web/quickstart-webapps-struts.html

Now I've completed everything but I'm getting this weird error in the browser:

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /login.jsp at line 20

17: <body>
18:
19:
20: <html:form action="/login">
21:
22: <table border="0">
23:


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: Exception creating bean of class LoginForm: {1}
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:852)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.login_jsp._jspService(login_jsp.java:92)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

And here is file where I'm getting this error. I followed everything as its said in the tutorial.

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Login Script</title>
    </head>
    <body>
       
        
      [B]  <html:form action="/login">[/B]
       
            <table border="0">

            
                <tbody>

                     <tr>
                <td colspan="2">
                    <bean:write name="LoginForm" property="error" filter="false"/>
                    &nbsp;</td>
            </tr>
                    <tr>
                        <td> Enter your name:</td>
                        <td><html:text property = "name" /> </td>
                    </tr>
                    <tr>
                        <td>Enter your email:</td>
                        <td><html:text property = "email" /> </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td><html:submit value = "Login" /></td>
                    </tr>
                </tbody>
            </table>

            
      </html:form> 
    </body>
</html>

Edited by ryno365: Point out error in code.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by __avd
0

Check the code of Action and Form (bean) classes. Review the LoginAction and LoginForm classes.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.