Solved

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

Posted on 2004-10-04
2
472 Views
Last Modified: 2008-03-04
The error I get is this

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

An error occurred at line: 1 in the jsp file: /Demo/test.jsp

Generated servlet error:
    [javac] Compiling 1 source file

/usr/local/jakarta-tomcat-4.1.30/work/Standalone/serrika.org/_/Demo/test_jsp.java:7: cannot resolve symbol
symbol  : class common
location: package Demo
import Demo.common;
            ^
/usr/local/jakarta-tomcat-4.1.30/work/Standalone/serrika.org/_/Demo/test_jsp.java:45: cannot resolve symbol
symbol  : class common
location: package Demo
      Demo.common inc = null;
          ^



An error occurred at line: 1 in the jsp file: /Demo/test.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-4.1.30/work/Standalone/serrika.org/_/Demo/test_jsp.java:47: cannot resolve symbol
symbol  : class common
location: package Demo
        inc = (Demo.common) pageContext.getAttribute("inc", PageContext.SESSION_SCOPE);
                   ^





An error occurred at line: 1 in the jsp file: /Demo/test.jsp

Generated servlet error:
/usr/local/jakarta-tomcat-4.1.30/work/Standalone/serrika.org/_/Demo/test_jsp.java:50: cannot resolve symbol
symbol  : class common
location: package Demo
            inc = (Demo.common) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "Demo.common");
                       ^
4 errors



I have only ftp access to the above server


this is test.jsp

<%@ page language="java" import="Demo.*"  import="java.util.*" import="java.sql.*" %>
<jsp:useBean id="inc" scope="session" class="Demo.common" />
<jsp:setProperty name="inc" property="*" />

and this is the content of common class under Demo package


package Demo;

import java.util.*;
import java.sql.*;
import java.io.*;
import java.util.regex.*;
import java.security.SecureRandom;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class common  {

      String name="";
      String pass="";
      public Connection con;
      public Statement st;
      String hashval="";
      String prefix="";
      String join_dt="";

}

etc and etc

Please advise what is the best way to solve the above problem with ONLY ftp access ?

Or if it is unsolvable via ftp access only what instructions must I give to my hosting provider for solving this problem ?

0
Comment
Question by:christopher sagayam
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 12223864
you need to copy your class file to:

<webapp>/WEB-INF/classes/Demo
0
 
LVL 6

Author Comment

by:christopher sagayam
ID: 12234818
correct

I had to create the folder

/WEB-INF/classes/ folder in my web root and had to upload the class files there

worked perfect
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
library class in java 1 93
maven project in eclipse 11 60
listing all functions in JavaScript 19 217
servlet example 17 51
If you are looking at this article, you have most likely been hit by some version of ransomware and are trying to find out if there is anything you can do, or what way you should react - READ ON!
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question