aspose file tools*
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
Author

simple jsp problem

Chris Chua
Greenhorn

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?.
Thanks
Chris
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
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:
c:\tomcat\webapps\myjsp\WEB-INF\classes\mypkg
(the upper case WEB-INF is required)
All of these conventions are laid out in the servlet API you can download from java.sun.com
Bill

------------------
author of:
Chris Chua
Greenhorn

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?
Thanks
Chris
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: simple jsp problem