You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by comman <co...@protime.com.cn> on 2000/11/03 03:38:42 UTC
Where to put my own class after combined with apache?
Here is my problem!
org.apache.jasper.JasperException: Unable to compile class for JSP/usr/local/jakarta-tomcat/work/localhost_8080/_0002fnew_0002fcn_0002fclients_0002fclients_0002ejspclients_jsp_0.java:92: Class n_00025w.cn.clients.Replace not found in type declaration.
Replace myReplace = null;
^
I have install Apache+ Tomcat +Mysql on my Cobalt3 (Linux 2.2.14C10), and everything goes well.
But when I use a bean, the problem is coming. I have put "Replace.class" under "ROOT/WEB-INF/classes/", WEB-INF/classes under my webroot and ${TOMCAT_HOME}/lib, but it still can not be pick out by the CAT. And an other thing happened, when I add "package org.gjt.mm.mysql" to the header of my class and put it to the jar file of JDBC. It can be found by "org.gjt.mm.mysql.Replace", is it funny?
So I decide that I have not import some of class ,such as "java.io.*". And I add all the classes imported by the JDBC to it, but it still can not work alone by "Replace".
By the way , I using the bean as follow:
<jsp:useBean id="myReplace" class="Replace" scope="page" />
So any hints will be appreciated! Wairting for you help!
Comman Song
Consultant
comman@protime.com.cn
-------------------------------
www.protime.com.cn
Protime Consulting - We build your Internet success
Tel: 53062999x123 Fax: 63852929
11A China Overseas Building, 398 Huai Hai (M) Rd.,
200020, Shanghai, China
Re: Where to put my own class after combined with apache?
Posted by William Brogden <wb...@bga.com>.
comman wrote:
>
> Here is my problem!
>
> org.apache.jasper.JasperException: Unable to compile class for JSP/usr/local/jakarta-tomcat/work/localhost_8080/_0002fnew_0002fcn_0002fclients_0002fclients_0002ejspclients_jsp_0.java:92: Class n_00025w.cn.clients.Replace not found in type declaration.
> Replace myReplace = null;
> ^
>
> By the way , I using the bean as follow:
> <jsp:useBean id="myReplace" class="Replace" scope="page" />
That may be your problem - class= MUST give the complete package
and class due to the way Tomcat does the instantiation.
--
WBB - wbrogden@bga.com Chief Scientist, LANWrights, Inc.
Java Programmer Certification information and mock exam
at http://www.lanw.com/java/javacert/