Re: Tag inside a cell.

2005-04-05 Thread Marcelo Epstein
Thanks Jeff,
But it is not working. I inserted :
table { empty-cells: show; }
inside my css file.
But the cells when the attribute of the bean is null still appears no border. 
:-(
Any sugestion? Or sample code?
Thanks in advance
Marcelo



Jeff Beal wrote:
In CSS:
table { empty-cells: show; }
Another alternative is to include   in empty table cells
See http://www.w3.org/TR/REC-CSS2/tables.html#empty-cells
-- Jeff
On Apr 5, 2005 10:23 AM, Marcelo Epstein <[EMAIL PROTECTED]> wrote:
 

Hi,
When the attribute of an object is null, I always lost the border of the
table.What is a good way to avoid it?
ex:


 (when y = null, border seems
strange!)


Thanks in advance.
Marcelo
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


 

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


Tag inside a cell.

2005-04-05 Thread Marcelo Epstein
Hi,
When the attribute of an object is null, I always lost the border of the 
table.What is a good way to avoid it?
ex:


 (when y = null, border seems 
strange!)



Thanks in advance.
Marcelo
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Menu

2005-02-16 Thread Marcelo Epstein
Hi,
I am developing a software for a company using struts. What is the best 
way to create the menus to navigate in the system?
JSF? Simple HTML with javascript? Tag libraries?

Thanks in advance,
Marcelo Epstein
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Format Phone numbers using bean:write

2004-08-03 Thread Marcelo Epstein
Its not working..
I don´t want to insert the code inside the getter method, because it is
presentation not business.



foneCom1 is a String.

Any guess??



- Original Message - 
From: "Nathan Maves" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 03, 2004 5:58 PM
Subject: Re: Format Phone numbers using bean:write


> Did you try to put the () in '' as in
>
>  ="'('###')'###'-'"/>
>
> just a guess.. :)
>
> On Aug 3, 2004, at 2:03 PM, Marcelo Epstein wrote:
>
> > Hi,
> >
> > This is not working.
> >
> >  > ="(###)###'-'"/>
> >
> > foneCom1 is a String.
> >
> > Marcelo
> >
> >
> >
> > - Original Message -
> > From: "Jim Barrows" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, August 03, 2004 4:10 PM
> > Subject: RE: Format Phone numbers using bean:write
> >
> >
> >
> >
> >> -Original Message-
> >> From: Marcelo Epstein [mailto:[EMAIL PROTECTED]
> >> Sent: Tuesday, August 03, 2004 11:35 AM
> >> To: Struts Users Mailing List
> >> Subject: Format Phone numbers using bean:write
> >>
> >>
> >> Hi all,
> >>
> >> Is it possible to format a phone number stored in a String using
> >>  tag ?
> >>
> >> I can format dates, but not Strings.
> >
> > (###)###'-' for a us number might just do it..
> >
> >>
> >> Thanks in advance,
> >> Marcelo
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Re: Format Phone numbers using bean:write

2004-08-03 Thread Marcelo Epstein
Hi,

This is not working.

 

foneCom1 is a String.

Marcelo



- Original Message - 
From: "Jim Barrows" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, August 03, 2004 4:10 PM
Subject: RE: Format Phone numbers using bean:write




> -Original Message-
> From: Marcelo Epstein [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 03, 2004 11:35 AM
> To: Struts Users Mailing List
> Subject: Format Phone numbers using bean:write
> 
> 
> Hi all,
> 
> Is it possible to format a phone number stored in a String using
>  tag ?
> 
> I can format dates, but not Strings.

(###)###'-' for a us number might just do it..

> 
> Thanks in advance,
> Marcelo
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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



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



Format Phone numbers using bean:write

2004-08-03 Thread Marcelo Epstein
Hi all,

Is it possible to format a phone number stored in a String using
 tag ?

I can format dates, but not Strings.

Thanks in advance,
Marcelo


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



Re: [OT] Soccer portal released goal.com

2004-06-17 Thread Marcelo Epstein
I can´t believe,
Goal.com don´t talk about the best soccer around the World.
I sugest u to write about BRAZILIAN SOCCER. Maybe u will find how many
"Ronaldo´s" we have here! 8-)

GOOD JOB,

Marcelo

- Original Message - 
From: "Andrew Hill" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 11:10 AM
Subject: RE: [OT] Soccer portal released goal.com


> +1
>
> -Original Message-
> From: McCormack, Chris [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 17 June 2004 22:13
> To: Struts Users Mailing List
> Subject: RE: [OT] Soccer portal released goal.com
>
>
> I for one appreciate the post Simone. Its a good looking site and its
> nice to see work that developers have spent time on and are proud of.
>
> Good job !
>
> Chris McCormack
>
> -Original Message-
> From: Simone-dev [mailto:[EMAIL PROTECTED]
> Sent: 17 June 2004 15:02
> To: Struts Users Mailing List
> Subject: Re: [OT] Soccer portal released goal.com
>
>
> I'm just a developer... :-)
> I did the serverside development and the javascript + dhtml (menu)
> The rest, desing, css, layout design and so on was developed by a
> webdesigner
>
> I'm working on this engine since november
>
> Simone
>
> Robert Taylor wrote:
>
> >Wow! Cool site. Good job. Did you do all page authoring(javascript, css,
> dhtml, graphics, etc...)
> >or just server side development (architecture, site design/structure,
> functionality, etc...)?
> >How long did it take to design and implement?
> >
> >robert
> >
> >
> >
> >>-Original Message-
> >>From: Simone - Dev [mailto:[EMAIL PROTECTED]
> >>Sent: Thursday, June 17, 2004 8:25 AM
> >>To: 'Struts Users Mailing List'
> >>Subject: [OT] Soccer portal released goal.com
> >>
> >>
> >>Hello All,
> >>I know this is a lot off-topic, but I'm so proud of the portal I
> >>designed and developed that I'd like you all know that it has just been
> >>released a worldwide soccer portal named Goal.com (www.goal.com) and
> >>that now it's having a lot of news and live results and live netcasting
> >>on the european championship 2004.
> >>
> >>I aplogize for the "invasion" also becuase it's not developed in Struts,
> >>but with ASP.NET but as I said, it took me the last 6 month of work
> >>to develop the engine that drives that portal (and all its netwok: all
> >>main italian soccer teams).
> >>
> >>I use Struts in my spare time but in my "real" work I develop with .NET
> >>and C# (not my decision, of course)... but I prefer Struts.
> >>
> >>Simone
> >>-
> >>Simone Chiaretta
> >>  www.piyosailing.com/S
> >>Any sufficiently advanced technology is indistinguishable from magic
> >>"Life is short, play hard"
> >>
> >>
> >>
> >>
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ***
> This e-mail and its attachments are confidential
> and are intended for the above named recipient
> only. If this has come to you in error, please
> notify the sender immediately and delete this
> e-mail from your system.
> You must take no action based on this, nor must
> you copy or disclose it or any part of its contents
> to any person or organisation.
> Statements and opinions contained in this email may
> not necessarily represent those of Littlewoods.
> Please note that e-mail communications may be monitored.
> The registered office of Littlewoods Limited and its
> subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
> Registered number of Littlewoods Limited is 262152.
> 
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



Re: Action messages.

2004-06-03 Thread Marcelo Epstein
Thanks Frank,

Do you have any sample code of using  ?
I think this is also good to avoid 2 submit´s click. Am I right?



- Original Message - 
From: "Frank Zammetti" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 03, 2004 11:57 AM
Subject: RE: Action messages.


> You can "fake it" and do this... have a hidden  in your page that,
> just before you submit your form, you display.  You will probably also
want
> to wrap everything else in your page in a  and hide it at the same
> time.  I say this is "faking it" because the browser won't have any idea
> what's going on on the server, which might be OK.
>
> If you want some sort of progress bar though, something that actually has
> knowledge of what's going on on the server, what you'll need to do is kick
> off a thread in your Action, and store some reference to it persistently
> (i.e., session or a database, etc.).  Then, you'll have to have a page on
> the browser with something like a meta-refresh that calls some special
> Action that can check the status of that thread, maybe get some sort of
> percent complete or something like that to display back to the browser.
>
> Obviously, if faking it is good enough, as it usually is in these cases,
> that's by far the better choice.
>
> Frank
>
> >From: "Marcelo Epstein" <[EMAIL PROTECTED]>
> >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> >Subject: Action messages.
> >Date: Thu, 3 Jun 2004 11:46:44 -0300
> >
> >Hi,
> >
> >I have a Action that takes 10s to execute. Is there any way to display
> >messages in the browser during execution?
> >
> >Thx,
> >Marcelo
> >
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> _
> MSN 9 Dial-up Internet Access fights spam and pop-ups - now 3 months FREE!
> http://join.msn.click-url.com/go/onm00200361ave/direct/01/
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



and get...()

2004-06-03 Thread Marcelo Epstein
Hi,

When I use  if the value is null, the tag returns "".
But, when I try, for example, System.out.print(xxx.getProperty()) inside an Action and 
the property is null. It returns the String "null". 
What is the best practice to avoid printing "null" ? I have to check all values before 
printing? Is there a better way to do that?

Thanks in advance,
Marcelo

Action messages.

2004-06-03 Thread Marcelo Epstein
Hi,

I have a Action that takes 10s to execute. Is there any way to display
messages in the browser during execution?

Thx,
Marcelo


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



Manual reload struts-config.xml

2004-05-04 Thread Marcelo Epstein
Hi,

How do I reload struts configuration file manualy without context restart?

Thanks in advance,
Marcelo

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



Reporting Tool.

2004-04-14 Thread Marcelo Epstein
Hi,
I need to create some reports in my application. Which is the best tool
available to work with Struts?
I read about JasperReports, is it the way to go with Struts?

Thanks in advance.
Marcelo


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



Re: Connection Pooling (How i use...)

2004-04-07 Thread Marcelo Epstein
Hi all,

Closing all ResultSets, Statements, Connection in the finally block fixed my app that 
stops crashing.

Thanks everybody...
Marcelo



On Wed, 07 Apr 2004 09:00:16 -0400, "Dean A. Hoover" <[EMAIL PROTECTED]> escreveu:

> De: "Dean A. Hoover" <[EMAIL PROTECTED]>
> Data: Wed, 07 Apr 2004 09:00:16 -0400
> Para: Struts Users Mailing List <[EMAIL PROTECTED]>
> Assunto: Re: Connection Pooling (How i use...)
> 
> So, are there implied catches in there for SQLException (I assume there 
> are)?
> In the innermost try block, does the catch rethrow the SQLException so that
> it cascades to the outer blocks?
> 
> Just trying to understand the model.
> 
> Dean Hoover
> 
> Larry Meadors wrote:
> 
> >Yes. 
> >
> >You really might want to consider a tool like iBATIS, but if you want to
> >do it yourself, here is the pattern:
> >
> >Connection c = null;
> >try{
> >  //get connection
> >  try{
> >// get statement
> >try{
> >  // get result set
> >  // process result set
> >}finally{
> >  // close result set if not null
> >}
> >  }finally{
> >// close statement if not null
> >  }
> >}finally{
> >  //close connection if not null
> >}
> >
> >Larry
> >
> >-
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >  
> >
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

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



Re: Connection Pooling - Monitor

2004-04-06 Thread Marcelo Epstein
Richard,

I am already setting autoReconnect=true. I just want to know if exists any method that 
returns the # of opened connections are in the pool.

Thanks. 




On Tue, 6 Apr 2004 10:54:06 -0700 (PDT), Richard Yee <[EMAIL PROTECTED]> escreveu:

> De: Richard Yee <[EMAIL PROTECTED]>
> Data: Tue, 6 Apr 2004 10:54:06 -0700 (PDT)
> Para: Struts Users Mailing List <[EMAIL PROTECTED]>
> Assunto: Re: Connection Pooling - Monitor
> 
> Marcelo,
> The # of connections is determined by the value you
> set when you defined your datasource. What is the URL
> that you are using? You should set autoReconnect=true
> in the URL.
> 
> -Richard
> 
> 
> 
> --- Marcelo Epstein <[EMAIL PROTECTED]> wrote:
> > 
> > Is it possible to know how many connection are in
> > the pool ? Is there any monitor available?
> > 
> > 
> > On Tue,  6 Apr 2004 14:15:34 -0300, "Marcelo
> > Epstein" <[EMAIL PROTECTED]> escreveu:
> > 
> > > De: "Marcelo Epstein" <[EMAIL PROTECTED]>
> > > Data: Tue,  6 Apr 2004 14:15:34 -0300
> > > Para: "Struts Users Mailing List"
> > <[EMAIL PROTECTED]>
> > > Assunto: Re: Connection Pooling (How i use...)
> > > 
> > > Now I am closing the connection in the finally
> > block.
> > > The exemple provided by:
> > >
> >
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
> > > doesn´t do that:
> > > package foo;
> > > 
> > > import javax.naming.*;
> > > import javax.sql.*;
> > > import java.sql.*;
> > > 
> > > public class DBTest {
> > > 
> > >   String foo = "Not Connected";
> > >   int bar = -1;
> > > 
> > >   public void init() {
> > > try{
> > >   Context ctx = new InitialContext();
> > >   if(ctx == null ) 
> > >   throw new Exception("Boom - No
> > Context");
> > > 
> > >   DataSource ds = 
> > > (DataSource)ctx.lookup(
> > >"java:comp/env/jdbc/TestDB");
> > > 
> > >   if (ds != null) {
> > > Connection conn = ds.getConnection();
> > >   
> > > if(conn != null)  {
> > > foo = "Got Connection
> > "+conn.toString();
> > > Statement stmt =
> > conn.createStatement();
> > > ResultSet rst = 
> > > stmt.executeQuery(
> > >   "select id, foo, bar from
> > testdata");
> > > if(rst.next()) {
> > >foo=rst.getString(2);
> > >bar=rst.getInt(3);
> > > }
> > > conn.close();
> > > }
> > >   }
> > > }catch(Exception e) {
> > >   e.printStackTrace();
> > > }
> > >  }
> > > 
> > >  public String getFoo() { return foo; }
> > >  public int getBar() { return bar;}
> > > }
> > > 
> > > 
> > > 
> > > 
> > > On Tue, 06 Apr 2004 12:50:29 -0400, "Geeta Ramani"
> > <[EMAIL PROTECTED]> escreveu:
> > > 
> > > > De: "Geeta Ramani" <[EMAIL PROTECTED]>
> > > > Data: Tue, 06 Apr 2004 12:50:29 -0400
> > > > Para: Struts Users Mailing List
> > <[EMAIL PROTECTED]>
> > > > Assunto: Re: Connection Pooling (How i use...)
> > > > 
> > > > This your problem: closing the connection in
> > your try block. Move it to a finally block..
> > > > 
> > > > Marcelo Epstein wrote:
> > > > 
> > > > > I use the pool like this: (IS IT WRONG??) I
> > think the connection is being closed..
> > > > >
> > > > > try {
> > > > > Context ctx = new InitialContext();
> > > > > if (ctx == null)
> > > > >   throw new Exception("Boom - No
> > Context");
> > > > >
> > > > >   DataSource ds = (DataSource)
> > ctx.lookup("java:comp/env/jdbc/EasyDB");
> > > > >
> > > > >   if (ds != null) {
> > > > > Connection conn =
> > ds.getConnection();
> > > > > if (conn != null) {
> > > > > Statement stmt =
> > 

ORM Tools (Ibatis, Hibernate, OJB....)

2004-04-06 Thread Marcelo Epstein
Hi,
Thanks everybody!
Now I am convinced to use an ORM tool. The big problem is whitch one? Hibernate? 
Ibatis ?OJB?
Whitch one is preferable to use with Struts?? 

Macelo Epstein



On Tue, 06 Apr 2004 11:29:21 -0600, "Larry Meadors" <[EMAIL PROTECTED]> escreveu:

> De: "Larry Meadors" <[EMAIL PROTECTED]>
> Data: Tue, 06 Apr 2004 11:29:21 -0600
> Para: <[EMAIL PROTECTED]>
> Assunto: Re: Connection Pooling (How i use...)
> 
> I have yet to see a *good* example of how to do jdbc on the net. 
> 
> Most are very simple one-off "throws SQLException" examples that don't
> seem to take into consideration little things like stability and
> releasing resources. :)
> 
> That is why I think tools like iBATIS are so powerful - you get all the
> power of JDBC without the pain.
> 
> Larry
> 
> >>> [EMAIL PROTECTED] 04/06/04 11:15 AM >>>
> Now I am closing the connection in the finally block.
> The exemple...
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

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



Connection Pooling - Monitor

2004-04-06 Thread Marcelo Epstein

Is it possible to know how many connection are in the pool ? Is there any monitor 
available?


On Tue,  6 Apr 2004 14:15:34 -0300, "Marcelo Epstein" <[EMAIL PROTECTED]> escreveu:

> De: "Marcelo Epstein" <[EMAIL PROTECTED]>
> Data: Tue,  6 Apr 2004 14:15:34 -0300
> Para: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Assunto: Re: Connection Pooling (How i use...)
> 
> Now I am closing the connection in the finally block.
> The exemple provided by:
> http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
> doesn´t do that:
> package foo;
> 
> import javax.naming.*;
> import javax.sql.*;
> import java.sql.*;
> 
> public class DBTest {
> 
>   String foo = "Not Connected";
>   int bar = -1;
> 
>   public void init() {
> try{
>   Context ctx = new InitialContext();
>   if(ctx == null ) 
>   throw new Exception("Boom - No Context");
> 
>   DataSource ds = 
> (DataSource)ctx.lookup(
>"java:comp/env/jdbc/TestDB");
> 
>   if (ds != null) {
> Connection conn = ds.getConnection();
>   
> if(conn != null)  {
> foo = "Got Connection "+conn.toString();
> Statement stmt = conn.createStatement();
> ResultSet rst = 
> stmt.executeQuery(
>   "select id, foo, bar from testdata");
> if(rst.next()) {
>foo=rst.getString(2);
>bar=rst.getInt(3);
> }
> conn.close();
> }
>   }
> }catch(Exception e) {
>   e.printStackTrace();
> }
>  }
> 
>  public String getFoo() { return foo; }
>  public int getBar() { return bar;}
> }
> 
> 
> 
> 
> On Tue, 06 Apr 2004 12:50:29 -0400, "Geeta Ramani" <[EMAIL PROTECTED]> escreveu:
> 
> > De: "Geeta Ramani" <[EMAIL PROTECTED]>
> > Data: Tue, 06 Apr 2004 12:50:29 -0400
> > Para: Struts Users Mailing List <[EMAIL PROTECTED]>
> > Assunto: Re: Connection Pooling (How i use...)
> > 
> > This your problem: closing the connection in your try block. Move it to a finally 
> > block..
> > 
> > Marcelo Epstein wrote:
> > 
> > > I use the pool like this: (IS IT WRONG??) I think the connection is being 
> > > closed..
> > >
> > > try {
> > > Context ctx = new InitialContext();
> > > if (ctx == null)
> > >   throw new Exception("Boom - No Context");
> > >
> > >   DataSource ds = (DataSource) 
> > > ctx.lookup("java:comp/env/jdbc/EasyDB");
> > >
> > >   if (ds != null) {
> > > Connection conn = ds.getConnection();
> > > if (conn != null) {
> > > Statement stmt = conn.createStatement();
> > > String query ="Any query";
> > > ResultSet rs = stmt.executeQuery(query);
> > > while (rs.next()) {
> > >   "Use ResulSet"
> > >
> > > }
> > > stmt.close();
> > > conn.close();
> > > }
> > > }
> > > } catch (Exception ex) {
> > > System.out.println(ex.toString());
> > > }
> > >
> > > On Tue, 06 Apr 2004 10:19:15 -0600, "Larry Meadors" <[EMAIL PROTECTED]> escreveu:
> > >
> > > > De: "Larry Meadors" <[EMAIL PROTECTED]>
> > > > Data: Tue, 06 Apr 2004 10:19:15 -0600
> > > > Para: <[EMAIL PROTECTED]>
> > > > Assunto: Re: Connection Pooling
> > > >
> > > > My bet is on a connection leak - you open one in a try block and don't close 
> > > > it in the finally block.
> > > >
> > > > >>> [EMAIL PROTECTED] 04/06/04 10:08 AM >>>
> > > > Hi,
> > > >
> > > > I have just started using Connection Pooling in my app  (Tomcat, Struts, DBCP, 
> > > > Mysql) .
> > > > It woks for about 20 hours and stop working until tomcat restart.
> > > >
> > > > I get this exception:
> > > >
> > > > org.apache.commons.dbcp.SQLNestedException: Cannot get a co

Re: Connection Pooling (How i use...)

2004-04-06 Thread Marcelo Epstein
Now I am closing the connection in the finally block.
The exemple provided by:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
doesn´t do that:
package foo;

import javax.naming.*;
import javax.sql.*;
import java.sql.*;

public class DBTest {

  String foo = "Not Connected";
  int bar = -1;

  public void init() {
try{
  Context ctx = new InitialContext();
  if(ctx == null ) 
  throw new Exception("Boom - No Context");

  DataSource ds = 
(DataSource)ctx.lookup(
   "java:comp/env/jdbc/TestDB");

  if (ds != null) {
Connection conn = ds.getConnection();
  
if(conn != null)  {
foo = "Got Connection "+conn.toString();
Statement stmt = conn.createStatement();
ResultSet rst = 
stmt.executeQuery(
  "select id, foo, bar from testdata");
if(rst.next()) {
   foo=rst.getString(2);
   bar=rst.getInt(3);
}
conn.close();
}
  }
}catch(Exception e) {
  e.printStackTrace();
}
 }

 public String getFoo() { return foo; }
 public int getBar() { return bar;}
}




On Tue, 06 Apr 2004 12:50:29 -0400, "Geeta Ramani" <[EMAIL PROTECTED]> escreveu:

> De: "Geeta Ramani" <[EMAIL PROTECTED]>
> Data: Tue, 06 Apr 2004 12:50:29 -0400
> Para: Struts Users Mailing List <[EMAIL PROTECTED]>
> Assunto: Re: Connection Pooling (How i use...)
> 
> This your problem: closing the connection in your try block. Move it to a finally 
> block..
> 
> Marcelo Epstein wrote:
> 
> > I use the pool like this: (IS IT WRONG??) I think the connection is being closed..
> >
> > try {
> > Context ctx = new InitialContext();
> > if (ctx == null)
> >   throw new Exception("Boom - No Context");
> >
> >   DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/EasyDB");
> >
> >   if (ds != null) {
> > Connection conn = ds.getConnection();
> > if (conn != null) {
> > Statement stmt = conn.createStatement();
> > String query ="Any query";
> > ResultSet rs = stmt.executeQuery(query);
> > while (rs.next()) {
> >   "Use ResulSet"
> >
> > }
> > stmt.close();
> > conn.close();
> > }
> > }
> > } catch (Exception ex) {
> > System.out.println(ex.toString());
> > }
> >
> > On Tue, 06 Apr 2004 10:19:15 -0600, "Larry Meadors" <[EMAIL PROTECTED]> escreveu:
> >
> > > De: "Larry Meadors" <[EMAIL PROTECTED]>
> > > Data: Tue, 06 Apr 2004 10:19:15 -0600
> > > Para: <[EMAIL PROTECTED]>
> > > Assunto: Re: Connection Pooling
> > >
> > > My bet is on a connection leak - you open one in a try block and don't close it 
> > > in the finally block.
> > >
> > > >>> [EMAIL PROTECTED] 04/06/04 10:08 AM >>>
> > > Hi,
> > >
> > > I have just started using Connection Pooling in my app  (Tomcat, Struts, DBCP, 
> > > Mysql) .
> > > It woks for about 20 hours and stop working until tomcat restart.
> > >
> > > I get this exception:
> > >
> > > org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool 
> > > exhausted, cause:
> > > java.util.NoSuchElementException: Timeout waiting for idle object
> > >
> > > I canÌ t fix it. Any advice??
> > >
> > > Thanks in advance.
> > > Marcelo
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > > -
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

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



Re: Connection Pooling

2004-04-06 Thread Marcelo Epstein
Mark, 

I am using Mysql Driver version 3. What´s the problem of this "stable" driver. ?? 
I will give a try version 2. But I really cant understand why..

Thanks...

 


On Tue, 6 Apr 2004 18:20:29 +0200, Mark Lowe <[EMAIL PROTECTED]> escreveu:

> De: Mark Lowe <[EMAIL PROTECTED]>
> Data: Tue, 6 Apr 2004 18:20:29 +0200
> Para: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Assunto: Re: Connection Pooling
> 
> If your using the version 3 mysql driver don't.. Use version 2 and 
> never look back.
> 
> There also a ?autoReconnect=true parameter to pass through with the 
> url, but i think thats bollocks or at least didn't work with version3 
> mysql drivers.
> 
> On 6 Apr 2004, at 18:08, Marcelo Epstein wrote:
> 
> > Hi,
> >
> > I have just started using Connection Pooling in my app  (Tomcat, 
> > Struts, DBCP, Mysql) .
> > It woks for about 20 hours and stop working until tomcat restart.
> >
> > I get this exception:
> >
> > org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, 
> > pool exhausted, cause:
> > java.util.NoSuchElementException: Timeout waiting for idle object
> >
> > I can´t fix it. Any advice??
> >
> > Thanks in advance.
> > Marcelo
> >
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

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



Re: Connection Pooling (How i use...)

2004-04-06 Thread Marcelo Epstein
I use the pool like this: (IS IT WRONG??) I think the connection is being closed..

try {
Context ctx = new InitialContext();
if (ctx == null)
  throw new Exception("Boom - No Context");

  DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/EasyDB");

  if (ds != null) {
Connection conn = ds.getConnection();
if (conn != null) {
Statement stmt = conn.createStatement();
String query ="Any query";
ResultSet rs = stmt.executeQuery(query);
while (rs.next()) {
  "Use ResulSet"

}
stmt.close();
conn.close();
}
}
} catch (Exception ex) {
System.out.println(ex.toString());
}


On Tue, 06 Apr 2004 10:19:15 -0600, "Larry Meadors" <[EMAIL PROTECTED]> escreveu:

> De: "Larry Meadors" <[EMAIL PROTECTED]>
> Data: Tue, 06 Apr 2004 10:19:15 -0600
> Para: <[EMAIL PROTECTED]>
> Assunto: Re: Connection Pooling
> 
> My bet is on a connection leak - you open one in a try block and don't close it in 
> the finally block.
> 
> >>> [EMAIL PROTECTED] 04/06/04 10:08 AM >>>
> Hi,
> 
> I have just started using Connection Pooling in my app  (Tomcat, Struts, DBCP, 
> Mysql) .
> It woks for about 20 hours and stop working until tomcat restart. 
> 
> I get this exception:
> 
> org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, 
> cause:
> java.util.NoSuchElementException: Timeout waiting for idle object
> 
> I canÌ t fix it. Any advice??
> 
> Thanks in advance.
> Marcelo
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

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



Connection Pooling

2004-04-06 Thread Marcelo Epstein
Hi,

I have just started using Connection Pooling in my app  (Tomcat, Struts, DBCP, Mysql) .
It woks for about 20 hours and stop working until tomcat restart. 

I get this exception:

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted, 
cause:
java.util.NoSuchElementException: Timeout waiting for idle object

I can´t fix it. Any advice??

Thanks in advance.
Marcelo



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



Dealing with large ResultSets??

2004-03-29 Thread Marcelo Epstein
Hi,
How can I get more than 1000 rows of a table.
I am using display tag and I really don´t want 1000+ Objects.
What is the best practice to do that?
Does ORM models like Hibernate, Ibatis and others can help me?

Thanks in advance.
Matiro.




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