tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siomara Pantarotto" <hisiom...@hotmail.com>
Subject RE: ResultSet
Date Tue, 02 Oct 2001 17:06:55 GMT
Try to understand the scope. If your bean passes the resultset but the 
connection is lost I think you lose the reference for the result set too.

I am not sure.

I gues I have a JSP example that reads a table and populate a combo box. 
Does it help. Let me know so I can send as example.

Sio

>From: Claudia Sarmiento <csarmiento@globalstar.com.pe>
>Reply-To: tomcat-user@jakarta.apache.org
>To: "'tomcat-user@jakarta.apache.org'" <tomcat-user@jakarta.apache.org>
>Subject: RE: ResultSet
>Date: Mon, 1 Oct 2001 09:53:05 -0500
>
>Hi Sio:
>I'm surprised with your CV, it's very interesting
>
>This is the exactly error:
>Error interno del servlet:
>javax.servlet.ServletException
>	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:399)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at
>org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>	at org.apache.tomcat.core.Handler.service(Handler.java:286)
>	at
>org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>	at
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
>7)
>	at
>org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>	at
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
>onnectionHandler.java:210)
>	at
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>	at
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>	at java.lang.Thread.run(Thread.java:484)
>
>Causa Raiz:
>java.lang.AbstractMethodError
>	at
>jsp._0002fjsp_0002fCCreditosUT_0002ejspCCreditosUT_jsp_2._jspService(_0002fj
>sp_0002fCCreditosUT_0002ejspCCreditosUT_jsp_2.java:174)
>	at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at
>org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
>va:177)
>	at
>org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
>	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>	at
>org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
>	at org.apache.tomcat.core.Handler.service(Handler.java:286)
>	at
>org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>	at
>org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
>7)
>	at
>org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>	at
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
>onnectionHandler.java:210)
>	at
>org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>	at
>org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
>	at java.lang.Thread.run(Thread.java:484)
>
>I received that message from a JSP that received a result set from a Bean.
>The JSP tries to show the result set with pagination (X records by page)
>This is the code:
>
><%! ResultSet rs; %>
><%! int intTotalRegistros = 0; %>
><%! int i = 0; %>
><%
>     intTotalRegistros = mybean.Cuenta_registros();
>     rs = mybean.consultarC();
>     System.out.println("Despues de llamar a consultarC");	//I received
>this message ok
>%>
><P><B><IMG height=10 src="../images/puntob1.gif" width=10></B>
><B>Resultados</B></P>
><!-- the main table -->
><FORM METHOD=POST ACTION=CCreditosUT_Resp.jsp>
><%
>     try {
>
>	if (intTotalRegistros > 0 && (rs.next() || RegistroActual >= 1) ) {
>         System.out.println("Reg. Actual es " + RegistroActual);	//I 
>received
>this message ok
>	    rs.absolute(RegistroActual);
>         System.out.println("Despues de absolute " + RegistroActual);
>//I don't received this message
>	    int contador = 1;
>
>......
>
>
>
>
>Claudia Sarmiento Medina
>System Analyst
>GLOBALSTAR - TESAM PERU S.A.
>T: 2124039/ 2124036 Ext 1111
>C:870-7866
>
>
>-----Mensaje original-----
>De: Siomara Pantarotto [mailto:hisiomara@hotmail.com]
>Enviado el: Saturday, September 29, 2001 12:44 AM
>Para: tomcat-user@jakarta.apache.org
>Asunto: Re: ResultSet
>
>
>It will be easier to help If you post the error, and the piece of code you
>are trying to use, in the body of the email.
>
>I don't know if it helps but I got some examples on JDBC, XML, JavaMail,
>etc... at:
>
>www.geocities.com/hisiomara (under tutorials)
>
>:-)
>
>Sio
>
> >From: Claudia Sarmiento <csarmiento@globalstar.com.pe>
> >Reply-To: tomcat-user@jakarta.apache.org
> >To: "'tomcat-user@jakarta.apache.org'" <tomcat-user@jakarta.apache.org>
> >Subject: ResultSet
> >Date: Fri, 28 Sep 2001 19:46:49 -0500
> >
> >Hello Everybody:
> >I'm trying to show a resultset with pagination, i'm using the 
>rs.absolute()
> >to go to a specific row, but tomcat 3.2.1 send a error,
> >Is there a restriction to use this method?
> >
> >
> >Regards
> >
> >Claudia
>
>
>_________________________________________________________________
>Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


Mime
View raw message