File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes simple jsp problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "simple jsp problem" Watch "simple jsp problem" New topic

simple jsp problem

Chris Chua

Joined: Feb 21, 2001
Posts: 24
How does one import a .class file in a jsp file using <%@ page import= %> assuming my class file is A.class and is on directory
c:\tomcat\webapps\myjsp\web-inf\classes\A.class what should I put in the import="". I am using Tomcat ver 3.3. also what if i put the A.class file in a package what should i do?.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
You really should put your class in a package so that the JSP interpreter will look in the right place.
<%@ page import="mypkg.A" %>
Tomcat will start looking at the directory:
(the upper case WEB-INF is required)
All of these conventions are laid out in the servlet API you can download from

author of:
Chris Chua

Joined: Feb 21, 2001
Posts: 24
Thanks alot Mr Brogden. My jsp is working fine already. However I'ld like to clarify something you said that WEB-INF should be capitalized and it is a must but my jsp and servlets are working fine using lowercase web-inf how's that?
I agree. Here's the link:
subject: simple jsp problem
It's not a secret anymore!