Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3313100
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:04:32+00:00 2026-05-17T22:04:32+00:00

I am getting an exception in Tomcat stating the following: org.apache.jasper.JasperException: Unable to compile

  • 0

I am getting an exception in Tomcat stating the following:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 6 in the generated java file
Only a type can be imported. business.User resolves to a package

An error occurred at line: 12 in the jsp file: /join_email_list.jsp
User cannot be resolved to a type
9:     <body>
10:         <%@ page import="business.User" %>
11:         <%
12:             User user = (User) request.getAttribute("user");
13:             String message = (String) request.getAttribute("message");
14: 
15:             if (user == null)


An error occurred at line: 12 in the jsp file: /join_email_list.jsp
User cannot be resolved to a type
9:     <body>
10:         <%@ page import="business.User" %>
11:         <%
12:             User user = (User) request.getAttribute("user");
13:             String message = (String) request.getAttribute("message");
14: 
15:             if (user == null)


An error occurred at line: 17 in the jsp file: /join_email_list.jsp
User cannot be resolved to a type
14: 
15:             if (user == null)
16:             {
17:                 user = new User();
18:             }
19:             if (message == null)
20:             {


Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

A few things to point out:

First:

An error occurred at line: 6 in the generated java file
Only a type can be imported. business.User resolves to a package

This is inaccurate User is a class in the business package.

Second

User user = (User) request.getAttribute("user");

User is clearly a type, in NetBeans ctrl + space brings up all the class properties and methods.

Here is the User class:

package business;

public class User
{
    private String firstName;
    private String lastName;
    private String emailAddress;

    public User()
    {
        firstName = "";
        lastName = "";
        emailAddress = "";
    }

    public User(String first, String last, String email)
    {
        firstName = first;
        lastName = last;
        emailAddress = email;
    }

    public void setFirstName(String f)
    {
        firstName = f;
    }

    public String getFirstName()
    { 
        return firstName; 
    }

    public void setLastName(String l)
    {
        lastName = l;
    }

    public String getLastName()
    { 
        return lastName; 
    }

    public void setEmailAddress(String e)
    {
        emailAddress = e;
    }

    public String getEmailAddress()
    { 
        return emailAddress; 
    }
}

How can I resolve this? It doesn’t seem as if anything is wrong. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T22:04:33+00:00Added an answer on May 17, 2026 at 10:04 pm

    This kind of JSP error is misleading. This is under the covers actually a NoClassDefFoundError.

    In other words, the /WEB-INF/classes/business/User.class is missing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting the following exception when starting a Tomcat instance with my web app
I am getting Following Exception while configuring the Connection Pool in Tomcat This is
<oxm:jaxb2-marshaller id=marshaller> <oxm:class-to-be-bound name=myclass/> </oxm:jaxb2-marshaller> I keep getting exception: java.lang.NoSuchMethodError: org.springframework.http.MediaType.sortBySpecificity(Ljava/util/List;)V What is the
hey guys, i'm getting an exception on the following inner exception: {Value cannot be
I am getting the following jvm crash every few days running Tomcat 6.0.16 on
I am getting the following error when I get to the line that invokes
I'm getting an Exception while trying to insert a row in oracle table. I'm
In one of our application im getting an exception that i can not seem
I'm getting a FileIOPermssion exception thrown when trying to create a folder in Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)
I am getting a strange exception when trying to update a DataTable after flagging

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.