Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 277
  • Last Modified:

JSP with Apache on WinXP


I have written simple bean with jsp running on tomacat win winXP

the import statement in the code is as follows
<%@ page import="business.User, data.UserIO" %>

They have been compiled and placed in appropriate directories.
The following errors are reported.

Any help regarding this is appreciated...

The error reported is below

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

An error occurred at line: 10 in the jsp file: /javaWjsp/show_mail.jsp

Generated servlet error:
    [javac] Compiling 1 source file

C:\Program Files\Apache Software Foundation\Tomcat 4.1\work\Standalone\localhost\_\javaWjsp\show_mail_jsp.java:7: package business does not exist
import business.User;
                ^
C:\Program Files\Apache Software Foundation\Tomcat 4.1\work\Standalone\localhost\_\javaWjsp\show_mail_jsp.java:8: package datas does not exist
import datas.UserIO;
             ^
C:\Program Files\Apache Software Foundation\Tomcat 4.1\work\Standalone\localhost\_\javaWjsp\show_mail_jsp.java:49: cannot resolve symbol
symbol  : class User
location: class org.apache.jsp.show_mail_jsp
User user=new User(firstName,lastName,emailAddress);
^

regard
neera
0
neerak
Asked:
neerak
2 Solutions
 
boonlengCommented:
Where do you places the file User.class and UserIO.class?
The files should be palced in the classpath folder ../WEB-INF/classes/business/User.class and ../WEB-INF/classes/datas/UserIO.class
0
 
Siva Prasanna KumarPrincipal Solutions ArchitectCommented:
Are you sure that those class files exits at correct locations?

According to me the problem is even if the have placed the class file u need to have them in there respective packages. I think those package folders are missing just check that.

There Must be a folder named business and datas or data (u are not clear as u are importing data.UserIO.class but exception says datas.UserIO.class) inside the classes folder which is inside the WEB-INF folder.

Check that and get back.

Thank You.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now