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 7614829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:30:10+00:00 2026-05-31T02:30:10+00:00

Working on a web application and implementing a class called Calculator that calculates certain

  • 0

Working on a web application and implementing a class called Calculator that calculates certain things about your body to determine how to focus your diet.

I am implementing this caluclator but I am getting an error. Here is the error; and following it below is an example of the source code. If you could tell me where my problem is that would be incredibly appreciated.

The Error:

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

An error occurred at line: 83 in the jsp file: /updateProfile.jsp
Calculator cannot be resolved
80:  a6 = "checked";
81: }
82: 
83: out.println(Calculator.percentBodyFat("f","145","38","38","38","27","27","27",67.0,"6.5")); 
84: 
85: String theName = request.getParameter("name");
86: if(theName != null) 


Stacktrace:
    org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
    org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
    org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:457)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

The Source code:

import java.io.BufferedReader;
package hygeia;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.Scanner;

public class Calculator {

  public static double percentBodyFat(String sex, String w, String h1,
    String h2, String h3, String a1, String a2, String a3, double height, String wr)  
  {
    //statements
  }
  public static double leanBodyMass(double weight, double percentBodyFat)
  {
    //statements
  }
  public static double protein(double leanBodyMass, int activLevel)
  {
    //statements
  }
}

It is able to compile but I cannot get it to work with the jsp.
It seems like it should be very simple.

  • 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-31T02:30:11+00:00Added an answer on May 31, 2026 at 2:30 am

    You have to include the Calculator class in your JSP page

    <%@page import="Calculator"%> <%-- with the complete package of Calculator class--%>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a web application (ASP.NET) game that would consist of a
I'm working on a project that is implementing a number Java web applications (and
I have a working web application that uses username/password SpringSecurity configuration. Now I want
I am working on Web Application that uses Google map. I need to verify
I have a decent working web application (Java/Servlet/Jsp) that I would like to improve
I'm working on web application which, among other things, needs to save small file
I am working on web application that requires that users are put into roles
Lately I've been working on implementing security for my web application, running on a
in my rails web application I am implementing Facebook connectivity. I want that whenever
I'm working a web application with PHP. Something wrong is happening that I have

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.