Try putting your class file in WEB-INF/lib/classes

Mike Sabroff
Web Services Developer
[EMAIL PROTECTED]
920-568-8379 
-----Original Message-----
From: Milan Tomic [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005 11:42 AM
To: 'Tomcat Users List'
Subject: RE: JSP compilation


Thank you. With your help, I found it. :)

I still have a problem that I can't use my custom classes in JSPs. I am
beginner with Tomcat and JSPs. I have created one simple class:

public class TestClass
{
   public TestClass () {}
}

and compiled it. Then I copied it (TestClass.class file) into
apache-tomcat-5.5.12\webapps\jsp-examples\WEB-INF\lib. This is my test
JSP
page:

<%@ page import="TestClass" %>
<% TestCLass tc = new TestClass(); %>

The problem is that I got this exception:

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

Generated servlet error:
The import TestClass cannot be resolved

An error occurred at line: 2 in the jsp file: /demo/TestMe.jsp
Generated servlet error:
TestCLass cannot be resolved to a type

Can you help me? :(

Milan


-----Original Message-----
From: Tim Funk [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 21, 2005 6:12 PM
To: Tomcat Users List
Subject: Re: JSP compilation

TestMe.class is not the file created.

Look in $TOMCAT_INSTALLATION/work/. It'll probably be called
TestMe_jsp.class

-Tim

Milan Tomic wrote:

>  
> 
> I have created simple TestMe.jsp page and when I open it in Tomcat, I
can
> see it OK. The problem is that I can't find, using WinXP WE search
engine,
> TestMe.class file. Where is it? Are JSP files compiled?
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to