Re: Class files for jsp

From: Harold Ensle (heensle_at_ix.netcom.com)
Date: 12/16/03


Date: Tue, 16 Dec 2003 05:09:42 GMT


"Raymond DeCampo" <rdecampo@spam-I-am-not.twcny.rr.com> wrote in message
news:VawCb.8206$JW3.1030@twister.nyroc.rr.com...
> Harold Ensle wrote:
> > I am using Jserv on apache and I cannot instantiate from a class file in
> > JSP.
> > I was using servlets before and any class I put in the same directory
(or
> > other directories indicated with a classpath in the Jservproperties
file)
> > would work fine. But JSP files (which are in a different directory)
cannot
> > seem to find my classes no matter where I put them...whether in a
classpath
> > or not. I even put them in the WEB_INF/classes folder and still nothing.
> > I have searched everywhere for an answer. Does anyone know???
> >
> Harold,
>
> Perhaps you should post some sample code and describe the directory
> structure of your WAR. One question comes to mind however: did you
> import the desired classes with <@page import="" @> ?
>
> Ray

Thank you for the reply. This seems to be part of the problem. So I now have
something
like:

<%@ page import="ZClass"%>
<%
ZClass zc=new ZClass(1);
%>

The class itself has:

public class ZClass
{
   ZClass(int x)
   {
    ......
   }
}

Now the JSP is acting like it finds the class (no error on the import)
but it is saying there is no constructor of the type to be found.
But I see a constructor there. What did I do wrong?

(I think Java hates me.)

H.Ellis Ensle



Relevant Pages

  • RESOLVED - but can this be true?? (Re: JSP silently fails to compile)
    ... If I happen to write a JSP page, ... to the java file must have failed. ... corresponding class file was simply missing. ... get an error message if I write something which is not syntactically ...
    (comp.lang.java.programmer)
  • Re: Class files for jsp
    ... > I am using Jserv on apache and I cannot instantiate from a class file in ... But JSP files cannot ... > seem to find my classes no matter where I put them...whether in a classpath ... import the desired classes with? ...
    (comp.lang.java)
  • Re: Sysdeo/Eclipse Debugging
    ... I have only one project in Eclipse, which contains only one JSP file ... I've tried this with all combinations of Eclipse 2.1.2, 2.1.3, and JDK ... launch config, start Tomcat with the Debug Config "Tomcat 4.0.x", ... There is no source file attached to the class file test$jsp.class ...
    (comp.lang.java.softwaretools)
  • Re: JSP with Inner class
    ... > in the class file, but I don't think that the code in the class file ... > file and they don't get written to the app server log like they do in ... > my jsp. ... I pass a couple of strings to my class and they should come ...
    (comp.lang.java.programmer)