Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

JSP (Beans Problem)

Options
  • 14-02-2006 3:32pm
    #1
    Registered Users Posts: 1,987 ✭✭✭


    This is the error im getting, i have the UserData.class file in a classes folder in the WEB-INF folder! The code for SaveName.jsp is below too, anyone have any ideas where im going wrong?
    org.apache.jasper.JasperException: Unable to compile class for JSP

    Generated servlet error:
    The import UserData cannot be resolved

    An error occurred at line: 3 in the jsp file: /SaveName.jsp
    Generated servlet error:
    UserData cannot be resolved or is not a type

    An error occurred at line: 3 in the jsp file: /SaveName.jsp
    Generated servlet error:
    UserData cannot be resolved or is not a type

    An error occurred at line: 3 in the jsp file: /SaveName.jsp
    Generated servlet error:
    UserData cannot be resolved or is not a type


    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

    SaveName.jsp
    <%@ page import="java.util.*" %>
    <%@ page import="UserData" %>
    <jsp:useBean id="user" class="UserData" scope="session"/>
    <jsp:setProperty name="user" property="*"/>
    <html>
    <body>
    <a href="NextPage.jsp">Continue</a>
    </body>
    </html>


Comments

  • Closed Accounts Posts: 169 ✭✭akari no ryu


    Is it a struts application?
    Where are you putting the class into the session?


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    That what i got off the tutorial!

    Do i take out the session bit?


  • Registered Users Posts: 1,987 ✭✭✭Ziycon


    sorted it, thanks anyways.


Advertisement