tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: class loaded wrong
Date Fri, 09 Nov 2001 20:36:56 GMT
Thanks Craig for the info.  You do a great job with the TC 4 development and 
answering questions on the list!

I kind of thought of that after I sent the email but I did the method below 
as a fake, fudge, and cheat method in a learn-as-you-go experiment page.  
Some time soon I'll have to take the time to learn the class loading scheme 
and how to use it right. :-)

Back to reading the docs for me.....

--David Smith

On Friday 09 November 2001 02:47 pm, you wrote:
> On Fri, 9 Nov 2001, David Smith wrote:
> > Date: Fri, 9 Nov 2001 14:57:59 -0500
> > From: David Smith <dns4@cornell.edu>
> > Reply-To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> > To: Tomcat Users List <tomcat-user@jakarta.apache.org>
> > Subject: Re: class loaded wrong
> >
> > I've done this in one of my JSP pages and all I did was import the class.
> > Only specified the class name itself (no org.whatever....) and placed the
> > .class file in the WEB-INF/classes directory.  You do need to compile
> > your class though with javac or equivalent.
> >
> > I'm using Tomcat 4.0.1.
> >
> > --David Smith
> >
> > On Friday 09 November 2001 02:27 pm, you wrote:
> > > I am moving my 3.2.3 application to 4.0.1, and it
> > > failed to work
> > >
> > > my jsp file uses a bean which is defined under WEB-INF/classes
> > > (without package)
> > >
> > > say that class is MyBean.java, the error log shows
> > >
> > > org.apache.jasper.JasperException: Unable to compile class for JSP
> > >
> > > An error occurred at line: 4 in the jsp file: /process.jsp
> > >
> > > Generated servlet error:
> > > D:\henry\jakarta-tomcat-4.0.1\work\localhost\survey\process$jsp.java:61
> > >: Class org.apache.jsp.MyBean not found.
> > >
> > >
> > > Must I define all classes inside a package?
>
> To use a class that is not in a package, you have to specifically import
> it in a <%@ page %> directive.  However, you should know that this is
> likely to cause you portability problems -- you are much better off using
> fully qualified bean names in packages.
>
> Craig
>
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message