Hi,

Firstly, thanks for the responses Bill and Karan.

I created my own application under my apache document directory ( I'm
using mod_jk ).  Is this going to cause a problem?  My apache root is
/usr/local/apache/htdocs and hence I placed my application in
/usr/local/apache/htdocs/networkdb and my web-inf directory is
/usr/local/apache/htdocs/networkdb/WEB-INF/ .  I read that beans need to
have they class hierarchy mimic on the file system, so I placed my final
bean source file in
/usr/local/apache/htdocs/networkdb/WEB-INF/classes/edu/fit/eng/networkdb/
. JSP pages load and run fine, so I guess my mod_jk setup is working,
but beans do not load.

Must I modify my class path?  Is there anything I should be doing
differently since I'm using mod_jk ( ie., since my application is not
under the $TOMCAT_HOME directory )

My simple program now looks like program now looks like 

<%@ page language="java" import="edu.fit.eng.networkdb.*" %>
<jsp:useBean id="connBean" class="edu.fit.eng.networkdb.sqlConnBean"
scope="page" />

<HTML>
[...]

and my bean file (
WEB-INF/classes/edu/fit/eng/networkdb/sqlConnBean.java )...

package edu.fit.eng.networkdb;

import java.io.*;
import java.sql.*;
import java.beans.*;

public class sqlConnBean
{
        private Connection conn;
[...]

Any ideas?,
-Kervin

karanmalhi wrote:
> 
> Please tell me if you have made your own web application or using the
> default and have you put your directories(packages) in the classes directory
> of the web-inf directory
> i.e.
> your package should be placed here
> tomcat_home\webapps\web-inf\classes
> 
> or if you make your own webapplication e.g. kervin  then
> 
> tomcat_home\webapps\kervin\web-inf\classes
> 
> hope this will help you
> 
> karan
> ----- Original Message -----
> From: "Kervin Pierre" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, January 14, 2001 1:09 AM
> Subject: Re: need help using bean
> 
> > William Brogden wrote:
> > >
> > > Kervin Pierre wrote:
> > > >
> > > > Hello,
> > > >
> > > > I can't seem to get this to work. The bean compiles OK but when I try
> to
> > > > load it, I get a "Error: 500" below saying that my package couldn't be
> > > > loaded.
> > > >
> > > > ...
> > > > org.apache.jasper.JasperException: Unable to compile class for
> > > >
> JSP/usr/local/jakarta/build/tomcat/work/localhost_8080/_0002fnetworkdb_0002f
> index_0002ejspindex_jsp_0.java:15:
> > > > Package edu.fit.eng.networkdb.sqlConnObj not found in import.
> > > > import edu.fit.eng.networkdb.sqlConnObj.*;
> > > > ...
> > > >
> > > > My jsp page begins like this
> > > >
> > > > <%@ page language="java" import="edu.fit.eng.networkdb.sqlConnObj.*"%>
> > > > <jsp:useBean id="connBean" class="sqlConnBean" scope="page" />
> > >
> > > When you name your class in the useBean tag you MUST use the
> > > complete package - it doesn't matter that you imported the package
> > >
> >
> > Thanks,
> >
> > I tried this but I'm getting the same error.
> >
> > [...]
> > org.apache.jasper.JasperException: Unable to compile class for
> >
> JSP/usr/local/jakarta/build/tomcat/work/localhost_8080/_0002fnetworkdb_0002f
> index_0002ejspindex_jsp_0.java:15:
> > Package edu.fit.eng.networkdb.sqlConnObj not found in import.
> > import edu.fit.eng.networkdb.sqlConnObj.*;
> > [...]
> >
> > My page reads now
> >
> > <%@ page language="java" import="edu.fit.eng.networkdb.sqlConnObj.*"%>
> > <jsp:useBean id="connBean"
> > class="edu.fit.eng.networkdb.sqlConnObj.sqlConnBean" scope="page" />
> > [...]
> >
> >
> > What does this error mean? How do I fix it?
> >
> > -Kervin
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

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

Reply via email to