You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mauricio Tia Ni Gong Lin <li...@fua.br> on 2002/06/09 20:12:18 UTC

Using bean is JSP files

Hi all,

Is there any difference between the following code in order to
use bean?

<%@ page import="java.sql.*"%>
<jsp:useBean id="connection" class="br.fua.ppgi.ConnectionBean"
scope="session"/>

<%@ page import="java.sql.*,br.fua.ppgi.*"%>
<jsp:useBean id="connection" class="ConnectionBean" scope="session"/>


The former code (I followed the core servlets and JSP
book's idea) is doing well , but the latter code (I followed the Web
Development with JavaServer Pages book's idea) shows me an error on
the browser as:

javax.servlet.ServletException: ConnectionBean
...
...
root cause
java.lang.InstantiationException: ConnectionBean
...
...

Could anyone help me?

Regards,

Lin.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>