RE: RowSetDynaClass

2004-06-14 Thread Rajat Pandit, Gurgaon
just one more passing thought, I was wondering if there was some way to make
the SQL generic for all databases? (or is it not feasible). This seems to be
specific for oracle? Do correct me If I am wrong.
rajat

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:44 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass


My PagedTableBean constructor looks like the following:

public PagedTableBean(Connection conn, 
  String sql,
long pageNumber,
long pageSize)
throws PagedTableException
{
this.pageNumber = pageNumber;
this.pageSize   = pageSize;
this.conn   = conn;
this.sql= sql;

populateBean();
}

private void populateBean()
throws PagedTableException
{
long startRow = (((pageNumber-1)*pageSize)+1);
long endRow   = (pageNumber*pageSize);

String q = "SELECT * FROM (SELECT ROWNUM ROWNO, Q.* "
   + "FROM (" + sql + ") Q WHERE ROWNUM <= "
   + endRow + ") WHERE ROWNO >= " + startRow;

try {
PreparedStatement ps = conn.prepareStatement(q);
ResultSet rs = ps.executeQuery();
rows = new RowSetDynaClass(rs,true);
rs.close();
ps.close();
}
catch(SQLException e) {
throw new PagedTableException(e.getMessage());
}
}

public Collection getRows() {
return((Collection)rows.getRows());
}

It was that simple :-)  And now anytime I need paging done, I simply store
in my form the page number and size and pass those into my action which
instantiates this request bean each time, executes the query and returns the
subset of data in the request scope to the forwarded JSP.  Since the action
my form posts to drives what the return data would be since that is where we
keep our "business logic", this will work well and apply anywhere we need
this technique.

I also got fancy and added a few helper methods to this PagedTableBean class
to give me quick access to the current page number, whether a prev/next page
exists, as well as a method called getSize() that issues a "SELECT COUNT(1)
FROM (" + sql + ")" call to the database to get the number of total records.
This way, I can easily show something like:

  [<<] 100-150 of 7532 records [>>]

Let me know if you have any questions!
Chris


-Original Message-
From: Rajat Pandit, Gurgaon [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 1:54 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass


Hey Chris,
This seems like a pretty neat solution you have out here, could please
explain this, as pagination stuff is kind of the most complicated things
that I have to deal with and I see my self coding the same thing again and
again over a period of time. I would really appreciate your time and effort.
Thanks in adv. rajat

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass

Found the answer ;-) ... Avoid the  tags all together and stick with
the standard struts tags.  The following worked:


   -  

Now have a fast, efficient paging mechanism that permits me to pass in a
database connection object, the sql query to execute, starting page # and
size and it handles the rest by populating itself from the database, closing
the resultset when finished and leaves the presentation part up to my JSP as
above!

Gotta love struts!
Chris

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 12:35 AM
To: '[EMAIL PROTECTED]'
Subject: RowSetDynaClass


I am storing a RowSetDynaClass property in my java class and I have
implemented a method on my class as follows:

public Collection getRows() {
  return((Collection)rsdc.getRows());
}

In my action, I store my custom class object reference as follows:
  request.setAttribute("results", myResultsObj);

Then in my jsp, I do the following:
  
  
.  -

  

I get the following error:
[ServletException in:/pages/test-body.jsp]
An error occurred while evaluating custom action attribute "value" with
value "${row.item_id}": Unable to find a value for "item_id" in object of
class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null)

Can someone tell me what I am doing wrong here and how I can do this
properly to get it to work?

___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [EMAIL PROTECTED]


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

--

RE: Internationalization support in Tiles

2004-06-14 Thread Suresh S

Thanx joe , so its something like this i may be reusing a particular
layout again and again like the footer ,menu,.. etc but the original
body content may vary now instead of defining the html  tag in
each of the body pages is there any way we could do it from tiles (i
mean from tile-definitions.xml) by defining the key in the xml and to
later use bundle to extract the title .And also 



  
  
  
  


There is one more property in this
 so what is the use of this the 
book
says that

"There is an additional parameter, not shown, called definitions-factory-class. You 
can create a custom definitions factory and supply the class name here.
 The default is org.apache.struts.tiles.xmlDefinition.I18NfactorySet."

does it how anything to do with I18n ?


Thanks
Suresh S

On Tue, 2004-06-15 at 11:54, Joe Hertz wrote:

> Assuming you understand how Struts deals with internationalization
> issues, and tiles here...
> 
> What sort of things are you looking to see demonstrated?
> 
> I'm doing just this, and I find that there isn't anything I really need
> that is specific to tiles. Your tiles deal with the i18n issues as if
> they weren't tiles at all. 
> 
> About the only concession I make to i18n with tiles is that I try to
> avoid specifying string attributes in the tiles-config.xml.
> 
> -Joe
> 
> > -Original Message-
> > From: Suresh S [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, June 15, 2004 2:15 AM
> > To: Struts Users Mailing List
> > Subject: Internationalization support in Tiles
> > 
> > 
> > hi all,
> > I have seen in books that struts plug in 'tiles' support 
> > internationalization but i couldn't get any nick of example 
> > on this one.It would be great if i could have a piece of code 
> > to explain on this .Any URl's explaining on this would be great .
> > 
> > Thanx
> > Suresh S
> > 
> > 
> > 
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


RE: RowSetDynaClass

2004-06-14 Thread Rajat Pandit, Gurgaon
Hey Chris,
Thanks a lot for the detailed information. I have just one more issue, I
have used the RowSetDynaClass (beanutils.jar) and I had this issue where I
couldn't control the position of the column numbers as in the 2 column in
the sql could be anywhere in the resultset returned. I was passing the
collection object back to the display tag. Maybe it internally stores the
metadata information in a Map, or is it something wrong with my
understanding.
Do let me know if you have had any such issues before?
Regards
rajat

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:46 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass


The PagedTableAction class I'm using don't do any client-side or JVM caching
because the data could change relatively quickly depending on the nature of
our business.  Thus, for us, letting the database handle the "subset" rownum
limits works well and is very efficient.  Right now I can return any subset
of data from a table that contains over 75000 records within < 2 seconds ..
And that's on pagesize ~ 100/150 or so.

Take care,
chris

-Original Message-
From: Rajat Pandit, Gurgaon [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 2:10 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass


Hey navjot,
Thanks for the inputs(any pointers to the documentations (URL) would again
be of great help) I have been pretty happy using the display tag, for small
record sets (about 12000 or so) but I needed something more in case I needed
to customize the pagination stuff. Like caching stuff etc. 
Any pointers?
Rajat
(OT (only for navjot) ps: any clue where amit malhotra is these days?)


-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:38 AM
To: Struts Users Mailing List
Subject: Re: RowSetDynaClass

if that was really a problem for you, then there could any/both of 2 
reasons.

1. You never used ValueListHandler pattern.
2. You never had used any pager taglib.

and Chris, you could also look into *sql* JSTL that can help you doing 
what you want. And probabaly i recommend using this only for quick 
reports generation.




Rajat Pandit, Gurgaon wrote:

> Hey Chris,
> This seems like a pretty neat solution you have out here, could please 
> explain this, as pagination stuff is kind of the most complicated 
> things that I have to deal with and I see my self coding the same 
> thing again and again over a period of time. I would really appreciate 
> your time and effort. Thanks in adv.
> rajat
> 
> -Original Message-
> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 11:17 AM
> To: 'Struts Users Mailing List'
> Subject: RE: RowSetDynaClass
> 
> Found the answer ;-) ... Avoid the  tags all together and stick
with
> the standard struts tags.  The following worked:
> 
>  indexId="rowid">
>-  name="row" property="item_product_number"/> 
> 
> Now have a fast, efficient paging mechanism that permits me to pass in 
> a database connection object, the sql query to execute, starting page 
> # and size and it handles the rest by populating itself from the 
> database,
closing
> the resultset when finished and leaves the presentation part up to my 
> JSP
as
> above!
> 
> Gotta love struts!
> Chris
> 
> -Original Message-
> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 12:35 AM
> To: '[EMAIL PROTECTED]'
> Subject: RowSetDynaClass
> 
> 
> I am storing a RowSetDynaClass property in my java class and I have 
> implemented a method on my class as follows:
> 
> public Collection getRows() {
>   return((Collection)rsdc.getRows());
> }
> 
> In my action, I store my custom class object reference as follows:
>   request.setAttribute("results", myResultsObj);
> 
> Then in my jsp, I do the following:
>   
>   
> .  
> - 
>   
> 
> I get the following error:
> [ServletException in:/pages/test-body.jsp]
> An error occurred while evaluating custom action attribute "value" 
> with value "${row.item_id}": Unable to find a value for "item_id" in 
> object of class "org.apache.commons.beanutils.BasicDynaBean" using 
> operator "."
(null)
> 
> Can someone tell me what I am doing wrong here and how I can do this 
> properly to get it to work?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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: Internationalization support in Tiles

2004-06-14 Thread Joe Hertz
Assuming you understand how Struts deals with internationalization
issues, and tiles here...

What sort of things are you looking to see demonstrated?

I'm doing just this, and I find that there isn't anything I really need
that is specific to tiles. Your tiles deal with the i18n issues as if
they weren't tiles at all. 

About the only concession I make to i18n with tiles is that I try to
avoid specifying string attributes in the tiles-config.xml.

-Joe

> -Original Message-
> From: Suresh S [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 15, 2004 2:15 AM
> To: Struts Users Mailing List
> Subject: Internationalization support in Tiles
> 
> 
> hi all,
> I have seen in books that struts plug in 'tiles' support 
> internationalization but i couldn't get any nick of example 
> on this one.It would be great if i could have a piece of code 
> to explain on this .Any URl's explaining on this would be great .
> 
> Thanx
> Suresh S
> 
> 
> 



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



Re: RowSetDynaClass

2004-06-14 Thread Navjot Singh
http://www.onjava.com/pub/a/pub/a/onjava/2002/05/08/jstl.html?page=3
http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html
http://java.sun.com/blueprints/patterns/ValueListHandler.html
IMO, keep caching decoupled from pagination.
navjot
ps : with polaris. btw, do i know you?
Rajat Pandit, Gurgaon wrote:
Hey navjot,
Thanks for the inputs(any pointers to the documentations (URL) would again
be of great help) I have been pretty happy using the display tag, for small
record sets (about 12000 or so) but I needed something more in case I needed
to customize the pagination stuff. Like caching stuff etc. 
Any pointers?
Rajat
(OT (only for navjot) ps: any clue where amit malhotra is these days?)

-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:38 AM
To: Struts Users Mailing List
Subject: Re: RowSetDynaClass

if that was really a problem for you, then there could any/both of 2 
reasons.

1. You never used ValueListHandler pattern.
2. You never had used any pager taglib.
and Chris, you could also look into *sql* JSTL that can help you doing 
what you want. And probabaly i recommend using this only for quick 
reports generation.


Rajat Pandit, Gurgaon wrote:

Hey Chris,
This seems like a pretty neat solution you have out here, could please
explain this, as pagination stuff is kind of the most complicated things
that I have to deal with and I see my self coding the same thing again and
again over a period of time.
I would really appreciate your time and effort.
Thanks in adv.
rajat
-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass

Found the answer ;-) ... Avoid the  tags all together and stick
with
the standard struts tags.  The following worked:

  - 

Now have a fast, efficient paging mechanism that permits me to pass in a
database connection object, the sql query to execute, starting page # and
size and it handles the rest by populating itself from the database,
closing
the resultset when finished and leaves the presentation part up to my JSP
as
above!
Gotta love struts!
Chris
-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 12:35 AM
To: '[EMAIL PROTECTED]'
Subject: RowSetDynaClass

I am storing a RowSetDynaClass property in my java class and I have
implemented a method on my class as follows:
public Collection getRows() {
 return((Collection)rsdc.getRows());
}
In my action, I store my custom class object reference as follows:
 request.setAttribute("results", myResultsObj);
Then in my jsp, I do the following:
 
 
   .  -

 
I get the following error:
[ServletException in:/pages/test-body.jsp]
An error occurred while evaluating custom action attribute "value" with
value "${row.item_id}": Unable to find a value for "item_id" in object of
class "org.apache.commons.beanutils.BasicDynaBean" using operator "."
(null)
Can someone tell me what I am doing wrong here and how I can do this
properly to get it to work?
___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [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]
.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: RowSetDynaClass

2004-06-14 Thread CRANFORD, CHRIS

The PagedTableAction class I'm using don't do any client-side or JVM caching
because the data could change relatively quickly depending on the nature of
our business.  Thus, for us, letting the database handle the "subset" rownum
limits works well and is very efficient.  Right now I can return any subset
of data from a table that contains over 75000 records within < 2 seconds ..
And that's on pagesize ~ 100/150 or so.

Take care,
chris

-Original Message-
From: Rajat Pandit, Gurgaon [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 2:10 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass


Hey navjot,
Thanks for the inputs(any pointers to the documentations (URL) would again
be of great help) I have been pretty happy using the display tag, for small
record sets (about 12000 or so) but I needed something more in case I needed
to customize the pagination stuff. Like caching stuff etc. 
Any pointers?
Rajat
(OT (only for navjot) ps: any clue where amit malhotra is these days?)


-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:38 AM
To: Struts Users Mailing List
Subject: Re: RowSetDynaClass

if that was really a problem for you, then there could any/both of 2 
reasons.

1. You never used ValueListHandler pattern.
2. You never had used any pager taglib.

and Chris, you could also look into *sql* JSTL that can help you doing 
what you want. And probabaly i recommend using this only for quick 
reports generation.




Rajat Pandit, Gurgaon wrote:

> Hey Chris,
> This seems like a pretty neat solution you have out here, could please 
> explain this, as pagination stuff is kind of the most complicated 
> things that I have to deal with and I see my self coding the same 
> thing again and again over a period of time. I would really appreciate 
> your time and effort. Thanks in adv.
> rajat
> 
> -Original Message-
> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 11:17 AM
> To: 'Struts Users Mailing List'
> Subject: RE: RowSetDynaClass
> 
> Found the answer ;-) ... Avoid the  tags all together and stick
with
> the standard struts tags.  The following worked:
> 
>  indexId="rowid">
>-  name="row" property="item_product_number"/> 
> 
> Now have a fast, efficient paging mechanism that permits me to pass in 
> a database connection object, the sql query to execute, starting page 
> # and size and it handles the rest by populating itself from the 
> database,
closing
> the resultset when finished and leaves the presentation part up to my 
> JSP
as
> above!
> 
> Gotta love struts!
> Chris
> 
> -Original Message-
> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 12:35 AM
> To: '[EMAIL PROTECTED]'
> Subject: RowSetDynaClass
> 
> 
> I am storing a RowSetDynaClass property in my java class and I have 
> implemented a method on my class as follows:
> 
> public Collection getRows() {
>   return((Collection)rsdc.getRows());
> }
> 
> In my action, I store my custom class object reference as follows:
>   request.setAttribute("results", myResultsObj);
> 
> Then in my jsp, I do the following:
>   
>   
> .  
> - 
>   
> 
> I get the following error:
> [ServletException in:/pages/test-body.jsp]
> An error occurred while evaluating custom action attribute "value" 
> with value "${row.item_id}": Unable to find a value for "item_id" in 
> object of class "org.apache.commons.beanutils.BasicDynaBean" using 
> operator "."
(null)
> 
> Can someone tell me what I am doing wrong here and how I can do this 
> properly to get it to work?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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]


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



RE: RowSetDynaClass

2004-06-14 Thread CRANFORD, CHRIS

My PagedTableBean constructor looks like the following:

public PagedTableBean(Connection conn, 
  String sql,
long pageNumber,
long pageSize)
throws PagedTableException
{
this.pageNumber = pageNumber;
this.pageSize   = pageSize;
this.conn   = conn;
this.sql= sql;

populateBean();
}

private void populateBean()
throws PagedTableException
{
long startRow = (((pageNumber-1)*pageSize)+1);
long endRow   = (pageNumber*pageSize);

String q = "SELECT * FROM (SELECT ROWNUM ROWNO, Q.* "
   + "FROM (" + sql + ") Q WHERE ROWNUM <= "
   + endRow + ") WHERE ROWNO >= " + startRow;

try {
PreparedStatement ps = conn.prepareStatement(q);
ResultSet rs = ps.executeQuery();
rows = new RowSetDynaClass(rs,true);
rs.close();
ps.close();
}
catch(SQLException e) {
throw new PagedTableException(e.getMessage());
}
}

public Collection getRows() {
return((Collection)rows.getRows());
}

It was that simple :-)  And now anytime I need paging done, I simply store
in my form the page number and size and pass those into my action which
instantiates this request bean each time, executes the query and returns the
subset of data in the request scope to the forwarded JSP.  Since the action
my form posts to drives what the return data would be since that is where we
keep our "business logic", this will work well and apply anywhere we need
this technique.

I also got fancy and added a few helper methods to this PagedTableBean class
to give me quick access to the current page number, whether a prev/next page
exists, as well as a method called getSize() that issues a "SELECT COUNT(1)
FROM (" + sql + ")" call to the database to get the number of total records.
This way, I can easily show something like:

  [<<] 100-150 of 7532 records [>>]

Let me know if you have any questions!
Chris


-Original Message-
From: Rajat Pandit, Gurgaon [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 1:54 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass


Hey Chris,
This seems like a pretty neat solution you have out here, could please
explain this, as pagination stuff is kind of the most complicated things
that I have to deal with and I see my self coding the same thing again and
again over a period of time. I would really appreciate your time and effort.
Thanks in adv. rajat

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass

Found the answer ;-) ... Avoid the  tags all together and stick with
the standard struts tags.  The following worked:


   -  

Now have a fast, efficient paging mechanism that permits me to pass in a
database connection object, the sql query to execute, starting page # and
size and it handles the rest by populating itself from the database, closing
the resultset when finished and leaves the presentation part up to my JSP as
above!

Gotta love struts!
Chris

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 12:35 AM
To: '[EMAIL PROTECTED]'
Subject: RowSetDynaClass


I am storing a RowSetDynaClass property in my java class and I have
implemented a method on my class as follows:

public Collection getRows() {
  return((Collection)rsdc.getRows());
}

In my action, I store my custom class object reference as follows:
  request.setAttribute("results", myResultsObj);

Then in my jsp, I do the following:
  
  
.  -

  

I get the following error:
[ServletException in:/pages/test-body.jsp]
An error occurred while evaluating custom action attribute "value" with
value "${row.item_id}": Unable to find a value for "item_id" in object of
class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null)

Can someone tell me what I am doing wrong here and how I can do this
properly to get it to work?

___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [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]



Internationalization support in Tiles

2004-06-14 Thread Suresh S
hi all,
I have seen in books that struts plug in 'tiles' support
internationalization but i couldn't get any nick of example on this
one.It would be great if i could have a piece of code to explain on this
.Any URl's explaining on this would be great .

Thanx
Suresh S




RE: RowSetDynaClass

2004-06-14 Thread Rajat Pandit, Gurgaon
Hey navjot,
Thanks for the inputs(any pointers to the documentations (URL) would again
be of great help) I have been pretty happy using the display tag, for small
record sets (about 12000 or so) but I needed something more in case I needed
to customize the pagination stuff. Like caching stuff etc. 
Any pointers?
Rajat
(OT (only for navjot) ps: any clue where amit malhotra is these days?)


-Original Message-
From: Navjot Singh [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:38 AM
To: Struts Users Mailing List
Subject: Re: RowSetDynaClass

if that was really a problem for you, then there could any/both of 2 
reasons.

1. You never used ValueListHandler pattern.
2. You never had used any pager taglib.

and Chris, you could also look into *sql* JSTL that can help you doing 
what you want. And probabaly i recommend using this only for quick 
reports generation.




Rajat Pandit, Gurgaon wrote:

> Hey Chris,
> This seems like a pretty neat solution you have out here, could please
> explain this, as pagination stuff is kind of the most complicated things
> that I have to deal with and I see my self coding the same thing again and
> again over a period of time.
> I would really appreciate your time and effort.
> Thanks in adv.
> rajat
> 
> -Original Message-
> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 15, 2004 11:17 AM
> To: 'Struts Users Mailing List'
> Subject: RE: RowSetDynaClass
> 
> Found the answer ;-) ... Avoid the  tags all together and stick
with
> the standard struts tags.  The following worked:
> 
>  indexId="rowid">
>-  property="item_product_number"/>
> 
> 
> Now have a fast, efficient paging mechanism that permits me to pass in a
> database connection object, the sql query to execute, starting page # and
> size and it handles the rest by populating itself from the database,
closing
> the resultset when finished and leaves the presentation part up to my JSP
as
> above!
> 
> Gotta love struts!
> Chris
> 
> -Original Message-
> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, June 15, 2004 12:35 AM
> To: '[EMAIL PROTECTED]'
> Subject: RowSetDynaClass
> 
> 
> I am storing a RowSetDynaClass property in my java class and I have
> implemented a method on my class as follows:
> 
> public Collection getRows() {
>   return((Collection)rsdc.getRows());
> }
> 
> In my action, I store my custom class object reference as follows:
>   request.setAttribute("results", myResultsObj);
> 
> Then in my jsp, I do the following:
>   
>   
> .  -
> 
>   
> 
> I get the following error:
> [ServletException in:/pages/test-body.jsp]
> An error occurred while evaluating custom action attribute "value" with
> value "${row.item_id}": Unable to find a value for "item_id" in object of
> class "org.apache.commons.beanutils.BasicDynaBean" using operator "."
(null)
> 
> Can someone tell me what I am doing wrong here and how I can do this
> properly to get it to work?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
> Email: [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: RowSetDynaClass

2004-06-14 Thread Navjot Singh
if that was really a problem for you, then there could any/both of 2 
reasons.

1. You never used ValueListHandler pattern.
2. You never had used any pager taglib.
and Chris, you could also look into *sql* JSTL that can help you doing 
what you want. And probabaly i recommend using this only for quick 
reports generation.


Rajat Pandit, Gurgaon wrote:
Hey Chris,
This seems like a pretty neat solution you have out here, could please
explain this, as pagination stuff is kind of the most complicated things
that I have to deal with and I see my self coding the same thing again and
again over a period of time.
I would really appreciate your time and effort.
Thanks in adv.
rajat
-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass

Found the answer ;-) ... Avoid the  tags all together and stick with
the standard struts tags.  The following worked:

   - 

Now have a fast, efficient paging mechanism that permits me to pass in a
database connection object, the sql query to execute, starting page # and
size and it handles the rest by populating itself from the database, closing
the resultset when finished and leaves the presentation part up to my JSP as
above!
Gotta love struts!
Chris
-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 12:35 AM
To: '[EMAIL PROTECTED]'
Subject: RowSetDynaClass

I am storing a RowSetDynaClass property in my java class and I have
implemented a method on my class as follows:
public Collection getRows() {
  return((Collection)rsdc.getRows());
}
In my action, I store my custom class object reference as follows:
  request.setAttribute("results", myResultsObj);
Then in my jsp, I do the following:
  
  
.  -

  
I get the following error:
[ServletException in:/pages/test-body.jsp]
An error occurred while evaluating custom action attribute "value" with
value "${row.item_id}": Unable to find a value for "item_id" in object of
class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null)
Can someone tell me what I am doing wrong here and how I can do this
properly to get it to work?
___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [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: RowSetDynaClass

2004-06-14 Thread Rajat Pandit, Gurgaon
Hey Chris,
This seems like a pretty neat solution you have out here, could please
explain this, as pagination stuff is kind of the most complicated things
that I have to deal with and I see my self coding the same thing again and
again over a period of time.
I would really appreciate your time and effort.
Thanks in adv.
rajat

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 11:17 AM
To: 'Struts Users Mailing List'
Subject: RE: RowSetDynaClass

Found the answer ;-) ... Avoid the  tags all together and stick with
the standard struts tags.  The following worked:


   - 


Now have a fast, efficient paging mechanism that permits me to pass in a
database connection object, the sql query to execute, starting page # and
size and it handles the rest by populating itself from the database, closing
the resultset when finished and leaves the presentation part up to my JSP as
above!

Gotta love struts!
Chris

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 12:35 AM
To: '[EMAIL PROTECTED]'
Subject: RowSetDynaClass


I am storing a RowSetDynaClass property in my java class and I have
implemented a method on my class as follows:

public Collection getRows() {
  return((Collection)rsdc.getRows());
}

In my action, I store my custom class object reference as follows:
  request.setAttribute("results", myResultsObj);

Then in my jsp, I do the following:
  
  
.  -

  

I get the following error:
[ServletException in:/pages/test-body.jsp]
An error occurred while evaluating custom action attribute "value" with
value "${row.item_id}": Unable to find a value for "item_id" in object of
class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null)

Can someone tell me what I am doing wrong here and how I can do this
properly to get it to work?

___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [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: RowSetDynaClass

2004-06-14 Thread CRANFORD, CHRIS
Found the answer ;-) ... Avoid the  tags all together and stick with
the standard struts tags.  The following worked:


   - 


Now have a fast, efficient paging mechanism that permits me to pass in a
database connection object, the sql query to execute, starting page # and
size and it handles the rest by populating itself from the database, closing
the resultset when finished and leaves the presentation part up to my JSP as
above!

Gotta love struts!
Chris

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 12:35 AM
To: '[EMAIL PROTECTED]'
Subject: RowSetDynaClass


I am storing a RowSetDynaClass property in my java class and I have
implemented a method on my class as follows:

public Collection getRows() {
  return((Collection)rsdc.getRows());
}

In my action, I store my custom class object reference as follows:
  request.setAttribute("results", myResultsObj);

Then in my jsp, I do the following:
  
  
.  -

  

I get the following error:
[ServletException in:/pages/test-body.jsp]
An error occurred while evaluating custom action attribute "value" with
value "${row.item_id}": Unable to find a value for "item_id" in object of
class "org.apache.commons.beanutils.BasicDynaBean" using operator "." (null)

Can someone tell me what I am doing wrong here and how I can do this
properly to get it to work?

___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [EMAIL PROTECTED]


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



RE: session time out

2004-06-14 Thread Rajat Pandit, Gurgaon
Hello Lokanath,
I am not sure if this is the best way to go about it, but yes maybe you
could give it a shot, in the action where you are checking for the session
object (could be a login bean or something) make sure that you throw a
custom exception and using the global exception handler in the
struts-config.xml you can use GlobalForward to forward it to a particular
page, say a login page or something.
Do tell me if this worked out for you, because I might have to implement it
at a later stage, I am currently documenting the specs for my project.
Regards
rajat


-Original Message-
From: Lokanath [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 9:56 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: session time out

hi all ,

can anyone tell me how to reach a page automatically when session expires in
a stusts application

  lokanath

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 3:04 PM
To: Struts Users Mailing List
Subject: RE: session problem


The servlet container will try to encode this sessionId in a cookie if it
can (saving the need to rewrite links) so you may wish to check the browser
settings to see if cookies are enabled. (Its best to make sure you use the
html:rewrite tag (or equivelent) for your links though so that your app will
support users when they have cookies disabled).

-Original Message-
>From: nikhil walvekar [mailto:[EMAIL PROTECTED]
Sent: Friday, 11 June 2004 17:34
To: Struts Users Mailing List
Subject: Re: session problem


Hi,
same thing i have experienced with IE 6.0, it will work with mozilla
Problem is that with each request session id is not passed.
You need to explicitly pass it as url parameter.
http://dbomis.com/anyLink;jsessionid=A0698B81A1F1AA2B1ECDA19B0ACFD6E2


Nikhil

Shailender Jain <[EMAIL PROTECTED]> wrote:
I am using session object in my application to validate whether the user
is valid or not.

I am doing this in the processPreprocess() method of RequestProcessor.
But in I.E. 6.0 update version: SP1, the session object becomes null.
So once user click at any link in the application he gets logged out.

The system admin has also done the following configuration


1. I installed the application on a machine having the IP
(10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
gave me a DSN "dbomis.com" which can be used to access the
application. This DSN points to virtual IP.
2. Now when i access the application using http://10.1.252.41/ or
"http://10.1.252.42/"; in IE 6.0 SP1 then it works ok.
3. When i use the "http://dbomis.com/"; then the login page come. User
is able to login (processPreprocess() method does not check for
session while user is logging in). But when the user clicks on any
link the session becomes null so the user is logged out of the
application. This problem happens only on I.E. update version SP1.
On I.E 5.5 this url works ok.

Anyone has got any idea why this must be happening






Yahoo! India Matrimony: Find your partner online.


-
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: Strange error message

2004-06-14 Thread Shailender Jain
I think you are using some code
after response.sendRedirect() or doForward() which forward the request to other
page.
The best practice will be to use a return statement after doing the forward.
You should ensure to complete all you business logic before these statements are
used.

"Rajat Pandit, Gurgaon" wrote:

> Hello Scott,
> Yes, this happens when you have already sent the headers to the client and
> then you are trying to re-send the information. This will cause the
> application container to give you this error. Make sure that before you do a
> dispatch no headers have been changed including cookie values etc.
> rajat
>
> -Original Message-
> From: Scott Smith [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 15, 2004 6:56 AM
> To: [EMAIL PROTECTED]
> Subject: Strange error message
>
> Has anyone seen the following error message and know what it means?
>
> "Cannot forward after response has been committed".
>
> I think it's coming out of something called application.dispatcher
> (doForward; line 138).
>
> -
> 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: Strange error message

2004-06-14 Thread Rajat Pandit, Gurgaon
Hello Scott,
Yes, this happens when you have already sent the headers to the client and
then you are trying to re-send the information. This will cause the
application container to give you this error. Make sure that before you do a
dispatch no headers have been changed including cookie values etc.
rajat

-Original Message-
From: Scott Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 15, 2004 6:56 AM
To: [EMAIL PROTECTED]
Subject: Strange error message

Has anyone seen the following error message and know what it means?
 
"Cannot forward after response has been committed".  
 
I think it's coming out of something called application.dispatcher
(doForward; line 138).

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



RE: Cannot Find Bean in Any Scope

2004-06-14 Thread Caroline Jen
I am following your suggestion.  I put my "while" loop
in the  tag, and I have changed 

<%=threadBean.getSender()%>
to 


There is a situation which I do not know how to
handle.
Inside the  tag, I have a line of
code:

<%=SiteUtil.filter( threadBean.getPostTopic(),
false/*html*/, true/*emotion*/, false/*mvnCode*/,
false/*newLine*/, false/*URL*/ )%>

This JSP expression calls a method 'filter' in another
class SiteUtil.java.  And one of the properties
(postTopic) of the threadBean is passed as a parameter
to that method.  

How do I use the  tag in the above JSP
expression?

Thank you in advance.

-Caroline 

--- "CRANFORD, CHRIS" <[EMAIL PROTECTED]>
wrote:
> Why aren't you using the struts taglib framework to
> do this since the bean
> is in the request scope, it makes it a lot easier
> and keeps your JSP code
> very clean.  And to do what I suspect you may be
> trying to do with the "odd"
> variable, you could also use the JSTL core taglib
> like follows:
> 
>  varStatus="idx">
>   
> 
>   <%-- This is odd logic --%>
> 
> 
>   <%-- This is your even logic --%>
>   
>   
>   ...
> 
> 
> See how clean this looks?
> 
> You can also do something simliar with the
>  tag as a
> replacement for the c:forEach core tag; however I'm
> partial to the core JSTL
> library as its very flexible. ;-)
> 
> Unless you can show argument why using a "scriplet"
> is necessary, I believe
> most will continue to suggest the above approach as
> it's a more efficient
> approach.
> 
> Take care,
> Chris
> 
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, June 13, 2004 1:19 PM
> To: Struts Users Mailing List
> Subject: Re: Cannot Find Bean in Any Scope
> 
> 
> Sorry, I still did not explain my code very well.
> 
> I am trying to write out the properties of
> ThreadBean
> in a "while loop" in my JSP:
> 
> <%
> Collection threadRows = ( Collection
> )request.getAttribute( "ThreadBeans" );
> 
> int odd = 0;
>Iterator iterator = threadRows.iterator();
>while( iterator.hasNext() ) 
>{
>   odd = ( odd + 1 )%2;
>   ThreadBean threadBean = ( ThreadBean
> )iterator.next();
> 
>   .
>   .
> 
>   <%=threadBean.getSender()%> > 
>   <%=threadBean.getThreadReplyCount()%> > 
>   <%=threadBean.getThreadViewCount()%> 
>}
> %>
>  
> and the error is that cannot find threadBean in any
> scope.
> 
> ThreadBeans is a collection, which is created in a
> java class that extends Action.  And ThreadBeans are
> passed in a request scope into my JSP.
> 
> ThreadBeans, which is a collection of JavaBean(s). 
> Each of those JavaBean(s) is a ThreadBean with many
> properties to be written out in a loop.  The
> ThreadBean is in a package.
> 
> In my JSP scriplet, I retrieve the collection of
> those
> JavaBean(s) from the request scope.  
> 
> Then, I enter the while loop to write out the
> properties of each of those JavaBean(s).
> 
> What should I do so that my JSP knows threadBean is
> in
> the request scope?
> 
> Thank you.
> 
> -Caroline
> 
> --- Christopher Schultz
> <[EMAIL PROTECTED]> wrote:
> > Caroline,
> > 
> > Wait a second...
> > 
> > > Collection threadRows = ( Collection
> > > )request.getAttribute( "ThreadBeans" );
> > > 
> > > int odd = 0;
> > >Iterator iterator = threadRows.iterator();
> > >while( iterator.hasNext() ) 
> > >{
> > >   odd = ( odd + 1 )%2;
> > >   ThreadBean threadBean = ( ThreadBean
> )iterator.next();
> > > 
> > >   .
> > >}
> > > %>
> > > 
> > > 5. when I tried to write out the properties; for
> > > example:
> > > 
> > > <%=threadBean.getSender()%>
> <%=threadBean.getThreadReplyCount()%>
> > > <%=threadBean.getThreadViewCount()%>
> > 
> > This message doesn't look like it's coming from
> this
> > body of code. Are
> > you mixing scriptlets (as above) with 'bean' tags?
> > 
> > If so, you're mixing apples and oranges, since the
> > bean tag doesn't do
> > anything with "local" variables created by
> scriptlet
> > code.
> > 
> > Are you sure you don't have something like this
> > anywhere:
> > 
> > 
> > 
> > If so, you'll have to put your object into some
> > scope (page or request,
> > maybe) before using it with the bean tags. That's
> a
> > bit sloppy, though, 
> > and I'll recommend again that you stick to using
> the
> > taglibs exclusively 
> > rather than scriptlets.
> > 
> > -chris
> > 
> 
> > ATTACHMENT part 2 application/pgp-signature
> name=signature.asc
> 
> 
> 
> 
>   
>   
> __
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/ 
> 
>
-
> 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 

RowSetDynaClass

2004-06-14 Thread CRANFORD, CHRIS
I am storing a RowSetDynaClass property in my java class and I have
implemented a method on my class as follows:

public Collection getRows() {
  return((Collection)rsdc.getRows());
}

In my action, I store my custom class object reference as follows:
  request.setAttribute("results", myResultsObj);

Then in my jsp, I do the following:
  
  
.  -

  

I get the following error:
[ServletException in:/pages/test-body.jsp]
An error occurred while evaluating custom action attribute "value" with
value "${row.item_id}":
Unable to find a value for "item_id" in object of class
"org.apache.commons.beanutils.BasicDynaBean" using operator "." (null)

Can someone tell me what I am doing wrong here and how I can do this
properly to get it to work?

___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [EMAIL PROTECTED]



session time out

2004-06-14 Thread Lokanath
hi all ,

can anyone tell me how to reach a page automatically when session expires in
a stusts application

  lokanath

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, June 11, 2004 3:04 PM
To: Struts Users Mailing List
Subject: RE: session problem


The servlet container will try to encode this sessionId in a cookie if it
can (saving the need to rewrite links) so you may wish to check the browser
settings to see if cookies are enabled. (Its best to make sure you use the
html:rewrite tag (or equivelent) for your links though so that your app will
support users when they have cookies disabled).

-Original Message-
>From: nikhil walvekar [mailto:[EMAIL PROTECTED]
Sent: Friday, 11 June 2004 17:34
To: Struts Users Mailing List
Subject: Re: session problem


Hi,
same thing i have experienced with IE 6.0, it will work with mozilla
Problem is that with each request session id is not passed.
You need to explicitly pass it as url parameter.
http://dbomis.com/anyLink;jsessionid=A0698B81A1F1AA2B1ECDA19B0ACFD6E2


Nikhil

Shailender Jain <[EMAIL PROTECTED]> wrote:
I am using session object in my application to validate whether the user
is valid or not.

I am doing this in the processPreprocess() method of RequestProcessor.
But in I.E. 6.0 update version: SP1, the session object becomes null.
So once user click at any link in the application he gets logged out.

The system admin has also done the following configuration


1. I installed the application on a machine having the IP
(10.1.252.41). The system admin made a virtual IP (10.1.252.42) and
gave me a DSN "dbomis.com" which can be used to access the
application. This DSN points to virtual IP.
2. Now when i access the application using http://10.1.252.41/ or
"http://10.1.252.42/"; in IE 6.0 SP1 then it works ok.
3. When i use the "http://dbomis.com/"; then the login page come. User
is able to login (processPreprocess() method does not check for
session while user is logging in). But when the user clicks on any
link the session becomes null so the user is logged out of the
application. This problem happens only on I.E. update version SP1.
On I.E 5.5 this url works ok.

Anyone has got any idea why this must be happening






Yahoo! India Matrimony: Find your partner online.


-
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: [OT]Help needed in wring regular expression

2004-06-14 Thread Navjot Singh
but you can achieve your objective in 2 easy regex.
Anyway can you try something like this
(\d(1)[^0])|(\d(1)\d(1)[0-9]{1,3})|(FEW)|(few)|(MANY)|(many)

[EMAIL PROTECTED] wrote:
Hi,
Web page contains a text box can accept only maximum of four digits and it
can be integers/String(accepts only "many","MANY") if enter a single integer
value it should not be 0(zero) and 0(zero) can be entered subsequently after
first non-zero integer and totally 4 digit maximum. 

I tried using "(\d(1)?[1-9]{1,4})|(FEW)|(few)|(MANY)|(many)" to avoid
entering 0 as first value but it fails if we enter "00","000""" + I
could not restrict the size to be 4 digit max when I tried to enter more
than a digit.
Can anybody help me to write regular expression for the above conditions or
any sample example code for the above case or any suggestions.
Thanks in advance.
-Ram
-
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: [OT] A first look at Spring vs Struts

2004-06-14 Thread Nick Heudecker
Rick:
I've seen 'rogue' developers do remarkably stupid things with Struts and 
Spring, as well as numerous other frameworks.  The best framework in the 
world can't save your project from an apathetic developer. :)

Rick Reumann wrote:
Martin Gainty wrote:
funky things in Action execute methods ?
please describe..

Well you can do almost anything in there since you're in a servlet, so 
you can totally break Struts concepts. You can do redirects (when you 
shouldn't) you could not use a Form bean to capture properties, you can 
do business logic in there when you shouldn't. You can make new 
instances of ActionForms and put them in Session scope - point is you 
can do anything you want, so if you have some developers on your team 
that aren't following best practices, they could potentially make parts 
of the application in some renegade fashion. Sometimes you do need to do 
some custom things in Struts, and this is where I think Struts falls a 
little short compared to frameworks like Spring since it is less flexible.


--
Nick Heudecker
System Mobile, Inc.
Email: [EMAIL PROTECTED]
Web: http://www.systemmobile.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] A first look at Spring vs Struts

2004-06-14 Thread Rick Reumann
Martin Gainty wrote:
funky things in Action execute methods ?
please describe..
Well you can do almost anything in there since you're in a servlet, so 
you can totally break Struts concepts. You can do redirects (when you 
shouldn't) you could not use a Form bean to capture properties, you can 
do business logic in there when you shouldn't. You can make new 
instances of ActionForms and put them in Session scope - point is you 
can do anything you want, so if you have some developers on your team 
that aren't following best practices, they could potentially make parts 
of the application in some renegade fashion. Sometimes you do need to do 
some custom things in Struts, and this is where I think Struts falls a 
little short compared to frameworks like Spring since it is less flexible.

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


Re: Chaining dispatchactions problem, how to do it cleanly

2004-06-14 Thread Erwin Cabral
Your forward config to another dispatch action should contain the
"method" parameter. For instance,




I hope I interpreted your problem correctly.

On Mon, 14 Jun 2004 10:20:21 +0200, Cosyns Xavier <[EMAIL PROTECTED]> wrote:
> 
> >I've used a similar approach but mine is working fine.
> >what does your struts-config.xml look like?
> 
> Hi,
> Here is my struts-config, ShowAttributesList.do is my preaction before
> displayin the list of objects, then we select one of the list and
> execute the gocreateattribute action, and lastly we have the
> CreateAttribute action which will reforward to the ShowAttributesList on
> successful creation. The problem is that both actions are
> DispatchActions with the same parameter. As explained in my former mail
> I do not want to break that for different reasons.
> 
> Is there something I am missing?
> 
>   path="/Configuration/Attributes/ShowAttributesList"
>   name="objectTypeForm"
>   scope="request"
> parameter="fxpAction"
>   type="fxp.web.actions.configuration.attributes.AttributesLister"
>   validate="false">
>name="showList"
> 
> path="/configuration/attributes/manageAttributesList.jsp"/>
>name="edit"
> 
> path="/Configuration/Attributes/GoEditAttribute.do"/>
>name="delete"
> 
> path="/Configuration/Attributes/GoDeleteAttribute.do"/>
>name="create"
> 
> path="/Configuration/Attributes/GoCreateAttribute.do"/>
>  
> 
>   path="/Configuration/Attributes/GoCreateAttribute"
>   parameter="/configuration/attributes/createAttribute.jsp"
>   input="/Configuration/Attributes/ShowAttributesList.do"
>   name="objectTypeForm"
>   scope="request"
>   type="fxp.web.actions.configuration.attributes.GoCreateAttribute"
>   validate="false" />
> 
>   path="/Configuration/Attributes/CreateAttribute"
> input="/configuration/attributes/createAttribute.jsp"
>   name="createAttributeForm"
>   scope="request"
>   type="fxp.web.actions.configuration.attributes.CreateAttribute"
> parameter="fxpAction"
>   validate="true">
>name="showList"
> 
> path="/Configuration/Attributes/ShowAttributesList.do"/>
>name="create"
> 
> path="/configuration/attributes/createAttribute.jsp"/>
>
> 
> 
> 
> 
> >On Fri, 11 Jun 2004 11:26:54 +0200, Cosyns Xavier
> ><[EMAIL PROTECTED]> wrote:
> >>
> >> Hi,
> >>
> >> I run into problems with chaining dispatchactions using the same
> >> parameter 'method'. We do use the same parameter name for all our
> >> dispatchaction for consistency reasons throughout the whole
> >> application, easier to maintain and using generique javascript
> >> functions.
> >>
> >> The problem we ran into is that we have a first jsp page showing a
> >> list of items, and we achieve that by prepopulating with a
> >> dispatchaction some beans to be used in the jsp. Then we can go to a
> >> 'edit' page and when we submit we have another
> >dispatchaction with an
> >> 'update' method that should reforward on success to the first
> >> prepoplation dispatchaction. The problem is that forwarding
> >calls the
> >> 'update' method from the prepopulation dispatchaction, which
> >does not
> >> exist and should not exist. Redirecting the action does not
> >work as I
> >> lose a request parameter that permits to prepopulate the
> >right list of
> >> products on my first page (It will display the default list, not
> >> necesarely the list where he started an update upon).
> >>
> >> So, our action&page flow is the following:
> >> Prepopulation Action --> list.jsp --> detail (product Action) -->
> >> edit.jsp --> update (product action) --> Prepopulation Action.
> >>
> >> Only options I see,
> >> I could not use dispatchactions, but then I would have so many
> >> different action classes that are so closely related and
> >using common
> >> methods. I could break our 'inhouse rule' of using one global
> >> parameter name for dispatchactions, but it would not be
> >clean to have
> >> an exception to the rule, so I'm against that option. I could put an
> >> object in the session and in my prepopulation action testing for it,
> >> and if it exist showing the right list of products. But again, it's
> >> simulating a request parameter using a session, which is not a great
> >> design. None of the three options above are good design to me, so I
> >> would prefer another way.
> >>
> >> What I would need is more something like the 'unspecified'
> >method from
> >> dispatchactions that would also be called if the given
> >parameter does
> >> not match any of the methods of the dispatchaction. From my tests,
> >> it's not the case,  the 'unspecified' method is called when the
> >> 'parameter' does not exist in the request and not when it does not
> >> mat

Re: Charts with struts

2004-06-14 Thread Mike Duffy
I'll also endorse JFreeChart.

It is open-source, free, and the guy who runs the project is good guy to work with.

Mike


--- Christophe_Thiébaud <[EMAIL PROTECTED]> wrote:
> I use JFreeChart, "a free Java class library for generating charts."
> http://www.jfree.org/jfreechart/
> 
> for example:
> http://www.openmozart.net/jsp/community.jsp
> 
> Christophe Thiébaud
> 
> René Zbinden wrote:
> 
> >Hi everybody
> >does anybody know a way to dynamically create a chart and display it in a JSP. I 
> >will read the
> underlying data from a database. 
> >TIA Rene
> > 
> >
> >  
> >
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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



Strange error message

2004-06-14 Thread Scott Smith
Has anyone seen the following error message and know what it means?
 
"Cannot forward after response has been committed".  
 
I think it's coming out of something called application.dispatcher (doForward; line 
138).


Re: Charts with struts

2004-06-14 Thread Christophe Thiébaud
I use JFreeChart, "a free Java class library for generating charts."
http://www.jfree.org/jfreechart/
for example:
http://www.openmozart.net/jsp/community.jsp
Christophe Thiébaud
René Zbinden wrote:
Hi everybody
does anybody know a way to dynamically create a chart and display it in a JSP. I will read the underlying data from a database. 
TIA Rene

 


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


RE: Cannot Find Bean in Any Scope

2004-06-14 Thread Caroline Jen
I am following your suggestion.  I put my "while" loop
in the  tag, and I have changed 

<%=threadBean.getSender()%>
to 


There is a situation which I do not know how to
handle.
Inside the  tag, I have a line of
code:

<%=SiteUtil.filter( threadBean.getPostTopic(),
false/*html*/, true/*emotion*/, false/*mvnCode*/,
false/*newLine*/, false/*URL*/ )%>

This JSP expression calls a method 'filter' in another
class SiteUtil.java.  And one of the properties
(postTopic) of the threadBean is passed as a parameter
to that method.  

How do I use the  tag in the above JSP
expression?

Thank you in advance.

-Caroline 





--- "CRANFORD, CHRIS" <[EMAIL PROTECTED]>
wrote:
> Why aren't you using the struts taglib framework to
> do this since the bean
> is in the request scope, it makes it a lot easier
> and keeps your JSP code
> very clean.  And to do what I suspect you may be
> trying to do with the "odd"
> variable, you could also use the JSTL core taglib
> like follows:
> 
>  varStatus="idx">
>   
> 
>   <%-- This is odd logic --%>
> 
> 
>   <%-- This is your even logic --%>
>   
>   
>   ...
> 
> 
> See how clean this looks?
> 
> You can also do something simliar with the
>  tag as a
> replacement for the c:forEach core tag; however I'm
> partial to the core JSTL
> library as its very flexible. ;-)
> 
> Unless you can show argument why using a "scriplet"
> is necessary, I believe
> most will continue to suggest the above approach as
> it's a more efficient
> approach.
> 
> Take care,
> Chris
> 
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED] 
> Sent: Sunday, June 13, 2004 1:19 PM
> To: Struts Users Mailing List
> Subject: Re: Cannot Find Bean in Any Scope
> 
> 
> Sorry, I still did not explain my code very well.
> 
> I am trying to write out the properties of
> ThreadBean
> in a "while loop" in my JSP:
> 
> <%
> Collection threadRows = ( Collection
> )request.getAttribute( "ThreadBeans" );
> 
> int odd = 0;
>Iterator iterator = threadRows.iterator();
>while( iterator.hasNext() ) 
>{
>   odd = ( odd + 1 )%2;
>   ThreadBean threadBean = ( ThreadBean
> )iterator.next();
> 
>   .
>   .
> 
>   <%=threadBean.getSender()%> > 
>   <%=threadBean.getThreadReplyCount()%> > 
>   <%=threadBean.getThreadViewCount()%> 
>}
> %>
>  
> and the error is that cannot find threadBean in any
> scope.
> 
> ThreadBeans is a collection, which is created in a
> java class that extends Action.  And ThreadBeans are
> passed in a request scope into my JSP.
> 
> ThreadBeans, which is a collection of JavaBean(s). 
> Each of those JavaBean(s) is a ThreadBean with many
> properties to be written out in a loop.  The
> ThreadBean is in a package.
> 
> In my JSP scriplet, I retrieve the collection of
> those
> JavaBean(s) from the request scope.  
> 
> Then, I enter the while loop to write out the
> properties of each of those JavaBean(s).
> 
> What should I do so that my JSP knows threadBean is
> in
> the request scope?
> 
> Thank you.
> 
> -Caroline
> 
> --- Christopher Schultz
> <[EMAIL PROTECTED]> wrote:
> > Caroline,
> > 
> > Wait a second...
> > 
> > > Collection threadRows = ( Collection
> > > )request.getAttribute( "ThreadBeans" );
> > > 
> > > int odd = 0;
> > >Iterator iterator = threadRows.iterator();
> > >while( iterator.hasNext() ) 
> > >{
> > >   odd = ( odd + 1 )%2;
> > >   ThreadBean threadBean = ( ThreadBean
> )iterator.next();
> > > 
> > >   .
> > >}
> > > %>
> > > 
> > > 5. when I tried to write out the properties; for
> > > example:
> > > 
> > > <%=threadBean.getSender()%>
> <%=threadBean.getThreadReplyCount()%>
> > > <%=threadBean.getThreadViewCount()%>
> > 
> > This message doesn't look like it's coming from
> this
> > body of code. Are
> > you mixing scriptlets (as above) with 'bean' tags?
> > 
> > If so, you're mixing apples and oranges, since the
> > bean tag doesn't do
> > anything with "local" variables created by
> scriptlet
> > code.
> > 
> > Are you sure you don't have something like this
> > anywhere:
> > 
> > 
> > 
> > If so, you'll have to put your object into some
> > scope (page or request,
> > maybe) before using it with the bean tags. That's
> a
> > bit sloppy, though, 
> > and I'll recommend again that you stick to using
> the
> > taglibs exclusively 
> > rather than scriptlets.
> > 
> > -chris
> > 
> 
> > ATTACHMENT part 2 application/pgp-signature
> name=signature.asc
> 
> 
> 
> 
>   
>   
> __
> Do you Yahoo!?
> Friends.  Fun.  Try the all-new Yahoo! Messenger.
> http://messenger.yahoo.com/ 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EM

RE: [OT] A first look at Spring vs Struts

2004-06-14 Thread Martin Gainty
Rick-
funky things in Action execute methods ?
please describe..
Martin Gainty
(cell) 617-852-7822
(e) [EMAIL PROTECTED]
(http)www.laconiadatasystems.com


From: Rick Reumann <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: Struts Users Mailing List <[EMAIL PROTECTED]>
Subject: [OT] A first look at Spring vs Struts
Date: Mon, 14 Jun 2004 15:36:40 -0400
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by mc4-f24.hotmail.com 
with Microsoft SMTPSVC(5.0.2195.6824); Mon, 14 Jun 2004 12:37:17 -0700
Received: (qmail 74096 invoked by uid 500); 14 Jun 2004 19:37:09 -
Received: (qmail 74077 invoked by uid 500); 14 Jun 2004 19:37:09 -
Received: (qmail 74071 invoked by uid 99); 14 Jun 2004 19:37:09 -
Received: from [206.113.192.17] (HELO yorktown.nielsenmedia.com) 
(206.113.192.17)  by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 14 Jun 
2004 12:37:09 -0700
Received: from NMRFLIMG1.nmrlan.net (nmrflimg1.nmrlan.net [10.38.67.53])by 
yorktown.nielsenmedia.com (8.12.10/8.12.8) with ESMTP id i5EJZsrE018939for 
<[EMAIL PROTECTED]>; Mon, 14 Jun 2004 15:35:54 -0400 (EDT)
Received: from reumann.net (unverified) by NMRFLIMG1.nmrlan.net (Content 
Technologies SMTPRS 4.3.12) with ESMTP id 
<[EMAIL PROTECTED]> for 
<[EMAIL PROTECTED]>; Mon, 14 Jun 2004 15:36:39 -0400
X-Message-Info: JGTYoYF78jEuHatpBO8tpsmtii/iZFzL
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: 
List-Subscribe: 
List-Help: 
List-Post: 
List-Id: "Struts Users Mailing List" 
Delivered-To: mailing list [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
User-Agent: Mozilla Thunderbird 0.6a (Windows/20040420)
X-Accept-Language: en-us, en
X-Virus-Checked: Checked
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 14 Jun 2004 19:37:20.0029 (UTC) 
FILETIME=[01D7C4D0:01C45247]

Trust me this isn't an attempt to open up a whole flame war. I'm just 
curious how many of you have messed with Spring and what your thoughts 
concerning it are.

I've been looking at it some and I do see some strengths it has, but some 
of those strengths I also see as potential weaknesses (maybe).

In my short study (and I mean very short:) of Spring, here's what I've been 
thinking so far...

(Note, Spring handles a lot more than the just the front end framework, but 
since Struts is mostly a front end framework these comments about Spring 
are in relation to the web component portion of Spring).

Flexibility. Here is where I think Spring's major strength lies. You are 
given some out-of-the-box controllers and stuff but how the application is 
put together with the framework allows for a lot of flexibility. In a large 
corporation, though, this all could be a weakness if one isn't careful. It 
seems very easy to have part of an application being coded using entirely 
different Spring concepts than another part. Struts has this problem as 
well, although it appears more difficult to abuse since, unless you start 
really doing funky things in Action execute methods (seen it done), it's 
pretty easy to stay within 'best practices' guidelines.

Learning curve. I can't really tell which is an easier framework to pick up 
and learn. I've been working with Struts for a long time now, so it's 
difficult for me to look at this objectively. The fact that there are a lot 
more ways of developing web applications with Spring can be somewhat of an 
obstacle for picking it up quickly.

View tags. I happen to like the basic struts html tags related to forms. 
Spring doesn't come with much of a tag library that I can tell. I'm not 
sure how tags such as the Nested tag will play with Spring. Currently you 
have to provide all form field values with JSTL... not a big deal except a 
bit unwieldy for nested beans (imo).

Lack of ActionForms. Spring doesn't use ActionForms and I like this. You 
can tie a Value Object right to your front end form. Very nice.  If Struts 
got away from ActionForms I'd be very happy (although I'd lose some of the 
nice html tags functionality).

Spring also uses a lot of cool stuff like IoC (Inversion of 
Control/Dependency Injection).

Right now, as it stands, I'm finding it difficult to justify switching over 
to 'yet another framework' (Sheesh how many are there now - Spring, 
WebWorks..:). I've run into some limitations using Struts (such as its nice 
handling of a 'form wizard flow' where you might need to action chain - 
gets a bit ugly) but overall I don't really have many complaints about 
Struts. It appears that I'm not going to gain that much switching over to 
Spring. A lot of my good buddies in #FunkyCodeMonkey on darkmyst.org are 
former Struts users and they seem to like Spring better - although, they 
haven't given me enough compelling reasons to jump ship.

I've only begun to start looking into Spring so I'm sure I'm missing a TON 
of points that could be made

Re: Simple struts question.

2004-06-14 Thread Rick Reumann
Bullard, James wrote:
A couple tiles questions. 

1.) Is there any way to have a global-forward forward to a tile, It always
tells me that such a path does not exist, meaning that rather than recognize
the page as tile def it thinks it is a page. 
Hmm not sure what is wrong. You could try adding contextRelative="true" 
to the global forward. We have some global forwards that look like:



2.) I am using the same forms for editing and creating new entity instances.
These happen in different tiles, I want to have my local action forward to
the tile which called the action in the case of success or failure. Is this
possible (struts 1.1) 
I'm not exactly sure what you are asking, but if you set up two tiles 
definitions, I'm not sure how there would be a problem. I might be 
missing where the problem is.

3.) How can I do a context switch from within action code to forward to a
different context (preferably without writing extra action elements in my
struts-admin.xml config file) 
Not sure about that.
Side note... using SiteMesh instead of tiles will make all of this 
easier. You won't have to make a bunch of tile defiitions, you simple 
forward to jsps. Based on the url pattern (or other ways) you then have 
the page decorated for you. I threw up a simple example here
http://www.reumann.net/struts/lessons/sitemesh/rr_sitemesh_example.jsp

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


Re: Charts with struts

2004-06-14 Thread Andy Engle
René_Zbinden <[EMAIL PROTECTED]> wrote:

> Hi everybody
> does anybody know a way to dynamically create a chart and display it
> in a JSP. I will read the underlying data from a database. 

I used the stuff from jpowered.com and it works pretty well.  I am not
to the point yet where I have the licensed version yet, but the demo I
got a week or two ago is working out pretty well with my Struts app.


Andy


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



Re: Charts with struts

2004-06-14 Thread Andrey Rogov
try this

http://cewolf.sourceforge.net/

RZ> Hi everybody
RZ> does anybody know a way to dynamically create a chart and display it in a JSP. I 
will read the underlying data from a database. 
RZ> TIA Rene
 



-- 
Best regards,
 Andreymailto:[EMAIL PROTECTED]


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



Charts with struts

2004-06-14 Thread René Zbinden
Hi everybody
does anybody know a way to dynamically create a chart and display it in a JSP. I will 
read the underlying data from a database. 
TIA Rene
 


RE: security roles

2004-06-14 Thread Zhang, Larry \(L.\)
Thanks Pedro. 

I am not using Tomcat, instead I am using IBM WSAD , so if I define the following 
lines in web.xml, 


A normal employee user
Employee


a manager user can do PR
Manager


can I access Employee and/or Manager role in struts-config.xml?

(2)also say a manager logon our sites, I can obtain the info for this user such as 
"managerFlag", and then where should I put the logic to decide whether the user is a 
manager or an employee, and how to map this user to a security-role defined above?






-Original Message-
From: Pedro Salgado [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 3:38 PM
To: Struts Users Mailing List
Subject: Re: security roles



  In struts-config.xml, define the actions this way:


Only manager can execute the action



Only employee can execute the action



Manager or employee can execute the action




Everyone can execute the action




You can define the roles on your TOMCAT_HOME/conf/tomcat-users.xml (for
Tomcat 4.1.30).

Pedro Salgado


On 04/06/14 20:24, "Zhang, Larry (L.)" <[EMAIL PROTECTED]> wrote:

> I want to define two security roles, one of which is employee and another is
> manager. Employee is not able to see some resources belonging to manager.
> Under J2EE standard, we can define these in web.xml, it also seems to me that
> this can be done in struts.
> 
> Can you point out how to perform this task? Detailed instruction is
> appreciated.
> 
> Thanks.
> 
> 
> -
> 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: security roles

2004-06-14 Thread Martin Gainty
Larry
read Sing Shins white paper on Web Tier Security
www.javapassion.com/j2ee/AdvancedJ2EEFeatures4.pdf
Martin
- Original Message - 
From: "Zhang, Larry (L.)" <[EMAIL PROTECTED]>
To: "Struts User Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, June 14, 2004 3:24 PM
Subject: security roles


I want to define two security roles, one of which is employee and another is
manager. Employee is not able to see some resources belonging to manager.
Under J2EE standard, we can define these in web.xml, it also seems to me
that this can be done in struts.

Can you point out how to perform this task? Detailed instruction is
appreciated.

Thanks.


-
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: [OT] A first look at Spring vs Struts

2004-06-14 Thread Ricardo Cortes
The best application framework I've used for developing web applications has to be 
WebObjects (http://webobjects.com), hands down.  Although the cost is $700, you get 
what Struts, Tiles, Hibernate, JSP and servlets try so hard to emulate except that 
it's all bundled in one package.  So integration between database modeling and 
front-end display is seemless.  Also, the persistence layer, in my opinion, is miles 
ahead of anything out there, including Hibernate and JDO (notice I didn't even mention 
EJBs).  With that said, the WebObjects market has indeed gone downhill and the 
specifications behind J2EE have somehow made proprietary software less of an option 
than they were 5 years ago but it's still the best application framework I've ever 
used.

Now, with respect to the thread at hand, we are currently using both Spring and 
Struts.  Struts and Tiles are used on the front end and Hibernate and Spring are used 
on the backend.  The integration Spring has for Hibernate out of the box makes things 
a heck of a lot easier.  I don't see our platform transitioning to a 100% pure Spring 
implementation but I also don't see us ever taking Spring out of the equation.  So, 
all in all, they both can be used side by side and not just as a replacement for the 
other.

Ciao,
Ricardo

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 3:37 PM
To: Struts Users Mailing List
Subject: [OT] A first look at Spring vs Struts


Trust me this isn't an attempt to open up a whole flame war. I'm just 
curious how many of you have messed with Spring and what your thoughts 
concerning it are.

I've been looking at it some and I do see some strengths it has, but 
some of those strengths I also see as potential weaknesses (maybe).

In my short study (and I mean very short:) of Spring, here's what I've 
been thinking so far...

(Note, Spring handles a lot more than the just the front end framework, 
but since Struts is mostly a front end framework these comments about 
Spring are in relation to the web component portion of Spring).

Flexibility. Here is where I think Spring's major strength lies. You are 
given some out-of-the-box controllers and stuff but how the application 
is put together with the framework allows for a lot of flexibility. In a 
large corporation, though, this all could be a weakness if one isn't 
careful. It seems very easy to have part of an application being coded 
using entirely different Spring concepts than another part. Struts has 
this problem as well, although it appears more difficult to abuse since, 
unless you start really doing funky things in Action execute methods 
(seen it done), it's pretty easy to stay within 'best practices' guidelines.

Learning curve. I can't really tell which is an easier framework to pick 
up and learn. I've been working with Struts for a long time now, so it's 
difficult for me to look at this objectively. The fact that there are a 
lot more ways of developing web applications with Spring can be somewhat 
of an obstacle for picking it up quickly.

View tags. I happen to like the basic struts html tags related to forms. 
Spring doesn't come with much of a tag library that I can tell. I'm not 
sure how tags such as the Nested tag will play with Spring. Currently 
you have to provide all form field values with JSTL... not a big deal 
except a bit unwieldy for nested beans (imo).

Lack of ActionForms. Spring doesn't use ActionForms and I like this. You 
can tie a Value Object right to your front end form. Very nice.  If 
Struts got away from ActionForms I'd be very happy (although I'd lose 
some of the nice html tags functionality).

Spring also uses a lot of cool stuff like IoC (Inversion of 
Control/Dependency Injection).

Right now, as it stands, I'm finding it difficult to justify switching 
over to 'yet another framework' (Sheesh how many are there now - Spring, 
WebWorks..:). I've run into some limitations using Struts (such as its 
nice handling of a 'form wizard flow' where you might need to action 
chain - gets a bit ugly) but overall I don't really have many complaints 
about Struts. It appears that I'm not going to gain that much switching 
over to Spring. A lot of my good buddies in #FunkyCodeMonkey on 
darkmyst.org are former Struts users and they seem to like Spring better 
- although, they haven't given me enough compelling reasons to jump ship.

I've only begun to start looking into Spring so I'm sure I'm missing a 
TON of points that could be made. I'd appreciate any other comments good 
or bad concerning either framework. I'm sure many of you fall into the 
same frustration-boat that I feel like I'm in- "So many technologies out 
there - only so much time." I've trying to determine if I really need to 
be investing the time to explore this framework more when I could be 
exploring other things I need to learn more about. I'm sure many of you 
can relate:)

Thanks,

-- 
Rick


---

[OT]Help needed in wring regular expression

2004-06-14 Thread RDoss
Hi,
Web page contains a text box can accept only maximum of four digits and it
can be integers/String(accepts only "many","MANY") if enter a single integer
value it should not be 0(zero) and 0(zero) can be entered subsequently after
first non-zero integer and totally 4 digit maximum. 

I tried using "(\d(1)?[1-9]{1,4})|(FEW)|(few)|(MANY)|(many)" to avoid
entering 0 as first value but it fails if we enter "00","000""" + I
could not restrict the size to be 4 digit max when I tried to enter more
than a digit.

Can anybody help me to write regular expression for the above conditions or
any sample example code for the above case or any suggestions.

Thanks in advance.
-Ram


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



Re: security roles

2004-06-14 Thread Pedro Salgado

  In struts-config.xml, define the actions this way:


Only manager can execute the action



Only employee can execute the action



Manager or employee can execute the action




Everyone can execute the action




You can define the roles on your TOMCAT_HOME/conf/tomcat-users.xml (for
Tomcat 4.1.30).

Pedro Salgado


On 04/06/14 20:24, "Zhang, Larry (L.)" <[EMAIL PROTECTED]> wrote:

> I want to define two security roles, one of which is employee and another is
> manager. Employee is not able to see some resources belonging to manager.
> Under J2EE standard, we can define these in web.xml, it also seems to me that
> this can be done in struts.
> 
> Can you point out how to perform this task? Detailed instruction is
> appreciated.
> 
> Thanks.
> 
> 
> -
> 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]



[OT] A first look at Spring vs Struts

2004-06-14 Thread Rick Reumann
Trust me this isn't an attempt to open up a whole flame war. I'm just 
curious how many of you have messed with Spring and what your thoughts 
concerning it are.

I've been looking at it some and I do see some strengths it has, but 
some of those strengths I also see as potential weaknesses (maybe).

In my short study (and I mean very short:) of Spring, here's what I've 
been thinking so far...

(Note, Spring handles a lot more than the just the front end framework, 
but since Struts is mostly a front end framework these comments about 
Spring are in relation to the web component portion of Spring).

Flexibility. Here is where I think Spring's major strength lies. You are 
given some out-of-the-box controllers and stuff but how the application 
is put together with the framework allows for a lot of flexibility. In a 
large corporation, though, this all could be a weakness if one isn't 
careful. It seems very easy to have part of an application being coded 
using entirely different Spring concepts than another part. Struts has 
this problem as well, although it appears more difficult to abuse since, 
unless you start really doing funky things in Action execute methods 
(seen it done), it's pretty easy to stay within 'best practices' guidelines.

Learning curve. I can't really tell which is an easier framework to pick 
up and learn. I've been working with Struts for a long time now, so it's 
difficult for me to look at this objectively. The fact that there are a 
lot more ways of developing web applications with Spring can be somewhat 
of an obstacle for picking it up quickly.

View tags. I happen to like the basic struts html tags related to forms. 
Spring doesn't come with much of a tag library that I can tell. I'm not 
sure how tags such as the Nested tag will play with Spring. Currently 
you have to provide all form field values with JSTL... not a big deal 
except a bit unwieldy for nested beans (imo).

Lack of ActionForms. Spring doesn't use ActionForms and I like this. You 
can tie a Value Object right to your front end form. Very nice.  If 
Struts got away from ActionForms I'd be very happy (although I'd lose 
some of the nice html tags functionality).

Spring also uses a lot of cool stuff like IoC (Inversion of 
Control/Dependency Injection).

Right now, as it stands, I'm finding it difficult to justify switching 
over to 'yet another framework' (Sheesh how many are there now - Spring, 
WebWorks..:). I've run into some limitations using Struts (such as its 
nice handling of a 'form wizard flow' where you might need to action 
chain - gets a bit ugly) but overall I don't really have many complaints 
about Struts. It appears that I'm not going to gain that much switching 
over to Spring. A lot of my good buddies in #FunkyCodeMonkey on 
darkmyst.org are former Struts users and they seem to like Spring better 
- although, they haven't given me enough compelling reasons to jump ship.

I've only begun to start looking into Spring so I'm sure I'm missing a 
TON of points that could be made. I'd appreciate any other comments good 
or bad concerning either framework. I'm sure many of you fall into the 
same frustration-boat that I feel like I'm in- "So many technologies out 
there - only so much time." I've trying to determine if I really need to 
be investing the time to explore this framework more when I could be 
exploring other things I need to learn more about. I'm sure many of you 
can relate:)

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


Help needed in wring regular expression

2004-06-14 Thread RDoss
Hi,
Web page contains a text box can accept only maximum of four digits and it
can be integers/String(accepts only "many","MANY") if enter a single integer
value it should not be 0(zero) and 0(zero) can be entered subsequently after
first non-zero integer and totally 4 digit maximum. 

I tried using "(\d(1)?[1-9]{1,4})|(FEW)|(few)|(MANY)|(many)" to avoid
entering 0 as first value but it fails if we enter "00","000""" + I
could not restrict the size to be 4 digit max.

Can anybody help me to write regular expression for the above conditions or
any sample example code for the above case or any suggestions.

Thanks in advance.
-Ram




 


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



security roles

2004-06-14 Thread Zhang, Larry \(L.\)
I want to define two security roles, one of which is employee and another is manager. 
Employee is not able to see some resources belonging to manager. Under J2EE standard, 
we can define these in web.xml, it also seems to me that this can be done in struts. 

Can you point out how to perform this task? Detailed instruction is appreciated.

Thanks.


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



RE: Struts/Lunar Pages/Resin Issues

2004-06-14 Thread Jarnot Voytek Contr AU/SC
srun not binding is a Resin problem, not Struts.

--
Voytek Jarnot
"Racing makes heroin addiction look like a vague longing for something
salty." - Peter Egan 

 
> - Original Message -
> From: "Mike" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, June 14, 2004 2:27 PM
> Subject: Struts/Lunar Pages/Resin Issues
> 
> 
> > According to lunarpages, Struts is causing the following 
> problem, which
> > causes Resin to restart continuously.  They have suspended 
> my account
> based
> > on this problem.  Does this mean anything to anyone else?  
> THE STDERR log
> > is below:
> >
> > Mike
> >
> > This is part of the stderr.log from the server pertaining 
> to your account:
> >
> > [2004-06-14 08:53:39.138] initializing application
> > http://www.michaelmcgrady.com/
> > Jun 14, 2004 8:53:40 AM 
> org.apache.struts.util.PropertyMessageResources
> 
> > INFO: Initializing, config='org.apache.struts.util.LocalStrings',
> > returnNull=true
> > Jun 14, 2004 8:53:40 AM 
> org.apache.struts.util.PropertyMessageResources
> 
> > INFO: Initializing, 
> config='org.apache.struts.action.ActionResources',
> > returnNull=true
> > Jun 14, 2004 8:53:42 AM 
> org.apache.struts.util.PropertyMessageResources
> 
> > INFO: Initializing, config='resources.properties.messages',
> returnNull=true
> > srun can't bind to port 127.0.0.1:6802.
> > 1) Check for conflicting servers.
> > 2) Check that /127.0.0.1 is a valid interface for this machine.
> > Resin httpd start at Mon Jun 14 08:53:53 PDT 2004
> >
> >
> >
> >
> >
> > 
> -
> > 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: Struts/Lunar Pages/Resin Issues

2004-06-14 Thread Jarnot Voytek Contr AU/SC
srun not binding is a Resin problem, not Struts.

--
Voytek Jarnot
"Racing makes heroin addiction look like a vague longing for something
salty." - Peter Egan 

 
> - Original Message -
> From: "Mike" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, June 14, 2004 2:27 PM
> Subject: Struts/Lunar Pages/Resin Issues
> 
> 
> > According to lunarpages, Struts is causing the following 
> problem, which
> > causes Resin to restart continuously.  They have suspended 
> my account
> based
> > on this problem.  Does this mean anything to anyone else?  
> THE STDERR log
> > is below:
> >
> > Mike
> >
> > This is part of the stderr.log from the server pertaining 
> to your account:
> >
> > [2004-06-14 08:53:39.138] initializing application
> > http://www.michaelmcgrady.com/
> > Jun 14, 2004 8:53:40 AM 
> org.apache.struts.util.PropertyMessageResources
> 
> > INFO: Initializing, config='org.apache.struts.util.LocalStrings',
> > returnNull=true
> > Jun 14, 2004 8:53:40 AM 
> org.apache.struts.util.PropertyMessageResources
> 
> > INFO: Initializing, 
> config='org.apache.struts.action.ActionResources',
> > returnNull=true
> > Jun 14, 2004 8:53:42 AM 
> org.apache.struts.util.PropertyMessageResources
> 
> > INFO: Initializing, config='resources.properties.messages',
> returnNull=true
> > srun can't bind to port 127.0.0.1:6802.
> > 1) Check for conflicting servers.
> > 2) Check that /127.0.0.1 is a valid interface for this machine.
> > Resin httpd start at Mon Jun 14 08:53:53 PDT 2004
> >
> >
> >
> >
> >
> > 
> -
> > 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: Struts/Lunar Pages/Resin Issues

2004-06-14 Thread DGraham

It's not obvious from your email, but
did you:
1) Check for conflicting servers i.e.
telnet www.michaelmcgrady.com 6082
2) Check that /127.0.0.1 is a valid
interface for [your] machine.

Dennis






mike <[EMAIL PROTECTED]>

06/14/2004 02:57 PM



Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
"Struts Developers List"
<[EMAIL PROTECTED]>, "Struts Users Mailing List" <[EMAIL PROTECTED]>


cc
"Struts Developers List"
<[EMAIL PROTECTED]>


Subject
Re: Struts/Lunar Pages/Resin
Issues








That makes sense, James, except my site is not using
or accessing struts at 
this time.  That site is only using a single page which merely accesses
the 
request object's remoteAddr parameter.So, my product could not be the 
issue.  Did you read the stderr log?  My suspicion is that the
server 
administrator at Lunar Pages is OTL.  But, I thought I would ask here

first.  It seems clear from the stderr log below that my site details
could 
not be causing the trouble.



At 11:32 AM 6/14/2004, James Mitchell wrote:
>You will need to reexamine YOUR project.  I can assure you that
nothing in
>the officially released Struts code (or dependencies) is causing this.
>
>
>
>--
>James Mitchell
>Software Engineer / Open Source Evangelist
>EdgeTech, Inc.
>678.910.8017
>AIM: jmitchtx
>
>- Original Message -
>From: "Mike" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, June 14, 2004 2:27 PM
>Subject: Struts/Lunar Pages/Resin Issues
>
>
> > According to lunarpages, Struts is causing the following problem,
which
> > causes Resin to restart continuously.  They have suspended
my account
>based
> > on this problem.  Does this mean anything to anyone else?
 THE STDERR log
> > is below:
> >
> > Mike
> >
> > This is part of the stderr.log from the server pertaining to
your account:
> >
> > [2004-06-14 08:53:39.138] initializing application
> > http://www.michaelmcgrady.com/
> > Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources
>
> > INFO: Initializing, config='org.apache.struts.util.LocalStrings',
> > returnNull=true
> > Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources
>
> > INFO: Initializing, config='org.apache.struts.action.ActionResources',
> > returnNull=true
> > Jun 14, 2004 8:53:42 AM org.apache.struts.util.PropertyMessageResources
>
> > INFO: Initializing, config='resources.properties.messages',
>returnNull=true
> > srun can't bind to port 127.0.0.1:6802.
> > 1) Check for conflicting servers.
> > 2) Check that /127.0.0.1 is a valid interface for this machine.
> > Resin httpd start at Mon Jun 14 08:53:53 PDT 2004
> >
> >
> >
> >
> >
> > -
> > 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[2]: Caching data from resultset

2004-06-14 Thread Andrey Rogov
You can try the following. If there are no data in the cache you can
select
 SQL :
SELECT *.blah...,
rownum
 FROM (
  SELECT *.blah...
FROM portal.dbtables dbt
   WHERE 
   ORDER BY dbt.datemessage desc
  )
 WHERE ( rownum between #firstrow# and #lastrow# )

   Oracle 9i will do it fast. It has cache of its own. Appropriate lines
   will be picked out of the table. Then you save  bean collection in session scope
   or application scope. Then, if more pages are picked out you can
   find, if there are data in the cache - then show,  if not, add etc. I apply both
   Oracle rownum and a small cache for dynamic data if data update is not so frequent.

   Best regards,

   Andrey.

CC> This works fine when:

CC>   WHERE ROWNUM BETWEEN 1 and 10

CC> But when I use:

CC>   WHERE ROWNUM BETWEEN 11 AND 20

CC> I get no rows returned.

CC> Any ideas why?

CC> -Original Message-
CC> From: Kies, Daniel [mailto:[EMAIL PROTECTED] 
CC> Sent: Monday, June 14, 2004 12:52 PM
CC> To: 'Struts Users Mailing List'
CC> Subject: RE: Caching data from resultset


CC> I recently implemented pagination for resultsets using Oracle 9i.  Instead
CC> of loading up the entire resultset into memory, I just queried based on the
CC> records that the user requested.  

CC> 1) Before getting the records, I first counted the records that were coming
CC> back in the result.  That way I can say to the user...showing results 26-50
CC> of 2,183.  
CC> 2) For the first resultest, I would run my query appended with a "rownum
CC> between 1 and 25" 
CC> 3) If the user paginates, then I throw the pagination numbers into the query
CC> so the query would be appended with "rownum between x and y"

CC> This is a pretty simple solution to pagination with Oracle.  You may have
CC> some issues getting your resultset ordered properly coming from Oracle, but
CC> using inline views should take care of that.

CC> The advantage to doing this is scaleability.  I am running this code on top
CC> of a Data Warehouse where every milisecond counts.  Using rownum for the
CC> resultset off the database limits query execution time and allows for
CC> resultsets of any size.  Using resultsets with a rownum will allow Oracle to
CC> cache the SQL you are using to execute quicker.

CC> Let Oracle do the work.

CC> My $ .02

CC> -Original Message-
CC> From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
CC> Sent: Monday, June 14, 2004 10:39 AM
CC> To: 'Struts Users Mailing List'
CC> Subject: RE: Caching data from resultset


CC> Not sure how much this is going to help because we're averaging about 15
CC> seconds to transform a resultset of 1200 records into dynabeans.  My goal
CC> really is to be able to dynamically traverse only the needed records within
CC> my resultset.
 
CC> So, when my resultset gets returned and I forward to page 1 (assuming we
CC> show 10 hits per page), I would fetch rows 1-10 and cache their data.  Then
CC> when the user hits page 2, I would fetch 10 more rows from the resultset and
CC> append records 11-20 in the cache.  So at this point, records 1-20 are
CC> cached and my resultset it pointing to record 21.
 
CC> Now, if the user hits the previous page button, my application would move
CC> the offset back to current offset - viewable count (11-10=1) and it would
CC> pull records 1-10 from the cache.  This avoids calling the database for
CC> data.  Then hitting next page would check and see that the resultset pointer
CC> is at 21 but offset < resultset offset, so assumes cache.  It pulls records
CC> 11-20 from the cache list again without a call to the database.
 
CC> Is this what I am looking for and didn't know if a package already existed
CC> to do this.  If so, great.  If not, I need to invest some time in developing
CC> one for a project due tomorrow afternoon :-)
 
CC> Thanks
CC> Chris

CC> -Original Message-
CC> From: [EMAIL PROTECTED]
CC> [mailto:[EMAIL PROTECTED] 
CC> Sent: Monday, June 14, 2004 12:02 PM
CC> To: Struts Users Mailing List
CC> Subject: RE: Caching data from resultset



CC> Hmmm...maybe a RowSetDynaClass is what you need?
CC> http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils
CC> /RowSetDynaClass.html 

CC> It's as simple as: 
CC> rs = stmt.executeQuery(MyQueryString); 
CC> // Transform the resultSet to a "disconnected" set of DynaBeans 
CC> RowSetDynaClassrowSet = new RowSetDynaClass(rs, false); 
CC> // Transform the DynaBeans to a list object 
CC> rows = rowSet.getRows(); 

CC> Dennis 




CC> "CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


CC> 06/14/2004 11:47 AM 


CC> Please respond to
CC> "Struts Users Mailing List" <[EMAIL PROTECTED]>



CC> To
CC> 'Struts Users Mailing List' <[EMAIL PROTECTED]> 

CC> cc

CC> Subject
CC> RE: Caching data from resultset






CC> Not a problem because I do have an OTN account.  But I guess the question is
CC> whether i

Re: Struts/Lunar Pages/Resin Issues

2004-06-14 Thread Niall Pemberton
http://caucho.rz.klopotek.de/support/resin-interest/0008/0416.html


- Original Message - 
From: "Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 14, 2004 7:27 PM
Subject: Struts/Lunar Pages/Resin Issues


> According to lunarpages, Struts is causing the following problem, which
> causes Resin to restart continuously.  They have suspended my account
based
> on this problem.  Does this mean anything to anyone else?  THE STDERR log
> is below:
>
> Mike
>
> This is part of the stderr.log from the server pertaining to your account:
>
> [2004-06-14 08:53:39.138] initializing application
> http://www.michaelmcgrady.com/
> Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources

> INFO: Initializing, config='org.apache.struts.util.LocalStrings',
> returnNull=true
> Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources

> INFO: Initializing, config='org.apache.struts.action.ActionResources',
> returnNull=true
> Jun 14, 2004 8:53:42 AM org.apache.struts.util.PropertyMessageResources

> INFO: Initializing, config='resources.properties.messages',
returnNull=true
> srun can't bind to port 127.0.0.1:6802.
> 1) Check for conflicting servers.
> 2) Check that /127.0.0.1 is a valid interface for this machine.
> Resin httpd start at Mon Jun 14 08:53:53 PDT 2004
>
>
>
>
>
> -
> 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: Struts/Lunar Pages/Resin Issues

2004-06-14 Thread mike
That makes sense, James, except my site is not using or accessing struts at 
this time.  That site is only using a single page which merely accesses the 
request object's remoteAddr parameter.So, my product could not be the 
issue.  Did you read the stderr log?  My suspicion is that the server 
administrator at Lunar Pages is OTL.  But, I thought I would ask here 
first.  It seems clear from the stderr log below that my site details could 
not be causing the trouble.


At 11:32 AM 6/14/2004, James Mitchell wrote:
You will need to reexamine YOUR project.  I can assure you that nothing in
the officially released Struts code (or dependencies) is causing this.

--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx
- Original Message -
From: "Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 14, 2004 2:27 PM
Subject: Struts/Lunar Pages/Resin Issues
> According to lunarpages, Struts is causing the following problem, which
> causes Resin to restart continuously.  They have suspended my account
based
> on this problem.  Does this mean anything to anyone else?  THE STDERR log
> is below:
>
> Mike
>
> This is part of the stderr.log from the server pertaining to your account:
>
> [2004-06-14 08:53:39.138] initializing application
> http://www.michaelmcgrady.com/
> Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources

> INFO: Initializing, config='org.apache.struts.util.LocalStrings',
> returnNull=true
> Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources

> INFO: Initializing, config='org.apache.struts.action.ActionResources',
> returnNull=true
> Jun 14, 2004 8:53:42 AM org.apache.struts.util.PropertyMessageResources

> INFO: Initializing, config='resources.properties.messages',
returnNull=true
> srun can't bind to port 127.0.0.1:6802.
> 1) Check for conflicting servers.
> 2) Check that /127.0.0.1 is a valid interface for this machine.
> Resin httpd start at Mon Jun 14 08:53:53 PDT 2004
>
>
>
>
>
> -
> 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: images

2004-06-14 Thread mike
There are lots of ways to do this.  You can use the File class to see if a 
file exists (images are files, of course) and go from there in a million 
directions.

At 11:20 AM 6/14/2004, CRANFORD, CHRIS wrote:
Is there anyway within struts or a known taglib to check if an image exists
at the specific URL or relative URI and if not, permit a separate action to
occur within the JSP???
___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
Email: [EMAIL PROTECTED]

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


Simple struts question.

2004-06-14 Thread Bullard, James
A couple tiles questions. 

1.) Is there any way to have a global-forward forward to a tile, It always
tells me that such a path does not exist, meaning that rather than recognize
the page as tile def it thinks it is a page. 

2.) I am using the same forms for editing and creating new entity instances.
These happen in different tiles, I want to have my local action forward to
the tile which called the action in the case of success or failure. Is this
possible (struts 1.1) 

3.) How can I do a context switch from within action code to forward to a
different context (preferably without writing extra action elements in my
struts-admin.xml config file) 

Thanks in advance , j 

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



Re: Struts/Lunar Pages/Resin Issues

2004-06-14 Thread James Mitchell
You will need to reexamine YOUR project.  I can assure you that nothing in
the officially released Struts code (or dependencies) is causing this.



--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

- Original Message -
From: "Mike" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 14, 2004 2:27 PM
Subject: Struts/Lunar Pages/Resin Issues


> According to lunarpages, Struts is causing the following problem, which
> causes Resin to restart continuously.  They have suspended my account
based
> on this problem.  Does this mean anything to anyone else?  THE STDERR log
> is below:
>
> Mike
>
> This is part of the stderr.log from the server pertaining to your account:
>
> [2004-06-14 08:53:39.138] initializing application
> http://www.michaelmcgrady.com/
> Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources

> INFO: Initializing, config='org.apache.struts.util.LocalStrings',
> returnNull=true
> Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources

> INFO: Initializing, config='org.apache.struts.action.ActionResources',
> returnNull=true
> Jun 14, 2004 8:53:42 AM org.apache.struts.util.PropertyMessageResources

> INFO: Initializing, config='resources.properties.messages',
returnNull=true
> srun can't bind to port 127.0.0.1:6802.
> 1) Check for conflicting servers.
> 2) Check that /127.0.0.1 is a valid interface for this machine.
> Resin httpd start at Mon Jun 14 08:53:53 PDT 2004
>
>
>
>
>
> -
> 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]



Struts/Lunar Pages/Resin Issues

2004-06-14 Thread Mike
According to lunarpages, Struts is causing the following problem, which 
causes Resin to restart continuously.  They have suspended my account based 
on this problem.  Does this mean anything to anyone else?  THE STDERR log 
is below:

Mike
This is part of the stderr.log from the server pertaining to your account:
[2004-06-14 08:53:39.138] initializing application 
http://www.michaelmcgrady.com/
Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.struts.util.LocalStrings', 
returnNull=true
Jun 14, 2004 8:53:40 AM org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='org.apache.struts.action.ActionResources', 
returnNull=true
Jun 14, 2004 8:53:42 AM org.apache.struts.util.PropertyMessageResources 
INFO: Initializing, config='resources.properties.messages', returnNull=true
srun can't bind to port 127.0.0.1:6802.
1) Check for conflicting servers.
2) Check that /127.0.0.1 is a valid interface for this machine.
Resin httpd start at Mon Jun 14 08:53:53 PDT 2004



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


images

2004-06-14 Thread CRANFORD, CHRIS
Is there anyway within struts or a known taglib to check if an image exists
at the specific URL or relative URI and if not, permit a separate action to
occur within the JSP???

___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [EMAIL PROTECTED]



Lunar Pages suspension due to Resin difficulty with Struts

2004-06-14 Thread mike
For unknown reasons lunarpages suspended my account, saying that my struts 
application was causing the server to restart by having the initialization 
procedure tied to the message resources to try and bind to 
127.0.0.1:6802.  Does this make any sense to anyone?  I think someone at 
lunarpages screwed up.  Nothing had changed on my site for at least a 
month.  Then, suddenly they had this problem.  Does this make any sense to 
any of you?


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


Accessing Array element while iterating through Map

2004-06-14 Thread Geoff Simonds
I am trying to iterate through a Map and use the key from the map to 
access an element in a separate array.   I have an array of data points 
and only want to display the entries that are specified in a separate Map. 
 Here is a snippet:






The Map contains data that looks like this:
"1", "1 yr"
"2", "2 yr"
"5", "5 yr" 
etc...

Whe the page is rendered, it draws a bit of the page and the remainder of 
the page remains blank.  I can't find any log entry to indicate that any 
errors are being thrown.  If I print out the results of <%= 
"annualizedReturns[" + year + "].performance" %> between , I get the 
correct value ( ie, annualizedReturns[1].performance) and when I replace 
the property attribute in the bean:write tag above with 
"annualizedReturns[1].performance" hardcoded, it works fine.  What am I 
doing wrong? 

Thanks for any help.

Geoff 

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



Approach for using view Action and save action

2004-06-14 Thread Jyoti Singh
I am working on an application where I read combo
boxes option values from database based on certain
fields values. I do not want to store the option
values in the session. Currently I forward to view
action after saving the form data. View action always
reads data from database for populating actionform
values and the option List values. In normal case
everything works fine. But if save can not be done
because of some data validation errors, I set an
attribute "doNotReadFromDatabse"in request scope in
save action and I check  that attribute in view
action. If it present, I do not modify the form
values. I just read the combo box list values and put
in the request scope.

Is it a good approach? 
Thank you very much,
Jyoti





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

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



how to transfer the link value of tiles to the related-URI in html:link tag...

2004-06-14 Thread Ricky Lee
thanks for reading
 
i know the html tag of struts a little..and in the html:link tag, i can use the page 
attribute to generate a server-relative URI by including the context path... but now i 
have a problem. i couldn't nested a  inside another tag. just like:
 


" target="main">

 
because the link property is from the tiles definition named tiles-defs.xml, some 
definition code like this:
 

 
 
   

 

 
the URL address i access to the jsp page is   http://localhost:8080/forum/index.jsp
 
if i set the link value to "/page/admin/forumAdd.do", the hyperlink change to 
http://localhost:8080/page/admin/forumAdd.do  ,   it lost the path "/forum"..
 
how to transfer the link value to the related-URI automatically just like the page 
attribute of html:link tag..
 
could i use the code like this?
 
" target="main">

 
i try it.. i couldn't work... maybe i lost something important about struts tag..
 
lastly, i change the code like this:
 
 




 
could someone tell me what can i do except this
 
 
 
 
 


-
Do you Yahoo!?
Friends.  Fun. Try the all-new Yahoo! Messenger

RE: Caching data from resultset

2004-06-14 Thread Kies, Daniel
Here is where the inline views are needed.

Try it like this:

select * 
  from ( select rownum r, --add your other records
   from (SELECT * 
 FROM some_table)) WHERE r between 11 and 20

I can't remeber why you can't use:
WHERE ROWNUM BETWEEN 11 AND 20

It has something to do with rownum being a sequential number coming back
from the resultset.  That's why you need the inline views to order your
resultset properly.  

Here is a real query that I am running:

select * 
from ( select rownum r, 
 INSURED_NAME, 
 POLICY_NUMBER,
 POLICY_EFFECTIVE_DATE,
 WRITTEN_PREMIUM_W_PC, 
 EARNED_PREMIUM_W_PC, 
 TOTAL_LOSSES_INCURRED, 
 INCURRED_LOSS_RATIO*100, 
 commission_expense 
   from (select trim(t.INSURED_NAME) INSURED_NAME, 
t.POLICY_NUMBER,
  t.POLICY_EFFECTIVE_DATE,
t.WRITTEN_PREMIUM_W_PC, 
t.EARNED_PREMIUM_W_PC, 
t.TOTAL_LOSSES_INCURRED, 
  t.INCURRED_LOSS_RATIO, 
t.commission_expense 
 from some_insurance_table t 
  where t.ACCIDENT_YEAR = '2003'
order by trim(t.INSURED_NAME) ASC,
t.POLICY_EFFECTIVE_DATE desc )) 
WHERE r between 11 and 20

If you still have problems getting your query running, send it to me
directly and I'll see if can't get it going.

Dan

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 11:00 AM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


This works fine when:

  WHERE ROWNUM BETWEEN 1 and 10

But when I use:

  WHERE ROWNUM BETWEEN 11 AND 20

I get no rows returned.

Any ideas why?

-Original Message-
From: Kies, Daniel [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:52 PM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


I recently implemented pagination for resultsets using Oracle 9i.  Instead
of loading up the entire resultset into memory, I just queried based on the
records that the user requested.  

1) Before getting the records, I first counted the records that were coming
back in the result.  That way I can say to the user...showing results 26-50
of 2,183.  
2) For the first resultest, I would run my query appended with a "rownum
between 1 and 25" 
3) If the user paginates, then I throw the pagination numbers into the query
so the query would be appended with "rownum between x and y"

This is a pretty simple solution to pagination with Oracle.  You may have
some issues getting your resultset ordered properly coming from Oracle, but
using inline views should take care of that.

The advantage to doing this is scaleability.  I am running this code on top
of a Data Warehouse where every milisecond counts.  Using rownum for the
resultset off the database limits query execution time and allows for
resultsets of any size.  Using resultsets with a rownum will allow Oracle to
cache the SQL you are using to execute quicker.

Let Oracle do the work.

My $ .02

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 10:39 AM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


Not sure how much this is going to help because we're averaging about 15
seconds to transform a resultset of 1200 records into dynabeans.  My goal
really is to be able to dynamically traverse only the needed records within
my resultset.
 
So, when my resultset gets returned and I forward to page 1 (assuming we
show 10 hits per page), I would fetch rows 1-10 and cache their data.  Then
when the user hits page 2, I would fetch 10 more rows from the resultset and
append records 11-20 in the cache.  So at this point, records 1-20 are
cached and my resultset it pointing to record 21.
 
Now, if the user hits the previous page button, my application would move
the offset back to current offset - viewable count (11-10=1) and it would
pull records 1-10 from the cache.  This avoids calling the database for
data.  Then hitting next page would check and see that the resultset pointer
is at 21 but offset < resultset offset, so assumes cache.  It pulls records
11-20 from the cache list again without a call to the database.
 
Is this what I am looking for and didn't know if a package already existed
to do this.  If so, great.  If not, I need to invest some time in developing
one for a project due tomorrow afternoon :-)
 
Thanks
Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:02 PM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



Hmmm...maybe a RowSetDynaClass is what you need?
http://jakarta.apache.org/commons/beanutils/api/org/apache/comm

RE: Caching data from resultset

2004-06-14 Thread Kies, Daniel
Here is where the inline views are needed.

Try it like this:

select * 
  from ( select rownum r, --add your other records
   from (SELECT * 
 FROM some_table)) WHERE r between 11 and 20

I can't remeber why you can't use:
WHERE ROWNUM BETWEEN 11 AND 20

It has something to do with rownum being a sequential number coming back
from the resultset.  That's why you need the inline views to order your
resultset properly.  

Here is a real query that I am running:

select * 
from ( select rownum r, 
 INSURED_NAME, 
 POLICY_NUMBER,
 POLICY_EFFECTIVE_DATE,
 WRITTEN_PREMIUM_W_PC, 
 EARNED_PREMIUM_W_PC, 
 TOTAL_LOSSES_INCURRED, 
 INCURRED_LOSS_RATIO*100, 
 commission_expense 
   from (select trim(t.INSURED_NAME) INSURED_NAME, 
t.POLICY_NUMBER,
  t.POLICY_EFFECTIVE_DATE,
t.WRITTEN_PREMIUM_W_PC, 
t.EARNED_PREMIUM_W_PC, 
t.TOTAL_LOSSES_INCURRED, 
  t.INCURRED_LOSS_RATIO, 
t.commission_expense 
 from some_insurance_table t 
  where t.ACCIDENT_YEAR = '2003'
order by trim(t.INSURED_NAME) ASC,
t.POLICY_EFFECTIVE_DATE desc )) 
WHERE r between 11 and 20

If you still have problems getting your query running, send it to me
directly and I'll see if can't get it going.

Dan

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 11:00 AM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


This works fine when:

  WHERE ROWNUM BETWEEN 1 and 10

But when I use:

  WHERE ROWNUM BETWEEN 11 AND 20

I get no rows returned.

Any ideas why?

-Original Message-
From: Kies, Daniel [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:52 PM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


I recently implemented pagination for resultsets using Oracle 9i.  Instead
of loading up the entire resultset into memory, I just queried based on the
records that the user requested.  

1) Before getting the records, I first counted the records that were coming
back in the result.  That way I can say to the user...showing results 26-50
of 2,183.  
2) For the first resultest, I would run my query appended with a "rownum
between 1 and 25" 
3) If the user paginates, then I throw the pagination numbers into the query
so the query would be appended with "rownum between x and y"

This is a pretty simple solution to pagination with Oracle.  You may have
some issues getting your resultset ordered properly coming from Oracle, but
using inline views should take care of that.

The advantage to doing this is scaleability.  I am running this code on top
of a Data Warehouse where every milisecond counts.  Using rownum for the
resultset off the database limits query execution time and allows for
resultsets of any size.  Using resultsets with a rownum will allow Oracle to
cache the SQL you are using to execute quicker.

Let Oracle do the work.

My $ .02

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 10:39 AM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


Not sure how much this is going to help because we're averaging about 15
seconds to transform a resultset of 1200 records into dynabeans.  My goal
really is to be able to dynamically traverse only the needed records within
my resultset.
 
So, when my resultset gets returned and I forward to page 1 (assuming we
show 10 hits per page), I would fetch rows 1-10 and cache their data.  Then
when the user hits page 2, I would fetch 10 more rows from the resultset and
append records 11-20 in the cache.  So at this point, records 1-20 are
cached and my resultset it pointing to record 21.
 
Now, if the user hits the previous page button, my application would move
the offset back to current offset - viewable count (11-10=1) and it would
pull records 1-10 from the cache.  This avoids calling the database for
data.  Then hitting next page would check and see that the resultset pointer
is at 21 but offset < resultset offset, so assumes cache.  It pulls records
11-20 from the cache list again without a call to the database.
 
Is this what I am looking for and didn't know if a package already existed
to do this.  If so, great.  If not, I need to invest some time in developing
one for a project due tomorrow afternoon :-)
 
Thanks
Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:02 PM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



Hmmm...maybe a RowSetDynaClass is what you need?
http://jakarta.apache.org/commons/beanutils/api/org/apache/comm

Query question

2004-06-14 Thread CRANFORD, CHRIS
Anyone here familiar with using CATSEARCH type oracle queries?  If so, I am
trying to do something like:

SELECT COLNAME
   FROM MYTABLE
 WHERE CATSEARCH(MYFIELD,'motor',NULL) > 0 
 OR SHORT_DESCRIPTION LIKE '%motor%'

The problem is I get an oracle error about functional invocation; however I
and use an AND in my where clause and no errors occur.  Thanks for any help
anyone can provide.

___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [EMAIL PROTECTED]



RE: Caching data from resultset

2004-06-14 Thread CRANFORD, CHRIS
This works fine when:

  WHERE ROWNUM BETWEEN 1 and 10

But when I use:

  WHERE ROWNUM BETWEEN 11 AND 20

I get no rows returned.

Any ideas why?

-Original Message-
From: Kies, Daniel [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:52 PM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


I recently implemented pagination for resultsets using Oracle 9i.  Instead
of loading up the entire resultset into memory, I just queried based on the
records that the user requested.  

1) Before getting the records, I first counted the records that were coming
back in the result.  That way I can say to the user...showing results 26-50
of 2,183.  
2) For the first resultest, I would run my query appended with a "rownum
between 1 and 25" 
3) If the user paginates, then I throw the pagination numbers into the query
so the query would be appended with "rownum between x and y"

This is a pretty simple solution to pagination with Oracle.  You may have
some issues getting your resultset ordered properly coming from Oracle, but
using inline views should take care of that.

The advantage to doing this is scaleability.  I am running this code on top
of a Data Warehouse where every milisecond counts.  Using rownum for the
resultset off the database limits query execution time and allows for
resultsets of any size.  Using resultsets with a rownum will allow Oracle to
cache the SQL you are using to execute quicker.

Let Oracle do the work.

My $ .02

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 10:39 AM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


Not sure how much this is going to help because we're averaging about 15
seconds to transform a resultset of 1200 records into dynabeans.  My goal
really is to be able to dynamically traverse only the needed records within
my resultset.
 
So, when my resultset gets returned and I forward to page 1 (assuming we
show 10 hits per page), I would fetch rows 1-10 and cache their data.  Then
when the user hits page 2, I would fetch 10 more rows from the resultset and
append records 11-20 in the cache.  So at this point, records 1-20 are
cached and my resultset it pointing to record 21.
 
Now, if the user hits the previous page button, my application would move
the offset back to current offset - viewable count (11-10=1) and it would
pull records 1-10 from the cache.  This avoids calling the database for
data.  Then hitting next page would check and see that the resultset pointer
is at 21 but offset < resultset offset, so assumes cache.  It pulls records
11-20 from the cache list again without a call to the database.
 
Is this what I am looking for and didn't know if a package already existed
to do this.  If so, great.  If not, I need to invest some time in developing
one for a project due tomorrow afternoon :-)
 
Thanks
Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:02 PM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



Hmmm...maybe a RowSetDynaClass is what you need?
http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils
/RowSetDynaClass.html 

It's as simple as: 
rs = stmt.executeQuery(MyQueryString); 
// Transform the resultSet to a "disconnected" set of DynaBeans 
RowSetDynaClassrowSet = new RowSetDynaClass(rs, false); 
// Transform the DynaBeans to a list object 
rows = rowSet.getRows(); 

Dennis 




"CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


06/14/2004 11:47 AM 


Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
'Struts Users Mailing List' <[EMAIL PROTECTED]> 

cc

Subject
RE: Caching data from resultset






Not a problem because I do have an OTN account.  But I guess the question is
whether it will work with Oracle 8i or only 9?

In the past what I have done is used introspection to convert the resultset
via metadata into a collection of objects that represent a record in the
database and use this "collection" in the JSP layer.  I typically notice
that this is where the MAJORITY of my time is consumed creating these
objects in memory, especially on very large data sets.

Ideally I want to create a business wrapper than extends some form of
caching resultset mechanism that permits me to save already viewed rows in
memory and only "fetch" ahead rows from the resultset as the user jumps to
the next page.  Since oracle 8i only provides forward scrolling in the
resultset, its important that previously viewed records be cached in the
bean.

Would all this be functionality available using CachedResultSet (ocrs12.zip
from oracle) via 8i database and jdk1.2? 

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 11:07 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



http://otn.oracle.com/software/tech/java/sqlj_jdbc/ht

RE: Caching data from resultset

2004-06-14 Thread Kies, Daniel
I recently implemented pagination for resultsets using Oracle 9i.  Instead
of loading up the entire resultset into memory, I just queried based on the
records that the user requested.  

1) Before getting the records, I first counted the records that were coming
back in the result.  That way I can say to the user...showing results 26-50
of 2,183.  
2) For the first resultest, I would run my query appended with a "rownum
between 1 and 25" 
3) If the user paginates, then I throw the pagination numbers into the query
so the query would be appended with "rownum between x and y"

This is a pretty simple solution to pagination with Oracle.  You may have
some issues getting your resultset ordered properly coming from Oracle, but
using inline views should take care of that.

The advantage to doing this is scaleability.  I am running this code on top
of a Data Warehouse where every milisecond counts.  Using rownum for the
resultset off the database limits query execution time and allows for
resultsets of any size.  Using resultsets with a rownum will allow Oracle to
cache the SQL you are using to execute quicker.

Let Oracle do the work.

My $ .02

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 10:39 AM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


Not sure how much this is going to help because we're averaging about 15
seconds to transform a resultset of 1200 records into dynabeans.  My goal
really is to be able to dynamically traverse only the needed records within
my resultset.
 
So, when my resultset gets returned and I forward to page 1 (assuming we
show 10 hits per page), I would fetch rows 1-10 and cache their data.  Then
when the user hits page 2, I would fetch 10 more rows from the resultset and
append records 11-20 in the cache.  So at this point, records 1-20 are
cached and my resultset it pointing to record 21.
 
Now, if the user hits the previous page button, my application would move
the offset back to current offset - viewable count (11-10=1) and it would
pull records 1-10 from the cache.  This avoids calling the database for
data.  Then hitting next page would check and see that the resultset pointer
is at 21 but offset < resultset offset, so assumes cache.  It pulls records
11-20 from the cache list again without a call to the database.
 
Is this what I am looking for and didn't know if a package already existed
to do this.  If so, great.  If not, I need to invest some time in developing
one for a project due tomorrow afternoon :-)
 
Thanks
Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:02 PM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



Hmmm...maybe a RowSetDynaClass is what you need?
http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils
/RowSetDynaClass.html 

It's as simple as: 
rs = stmt.executeQuery(MyQueryString); 
// Transform the resultSet to a "disconnected" set of DynaBeans 
RowSetDynaClassrowSet = new RowSetDynaClass(rs, false); 
// Transform the DynaBeans to a list object 
rows = rowSet.getRows(); 

Dennis 




"CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


06/14/2004 11:47 AM 


Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
'Struts Users Mailing List' <[EMAIL PROTECTED]> 

cc

Subject
RE: Caching data from resultset






Not a problem because I do have an OTN account.  But I guess the question is
whether it will work with Oracle 8i or only 9?

In the past what I have done is used introspection to convert the resultset
via metadata into a collection of objects that represent a record in the
database and use this "collection" in the JSP layer.  I typically notice
that this is where the MAJORITY of my time is consumed creating these
objects in memory, especially on very large data sets.

Ideally I want to create a business wrapper than extends some form of
caching resultset mechanism that permits me to save already viewed rows in
memory and only "fetch" ahead rows from the resultset as the user jumps to
the next page.  Since oracle 8i only provides forward scrolling in the
resultset, its important that previously viewed records be cached in the
bean.

Would all this be functionality available using CachedResultSet (ocrs12.zip
from oracle) via 8i database and jdk1.2? 

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 11:07 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html 

ocrs12.zip appears to be a library containing Oracles imlementation of
CachedResultSet and there is a JDK 1.2 version.  However, it appears that
you need to be a member of the OTN. 

Dennis 




"CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


06/14/2004 09:54 AM 


Please respond to
"Struts Users Mailing List" <[EMAIL

RE: Caching data from resultset

2004-06-14 Thread CRANFORD, CHRIS
I also failed to mention that a database connection is unqiue for each user
session and is persisted at the session-layer.  Not sure if that makes a
difference in how to best do what I'm after but I felt it was important
mentioning is its how the user/security model was originally designed.

-Original Message-
From: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:39 PM
To: 'Struts Users Mailing List'
Subject: RE: Caching data from resultset


Not sure how much this is going to help because we're averaging about 15
seconds to transform a resultset of 1200 records into dynabeans.  My goal
really is to be able to dynamically traverse only the needed records within
my resultset.
 
So, when my resultset gets returned and I forward to page 1 (assuming we
show 10 hits per page), I would fetch rows 1-10 and cache their data.  Then
when the user hits page 2, I would fetch 10 more rows from the resultset and
append records 11-20 in the cache.  So at this point, records 1-20 are
cached and my resultset it pointing to record 21.
 
Now, if the user hits the previous page button, my application would move
the offset back to current offset - viewable count (11-10=1) and it would
pull records 1-10 from the cache.  This avoids calling the database for
data.  Then hitting next page would check and see that the resultset pointer
is at 21 but offset < resultset offset, so assumes cache.  It pulls records
11-20 from the cache list again without a call to the database.
 
Is this what I am looking for and didn't know if a package already existed
to do this.  If so, great.  If not, I need to invest some time in developing
one for a project due tomorrow afternoon :-)
 
Thanks
Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:02 PM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



Hmmm...maybe a RowSetDynaClass is what you need?
http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils
/RowSetDynaClass.html 

It's as simple as: 
rs = stmt.executeQuery(MyQueryString); 
// Transform the resultSet to a "disconnected" set of DynaBeans 
RowSetDynaClassrowSet = new RowSetDynaClass(rs, false); 
// Transform the DynaBeans to a list object 
rows = rowSet.getRows(); 

Dennis 




"CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


06/14/2004 11:47 AM 


Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
'Struts Users Mailing List' <[EMAIL PROTECTED]> 

cc

Subject
RE: Caching data from resultset






Not a problem because I do have an OTN account.  But I guess the question is
whether it will work with Oracle 8i or only 9?

In the past what I have done is used introspection to convert the resultset
via metadata into a collection of objects that represent a record in the
database and use this "collection" in the JSP layer.  I typically notice
that this is where the MAJORITY of my time is consumed creating these
objects in memory, especially on very large data sets.

Ideally I want to create a business wrapper than extends some form of
caching resultset mechanism that permits me to save already viewed rows in
memory and only "fetch" ahead rows from the resultset as the user jumps to
the next page.  Since oracle 8i only provides forward scrolling in the
resultset, its important that previously viewed records be cached in the
bean.

Would all this be functionality available using CachedResultSet (ocrs12.zip
from oracle) via 8i database and jdk1.2? 

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 11:07 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html 

ocrs12.zip appears to be a library containing Oracles imlementation of
CachedResultSet and there is a JDK 1.2 version.  However, it appears that
you need to be a member of the OTN. 

Dennis 




"CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


06/14/2004 09:54 AM 


Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
'Struts Users Mailing List' <[EMAIL PROTECTED]> 

cc

Subject
RE: Caching data from resultset






But CachedRowSet isn't available in JDK 1.2.2_014 right?
I'm limited to this JDK because IBM AIX version our OS runs doesn't support
a JDK after this version.

-Original Message-
From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 8:22 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset


Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've
already given a thought to the amount of data that you'd be handling,
consider it to be feasible and reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JD

RE: Caching data from resultset

2004-06-14 Thread CRANFORD, CHRIS
Not sure how much this is going to help because we're averaging about 15
seconds to transform a resultset of 1200 records into dynabeans.  My goal
really is to be able to dynamically traverse only the needed records within
my resultset.
 
So, when my resultset gets returned and I forward to page 1 (assuming we
show 10 hits per page), I would fetch rows 1-10 and cache their data.  Then
when the user hits page 2, I would fetch 10 more rows from the resultset and
append records 11-20 in the cache.  So at this point, records 1-20 are
cached and my resultset it pointing to record 21.
 
Now, if the user hits the previous page button, my application would move
the offset back to current offset - viewable count (11-10=1) and it would
pull records 1-10 from the cache.  This avoids calling the database for
data.  Then hitting next page would check and see that the resultset pointer
is at 21 but offset < resultset offset, so assumes cache.  It pulls records
11-20 from the cache list again without a call to the database.
 
Is this what I am looking for and didn't know if a package already existed
to do this.  If so, great.  If not, I need to invest some time in developing
one for a project due tomorrow afternoon :-)
 
Thanks
Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 12:02 PM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



Hmmm...maybe a RowSetDynaClass is what you need?
http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils
/RowSetDynaClass.html 

It's as simple as: 
rs = stmt.executeQuery(MyQueryString); 
// Transform the resultSet to a "disconnected" set of DynaBeans 
RowSetDynaClassrowSet = new RowSetDynaClass(rs, false); 
// Transform the DynaBeans to a list object 
rows = rowSet.getRows(); 

Dennis 




"CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


06/14/2004 11:47 AM 


Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
'Struts Users Mailing List' <[EMAIL PROTECTED]> 

cc

Subject
RE: Caching data from resultset






Not a problem because I do have an OTN account.  But I guess the question is
whether it will work with Oracle 8i or only 9?

In the past what I have done is used introspection to convert the resultset
via metadata into a collection of objects that represent a record in the
database and use this "collection" in the JSP layer.  I typically notice
that this is where the MAJORITY of my time is consumed creating these
objects in memory, especially on very large data sets.

Ideally I want to create a business wrapper than extends some form of
caching resultset mechanism that permits me to save already viewed rows in
memory and only "fetch" ahead rows from the resultset as the user jumps to
the next page.  Since oracle 8i only provides forward scrolling in the
resultset, its important that previously viewed records be cached in the
bean.

Would all this be functionality available using CachedResultSet (ocrs12.zip
from oracle) via 8i database and jdk1.2? 

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 11:07 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html 

ocrs12.zip appears to be a library containing Oracles imlementation of
CachedResultSet and there is a JDK 1.2 version.  However, it appears that
you need to be a member of the OTN. 

Dennis 




"CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


06/14/2004 09:54 AM 


Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
'Struts Users Mailing List' <[EMAIL PROTECTED]> 

cc

Subject
RE: Caching data from resultset






But CachedRowSet isn't available in JDK 1.2.2_014 right?
I'm limited to this JDK because IBM AIX version our OS runs doesn't support
a JDK after this version.

-Original Message-
From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 8:22 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset


Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've
already given a thought to the amount of data that you'd be handling,
consider it to be feasible and reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html

I believe this could be somewhat similar to what you are looking for.

HTH,
Freddy.

-Mensaje original-
De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset

This will work for the "paging" aspect, but I'm more concerned with ways to
cache the "resultset" itself in the session to avoid repeative database
calls on each page request.

Indexed Property with checkbox

2004-06-14 Thread Davide Gurgone
Hi all,
I'm new of this newsgroup and I tried to find about the subject, but I don't
succeed :( ...

however... I have a bean that extends ActionForm with also this R/W property

  private String[] esami;
  public String getEsami(int index) {
return esami[index];
  }
  public void setEsami(int index, String value) {
esami[index] = value;
  }

In the JSP I have in session *another* object called "esami" that contains a
list of checkboxes:

  
  
]" 
   value=""
   id=""/>

  

this code whant to replicate the  tag, with the indexed property.
I whanna do this thing because the value of the  could not insert
a runtime value on it (e.COD_RISULT).

In this way the code does not run and raise a BeanUtils.populate exception.
I think I wrong the way, But I don't know what can do...

I hope I'll not create a flame,

best reguards,

--
Davide Gurgone




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



RE: Caching data from resultset

2004-06-14 Thread DGraham

Hmmm...maybe a RowSetDynaClass is what
you need?  http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils/RowSetDynaClass.html

It's as simple as:
    rs = stmt.executeQuery(MyQueryString);
    // Transform the resultSet
to a "disconnected" set of DynaBeans
    RowSetDynaClassrowSet
= new RowSetDynaClass(rs, false);
    // Transform the DynaBeans
to a list object
    rows = rowSet.getRows();

Dennis






"CRANFORD, CHRIS"
<[EMAIL PROTECTED]> 
06/14/2004 11:47 AM



Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
'Struts Users Mailing List'
<[EMAIL PROTECTED]>


cc



Subject
RE: Caching data from resultset








Not a problem because I do have an OTN account.  But
I guess the question is
whether it will work with Oracle 8i or only 9?
 
In the past what I have done is used introspection to convert the resultset
via metadata into a collection of objects that represent a record in the
database and use this "collection" in the JSP layer.  I
typically notice
that this is where the MAJORITY of my time is consumed creating these
objects in memory, especially on very large data sets.
 
Ideally I want to create a business wrapper than extends some form of
caching resultset mechanism that permits me to save already viewed rows
in
memory and only "fetch" ahead rows from the resultset as the
user jumps to
the next page.  Since oracle 8i only provides forward scrolling in
the
resultset, its important that previously viewed records be cached in the
bean.
 
Would all this be functionality available using CachedResultSet (ocrs12.zip
from oracle) via 8i database and jdk1.2? 

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 11:07 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html


ocrs12.zip appears to be a library containing Oracles imlementation of
CachedResultSet and there is a JDK 1.2 version.  However, it appears
that
you need to be a member of the OTN. 

Dennis 




"CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


06/14/2004 09:54 AM 


Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
'Struts Users Mailing List' <[EMAIL PROTECTED]> 

cc

Subject
RE: Caching data from resultset

                





But CachedRowSet isn't available in JDK 1.2.2_014 right?
I'm limited to this JDK because IBM AIX version our OS runs doesn't support
a JDK after this version.

-Original Message-
From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 8:22 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset


Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've
already given a thought to the amount of data that you'd be handling,
consider it to be feasible and reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html

I believe this could be somewhat similar to what you are looking for.

HTH,
Freddy.

-Mensaje original-
De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset

This will work for the "paging" aspect, but I'm more concerned
with ways to
cache the "resultset" itself in the session to avoid repeative
database
calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive

> the data and looping through records to place the cursor at the right

> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache
the
> resultset object and as the user navigates forward, fetch row-by-row

> of only those required for the display.  Then if the user navigates

> backward, those
> records are in a cache inside this bean so the cache is referenced
for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (70

RE: Caching data from resultset

2004-06-14 Thread CRANFORD, CHRIS
Not a problem because I do have an OTN account.  But I guess the question is
whether it will work with Oracle 8i or only 9?
 
In the past what I have done is used introspection to convert the resultset
via metadata into a collection of objects that represent a record in the
database and use this "collection" in the JSP layer.  I typically notice
that this is where the MAJORITY of my time is consumed creating these
objects in memory, especially on very large data sets.
 
Ideally I want to create a business wrapper than extends some form of
caching resultset mechanism that permits me to save already viewed rows in
memory and only "fetch" ahead rows from the resultset as the user jumps to
the next page.  Since oracle 8i only provides forward scrolling in the
resultset, its important that previously viewed records be cached in the
bean.
 
Would all this be functionality available using CachedResultSet (ocrs12.zip
from oracle) via 8i database and jdk1.2? 

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 11:07 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset



http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html 

ocrs12.zip appears to be a library containing Oracles imlementation of
CachedResultSet and there is a JDK 1.2 version.  However, it appears that
you need to be a member of the OTN. 

Dennis 




"CRANFORD, CHRIS" <[EMAIL PROTECTED]> 


06/14/2004 09:54 AM 


Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>



To
'Struts Users Mailing List' <[EMAIL PROTECTED]> 

cc

Subject
RE: Caching data from resultset






But CachedRowSet isn't available in JDK 1.2.2_014 right?
I'm limited to this JDK because IBM AIX version our OS runs doesn't support
a JDK after this version.

-Original Message-
From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 8:22 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset


Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've
already given a thought to the amount of data that you'd be handling,
consider it to be feasible and reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html

I believe this could be somewhat similar to what you are looking for.

HTH,
Freddy.

-Mensaje original-
De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset

This will work for the "paging" aspect, but I'm more concerned with ways to
cache the "resultset" itself in the session to avoid repeative database
calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive 
> the data and looping through records to place the cursor at the right 
> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache the
> resultset object and as the user navigates forward, fetch row-by-row 
> of only those required for the display.  Then if the user navigates 
> backward, those
> records are in a cache inside this bean so the cache is referenced for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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: [EMA

Re: Hi:

2004-06-14 Thread Andrey Rogov

Struttin with STRUTS lessons from Rick Reumann
www.reumann.net

Free JAKARTA-STRUTS LIVE book
http://www.theserverside.com/books/sourcebeat/JakartaStrutsLive/index.tss



g> Hi All,
g>  I m a new user of struts.still on R&D.on my forthcoming project i m going 
to work on struts.can any body suggest me a really good book for struts ?
 
g> Thnx in advance.
 
g> Anjali

g> Yahoo! India Matrimony: Find your partner online.



-- 
Best regards,
 Andreymailto:[EMAIL PROTECTED]


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



RE: Different input formats

2004-06-14 Thread Robert Taylor
Use Strings as data memebers in your action form when ever possible.
You can "translate" the input in the action class performing what ever
logic is necessary. 

robert

> -Original Message-
> From: Renato Romano [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 14, 2004 11:29 AM
> To: 'Struts Users Mailing List'
> Subject: Different input formats
> 
> 
> I have an  input in my form, in which the user should put a
> float value. Now I would like to allow the user to enter the Italian
> decimal separator, that is comma (",") instead of dot ("."), but of
> course I got a null property value for the Float in my ActionForm!! I
> then tried to do this by myself, and it works fine, but I have to
> directly access request.getParameter("...") which is undesirable, also
> because now I have a form in which the former is nested, and so
> request.getParameter("...") should take this into account.
> 
> Is there a better and "standard" solution to this ?
> Thanks everyone
> 
> Renato
> 
> Renato Romano
> Sistemi e Telematica S.p.A.
> Calata Grazie - Vial Al Molo Giano
> 16127 - GENOVA
> 
> e-mail: [EMAIL PROTECTED]
> Tel.:   010 2712603
> _
> 
> 
> -
> 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:

2004-06-14 Thread Anderson, James H [IT]
www.amazon.com or the Amazon site in the UK

-Original Message-
From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 8:32 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: 


Hi Group,

I am from Mumbai/India. Looking to buy 'Struts in Action' book for a long time. But 
could not get it.
Does anyone have address from where i can get it ?

Regards,
Janarthan S

-Original Message-
From: Shilpa Vaidya [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 4:25 PM
To: 'Struts Users Mailing List'
Subject: RE: 



hi anjali...
I would say the best is James GoodWill wrox publication  for new
learners
regds
shilpa



-Original Message-
From: gitanjali [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 4:03 PM
To: [EMAIL PROTECTED]
Subject: Hi:


Hi All,
 I m a new user of struts.still on R&D.on my forthcoming project i m
going to work on struts.can any body suggest me a really good book for
struts ?

Thnx in advance.

Anjali

Yahoo! India Matrimony: Find your partner online.

-- 


"This e-mail message may contain confidential, proprietary or legally privileged 
information. It 
should not be used by anyone who is not the original intended recipient. If you have 
erroneously 
received this message, please delete it immediately and notify the sender. The 
recipient 
acknowledges that ICICI Bank or its subsidiaries and associated companies,  
(collectively "ICICI 
Group"), are unable to exercise control or ensure or guarantee the integrity of/over 
the contents of the information contained in e-mail transmissions and further 
acknowledges that any views 
expressed in this message are those of the individual sender and no binding nature of 
the message shall be implied or assumed unless the sender does so expressly with due 
authority of ICICI Group.Before opening any attachments please check them for viruses 
and defects." 



-
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]



Issue resolved getAsString : component context is not defined

2004-06-14 Thread Shiva Narayanan
Hi All,

I finally found the cause of this problem.

I had the following tag in the html.



I replaced this tag with simple  tag and I am not getting this error 
anymore.




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



RE: Caching data from resultset

2004-06-14 Thread DGraham

Actually, it looks like this is only
available for Oracle 9 or greater.  Sorry about that.  You might
have to go with the standalone rowset.jar.

Dennis







[EMAIL PROTECTED]

06/14/2004 11:07 AM



Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
"Struts Users Mailing
List" <[EMAIL PROTECTED]>


cc



Subject
RE: Caching data from resultset









http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html


ocrs12.zip appears to be a library containing Oracles imlementation of
CachedResultSet and there is a JDK 1.2 version.  However, it appears
that you need to be a member of the OTN. 

Dennis 





"CRANFORD, CHRIS"
<[EMAIL PROTECTED]> 
06/14/2004 09:54 AM





Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
'Struts Users Mailing
List' <[EMAIL PROTECTED]> 


cc



Subject
RE: Caching data from resultset










But CachedRowSet isn't available in JDK 1.2.2_014 right?
I'm limited to this JDK because IBM AIX version our OS runs doesn't support
a JDK after this version.

-Original Message-
From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 8:22 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset


Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've
already given a thought to the amount of data that you'd be handling,
consider it to be feasible and reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html

I believe this could be somewhat similar to what you are looking for.

HTH,
Freddy.

-Mensaje original-
De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset

This will work for the "paging" aspect, but I'm more concerned
with ways to
cache the "resultset" itself in the session to avoid repeative
database
calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive

> the data and looping through records to place the cursor at the right

> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache
the
> resultset object and as the user navigates forward, fetch row-by-row

> of only those required for the display.  Then if the user navigates

> backward, those
> records are in a cache inside this bean so the cache is referenced
for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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]

-
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]

Different input formats

2004-06-14 Thread Renato Romano
I have an  input in my form, in which the user should put a
float value. Now I would like to allow the user to enter the Italian
decimal separator, that is comma (",") instead of dot ("."), but of
course I got a null property value for the Float in my ActionForm!! I
then tried to do this by myself, and it works fine, but I have to
directly access request.getParameter("...") which is undesirable, also
because now I have a form in which the former is nested, and so
request.getParameter("...") should take this into account.

Is there a better and "standard" solution to this ?
Thanks everyone

Renato

Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: [EMAIL PROTECTED]
Tel.:   010 2712603
_


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



response already committed

2004-06-14 Thread Ayoub, Ashraf A
Dears,

In my struts application I open another application using Url conection,
this application gets a PDF file and write it to my output stream.

I tried the application and if I run my client code from JSP ==> it work
fine, but if I run it inside Struts Action I get that the response is
already committed, although I return null in the action forward.

 

Any help?

 

Thanks



RE: Caching data from resultset

2004-06-14 Thread DGraham

http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/jdbc9201.html

ocrs12.zip appears to be a library containing
Oracles imlementation of CachedResultSet and there is a JDK 1.2 version.
 However, it appears that you need to be a member of the OTN.

Dennis






"CRANFORD, CHRIS"
<[EMAIL PROTECTED]> 
06/14/2004 09:54 AM



Please respond to
"Struts Users Mailing List" <[EMAIL PROTECTED]>





To
'Struts Users Mailing List'
<[EMAIL PROTECTED]>


cc



Subject
RE: Caching data from resultset








But CachedRowSet isn't available in JDK 1.2.2_014
right?
I'm limited to this JDK because IBM AIX version our OS runs doesn't support
a JDK after this version.

-Original Message-
From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 8:22 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset


Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've
already given a thought to the amount of data that you'd be handling,
consider it to be feasible and reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html

I believe this could be somewhat similar to what you are looking for.

HTH,
Freddy.

-Mensaje original-
De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset

This will work for the "paging" aspect, but I'm more concerned
with ways to
cache the "resultset" itself in the session to avoid repeative
database
calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive

> the data and looping through records to place the cursor at the right

> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache
the
> resultset object and as the user navigates forward, fetch row-by-row

> of only those required for the display.  Then if the user navigates

> backward, those
> records are in a cache inside this bean so the cache is referenced
for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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]


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

RE: Caching data from resultset - reply

2004-06-14 Thread Kathy Zhou
I was using rowset.jar before I started JDK 1.4. I think you could download
it from the internet. Not sure if it works on your case.

Let me know if you need me to send you this package.

Kathy


> -Original Message-
> From: CRANFORD, CHRIS [SMTP:[EMAIL PROTECTED]
> Sent: Monday, June 14, 2004 9:55 AM
> To:   'Struts Users Mailing List'
> Subject:  RE: Caching data from resultset
> 
> But CachedRowSet isn't available in JDK 1.2.2_014 right?
> I'm limited to this JDK because IBM AIX version our OS runs doesn't
> support
> a JDK after this version.
> 
> -Original Message-
> From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 14, 2004 8:22 AM
> To: Struts Users Mailing List
> Subject: RE: Caching data from resultset
> 
> 
> Hi Leon,
> 
> I suppose that, since you're talking about caching the ResultSet, you've
> already given a thought to the amount of data that you'd be handling,
> consider it to be feasible and reasonable to cache it.
> 
> This said, why don't you take a look at CachedRowSet?
> 
> http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html
> 
> http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html
> 
> I believe this could be somewhat similar to what you are looking for.
> 
> HTH,
> Freddy.
> 
> -Mensaje original-
> De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
> Enviado el: lunes, 14 de junio de 2004 13:45
> Para: 'Struts Users Mailing List'
> Asunto: RE: Caching data from resultset
> 
> This will work for the "paging" aspect, but I'm more concerned with ways
> to
> cache the "resultset" itself in the session to avoid repeative database
> calls on each page request.
> 
> -Original Message-
> From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
> Sent: Monday, June 14, 2004 6:21 AM
> To: Struts Users Mailing List
> Subject: AW: Caching data from resultset
> 
> 
> Take a look at the pager taglib.
> 
> http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html
> 
> regards
> Leon
> 
> > -Ursprüngliche Nachricht-
> > Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> > Gesendet: Montag, 14. Juni 2004 11:23
> > An: '[EMAIL PROTECTED]'
> > Betreff: Caching data from resultset
> > 
> > I am working with Oracle 8i and JDBC and was curious how others have
> > implemented paging through large record resultsets from a JSP 
> > application without making a SQL call from page to page to retreive 
> > the data and looping through records to place the cursor at the right 
> > offset in the resultset.
> > 
> > What I would prefer to do is make the database call once and cache the
> > resultset object and as the user navigates forward, fetch row-by-row 
> > of only those required for the display.  Then if the user navigates 
> > backward, those
> > records are in a cache inside this bean so the cache is referenced for
> the
> > data (due to the fact Oracle's resultset is forward step only).
> > 
> > Is anyone familiar or done anything like this in the past?
> > 
> > ___
> > Chris Cranford
> > Programmer/Developer
> > SETECH Inc. & Companies
> > 6302 Fairview Rd, Suite 201
> > Charlotte, NC  28210
> > Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> > Email: [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: Caching data from resultset - reply

2004-06-14 Thread Kathy Zhou
I was using rowset.jar before I started JDK 1.4. I think you could download it from 
the internet. Not sure if it works on your case.

Let me know if you need me to send you this package.

Kathy


-Original Message-
From:   CRANFORD, CHRIS [SMTP:[EMAIL PROTECTED]
Sent:   Monday, June 14, 2004 9:55 AM
To: 'Struts Users Mailing List'
Subject:RE: Caching data from resultset

But CachedRowSet isn't available in JDK 1.2.2_014 right?
I'm limited to this JDK because IBM AIX version our OS runs doesn't support
a JDK after this version.

-Original Message-
From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 8:22 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset


Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've
already given a thought to the amount of data that you'd be handling,
consider it to be feasible and reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html

I believe this could be somewhat similar to what you are looking for.

HTH,
Freddy.

-Mensaje original-
De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset

This will work for the "paging" aspect, but I'm more concerned with ways to
cache the "resultset" itself in the session to avoid repeative database
calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprungliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive 
> the data and looping through records to place the cursor at the right 
> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache the
> resultset object and as the user navigates forward, fetch row-by-row 
> of only those required for the display.  Then if the user navigates 
> backward, those
> records are in a cache inside this bean so the cache is referenced for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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]


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



RE: Caching data from resultset

2004-06-14 Thread CRANFORD, CHRIS
But CachedRowSet isn't available in JDK 1.2.2_014 right?
I'm limited to this JDK because IBM AIX version our OS runs doesn't support
a JDK after this version.

-Original Message-
From: Freddy Villalba Arias [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 8:22 AM
To: Struts Users Mailing List
Subject: RE: Caching data from resultset


Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've
already given a thought to the amount of data that you'd be handling,
consider it to be feasible and reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html

I believe this could be somewhat similar to what you are looking for.

HTH,
Freddy.

-Mensaje original-
De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset

This will work for the "paging" aspect, but I'm more concerned with ways to
cache the "resultset" itself in the session to avoid repeative database
calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive 
> the data and looping through records to place the cursor at the right 
> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache the
> resultset object and as the user navigates forward, fetch row-by-row 
> of only those required for the display.  Then if the user navigates 
> backward, those
> records are in a cache inside this bean so the cache is referenced for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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: Help with Datavision + Struts

2004-06-14 Thread Frank Zammetti
I'm using Datavision in a Struts-based application.  I'm not sure about 
passing an entire where clause, I've never tried that, but you can easily 
pass parameters to the report, which obviously you can use in your where 
clause.  Here's some code for doing that:

Report report = new Report();
report.parametersSetManually(true);
Parameter p = report.findParameterByName("myParameterName");
p.setValue(0, "myValue");
If you truly have to set arbitrary where clauses, that probably won't help.  
One thing you might be able to do is read in the XML of the report, then 
just modify the  element of the  element.  You could parse if 
as XML, but what might be easier, since you need to read it into a String 
anyway to hand off the the Report object, is just locate  and 
 in your String, copy from the start of the string until the end of 
 to a StringBuffer, then append the query your user entered, then 
append the remainder of the original String from the beginning of  
to the end.  A little more work, but nothing mind-shattering.

This is a Query class that takes as a constructor parameter a Report 
object... I'm not sure if that is any help, but it does have a 
setWhereClause method... the question is whether it sets it in the Report 
you pass in, and I don't know the answer.  Even if it doesn't, it does have 
a writeXML method that writes out the full  tag, and maybe that will 
be helpful to you.

If none of this is any help, I suggest hoping on the Datavision mailing 
list.  Jim, the author, has bee helpful to me in the past, I'm sure he'll 
answer your question promptly.

Frank
From: "Miquel Angel" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Help with Datavision + Struts
Date: Mon, 14 Jun 2004 09:20:16 +0200
Hi. We are de developing an application using struts. In this application
we have to develop reports (of course) and we decided to use Datavision. We
want to use datavision in our action classes. We have one problem and we
don't know how to solve it. The problem is:
The user has a form in wich he or she enters some criteria to select the
records to be listed. ?Can I pass the WHERE  clause to datavision as a
parameter? Something like this: ID > 100 AND ID < 500 AND NAME LIKE
'PETER%'. If I can, do you have any example.
	Does anyone have  experience with other reporting tool?, is there any 
other
tool better than datavision?

Thanks in advance.
Miquel Angel Segui
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_
Getting married? Find great tips, tools and the latest trends at MSN Life 
Events. http://lifeevents.msn.com/category.aspx?cid=married

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


[ANN] Xkins 0.9.8 Released (includes Struts and Xkins POC)

2004-06-14 Thread Guillermo Meyer
A new version of Xkins (http://xkins.sourceforge.net/) has been
released.
This new version has some new features including the capability of
compose new Skins based on existing ones.

Xkins is a framework to mannage Skins for web applications.

You can download the last version from:

http://sourceforge.net/project/showfiles.php?group_id=83923&package_id=8
6521&release_id=245465

There is also a Proof of Concept of Xkins using Struts. This demo will
show how Struts and Xkins can be combined to add Skinning capabilities
to Struts web applications.

The full list of features is:
New functionality: 
1) Skin composite: allows to compose a skin with templates from other
skins, in a composite fashion. 
2) Proof of Concept Xkins application: uses Xkins in a Struts based web
application. Allows to create a Custom Skin by the user. 
3) XkinsEditor: a new class that allows to compose Skins. see example in
skinAction in Xkins POC 
4) Log4J: XkinsLogger is created. Uses this logging mechanism inside
Xkins. XKINS category is created. 
5) JByte: New Template processor that uses Java By Template.
 
Changes: 
1) Add release() method to taglibs. 
2) API improvement: Allows to use xkinProcessor and create templates on
the fly easily: 
a) Add a constructos for Skin with name, and with name and
processor. 
b) Add a constructor for Processor that receives a class as the
TemplateProcessor 
c) Add a constructor for Content to receive a string with the
content or the url where the template content is. 
d) Add a contructor for Template to receive a string with the
content or the url where the template content is, and with name and
processor. 
3) Upgrade to Velocity 1.4 
4) Bug correction on reloading Velocity based templates: When a Velocity
template was modified and Xkins were reloaded, templates remained
cached. This is solved in this version. 
5) XkinProcessor and an undefined skin: if you create a XkinProcessor
with an undefined skin name, the default skin name is used. 
6) Add a SkinType getter to Xkins 

Cheers.
Guillermo.

Guillermo Meyer
System Engineer
EDS Argentina - Proyecto X71 Interbanking.
54.11.4322-1307


NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las 
personas direccionadas en el mail y puede contener informacion (i)de propiedad 
exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier 
opinion en el contenido, es exclusiva de su autor y no representa necesariamente la 
opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion 
esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna 
por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha 
recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo 
inmediatamente junto con todas las copias del mismo, notificando al remitente. No 
debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus 
partes si usted no es el destinatario. Muchas gracias.



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



RE: Cannot Find Bean in Any Scope

2004-06-14 Thread Ricardo Cortes
Caroline,

This URL might help:

http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html

Ciao,
Ricardo


-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED]
Sent: Saturday, June 12, 2004 7:28 PM
To: [EMAIL PROTECTED]
Subject: Cannot Find Bean in Any Scope


I am using the Struts framework.  I have a JSP, which
imports a JavaBean "ThreadBean".  Therefore, in the
beginning of my JSP, in addition to 

<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<%@ taglib uri="/tags/tiles" prefix="tiles" %>
<%@ taglib uri="/tags/request" prefix="req" %>

I have

<%@ page import="org.MyOrg.MyProj.message.ThreadBean"
%>

In my JSP, I try to write out the properties of this
JavaBean; for example:

  <%=threadBean.getSender()%>
  <%=threadBean.getThreadReplyCount()%>
  <%=threadBean.getThreadViewCount()%>

I got the error message:

- Root Cause -
javax.servlet.ServletException: Cannot find bean
threadBean in any scope

What is the correct way to do it?



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
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:

2004-06-14 Thread Kalra, Ashwani

check with  Computer Bookshop (I) Pvt. Ltd. (Phone:563179 22/23/24/2207
6356/0989)

 


-Original Message-
From: Janarthan Sathiamurthy [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 6:02 PM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: RE: 


Hi Group,

I am from Mumbai/India. Looking to buy 'Struts in Action' book for a long
time. But could not get it.
Does anyone have address from where i can get it ?

Regards,
Janarthan S

-Original Message-
From: Shilpa Vaidya [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 4:25 PM
To: 'Struts Users Mailing List'
Subject: RE: 



hi anjali...
I would say the best is James GoodWill wrox publication  for new
learners
regds
shilpa



-Original Message-
From: gitanjali [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 4:03 PM
To: [EMAIL PROTECTED]
Subject: Hi:


Hi All,
 I m a new user of struts.still on R&D.on my forthcoming project i m
going to work on struts.can any body suggest me a really good book for
struts ?

Thnx in advance.

Anjali

Yahoo! India Matrimony: Find your partner online.

-- 


"This e-mail message may contain confidential, proprietary or legally
privileged information. It 
should not be used by anyone who is not the original intended recipient. If
you have erroneously 
received this message, please delete it immediately and notify the sender.
The recipient 
acknowledges that ICICI Bank or its subsidiaries and associated companies,
(collectively "ICICI 
Group"), are unable to exercise control or ensure or guarantee the integrity
of/over the contents of the information contained in e-mail transmissions
and further acknowledges that any views 
expressed in this message are those of the individual sender and no binding
nature of the message shall be implied or assumed unless the sender does so
expressly with due authority of ICICI Group.Before opening any attachments
please check them for viruses and defects." 



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


Our name has changed.  Please update your address book to the following format: 
"[EMAIL PROTECTED]".

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



RE:

2004-06-14 Thread Janarthan Sathiamurthy
Hi Group,

I am from Mumbai/India. Looking to buy 'Struts in Action' book for a long time. But 
could not get it.
Does anyone have address from where i can get it ?

Regards,
Janarthan S

-Original Message-
From: Shilpa Vaidya [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 4:25 PM
To: 'Struts Users Mailing List'
Subject: RE: 



hi anjali...
I would say the best is James GoodWill wrox publication  for new
learners
regds
shilpa



-Original Message-
From: gitanjali [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 4:03 PM
To: [EMAIL PROTECTED]
Subject: Hi:


Hi All,
 I m a new user of struts.still on R&D.on my forthcoming project i m
going to work on struts.can any body suggest me a really good book for
struts ?

Thnx in advance.

Anjali

Yahoo! India Matrimony: Find your partner online.

-- 


"This e-mail message may contain confidential, proprietary or legally privileged 
information. It 
should not be used by anyone who is not the original intended recipient. If you have 
erroneously 
received this message, please delete it immediately and notify the sender. The 
recipient 
acknowledges that ICICI Bank or its subsidiaries and associated companies,  
(collectively "ICICI 
Group"), are unable to exercise control or ensure or guarantee the integrity of/over 
the contents of the information contained in e-mail transmissions and further 
acknowledges that any views 
expressed in this message are those of the individual sender and no binding nature of 
the message shall be implied or assumed unless the sender does so expressly with due 
authority of ICICI Group.Before opening any attachments please check them for viruses 
and defects." 



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



RE: Caching data from resultset

2004-06-14 Thread Freddy Villalba Arias
I'm sorry, my reply should have been directed to Chris, not Leon. My apologies, Leon.

Regards,
Freddy.

-Mensaje original-
De: Freddy Villalba Arias 
Enviado el: lunes, 14 de junio de 2004 14:22
Para: Struts Users Mailing List
Asunto: RE: Caching data from resultset

Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've already given 
a thought to the amount of data that you'd be handling, consider it to be feasible and 
reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html

I believe this could be somewhat similar to what you are looking for.

HTH,
Freddy.

-Mensaje original-
De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset

This will work for the "paging" aspect, but I'm more concerned with ways to
cache the "resultset" itself in the session to avoid repeative database
calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have 
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive 
> the data and looping through records to place the cursor at the right 
> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache the 
> resultset object and as the user navigates forward, fetch row-by-row 
> of only those required for the display.  Then if the user navigates 
> backward, those
> records are in a cache inside this bean so the cache is referenced for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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]



R: Caching data from resultset

2004-06-14 Thread Amleto Di Salle
Hi,
you can use the Value List Handler design pattern.
See http://www.corej2eepatterns.com/Patterns2ndEd/ValueListHandler.htm
for an overview.

See http://www.theserverside.com/patterns/thread.tss?thread_id=26139 for
an implementation. I never used it but it is seems very good.

If you will use it please give us some feedback!

BR
/Amleto

-Messaggio originale-
Da: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 14 giugno 2004 13.45
A: 'Struts Users Mailing List'
Oggetto: RE: Caching data from resultset


This will work for the "paging" aspect, but I'm more concerned with ways
to cache the "resultset" itself in the session to avoid repeative
database calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive 
> the data and looping through records to place the cursor at the right 
> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache the
> resultset object and as the user navigates forward, fetch row-by-row 
> of only those required for the display.  Then if the user navigates 
> backward, those
> records are in a cache inside this bean so the cache is referenced for
the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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: Caching data from resultset

2004-06-14 Thread Freddy Villalba Arias
Hi Leon,

I suppose that, since you're talking about caching the ResultSet, you've already given 
a thought to the amount of data that you'd be handling, consider it to be feasible and 
reasonable to cache it.

This said, why don't you take a look at CachedRowSet?

http://java.sun.com/j2se/1.5.0/docs/api/javax/sql/rowset/CachedRowSet.html

http://java.sun.com/developer/Books/JDBCTutorial/chapter5.html

I believe this could be somewhat similar to what you are looking for.

HTH,
Freddy.

-Mensaje original-
De: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 14 de junio de 2004 13:45
Para: 'Struts Users Mailing List'
Asunto: RE: Caching data from resultset

This will work for the "paging" aspect, but I'm more concerned with ways to
cache the "resultset" itself in the session to avoid repeative database
calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have 
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive 
> the data and looping through records to place the cursor at the right 
> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache the 
> resultset object and as the user navigates forward, fetch row-by-row 
> of only those required for the display.  Then if the user navigates 
> backward, those
> records are in a cache inside this bean so the cache is referenced for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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: Caching data from resultset

2004-06-14 Thread CRANFORD, CHRIS
This will work for the "paging" aspect, but I'm more concerned with ways to
cache the "resultset" itself in the session to avoid repeative database
calls on each page request.

-Original Message-
From: Rosenberg, Leon [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 6:21 AM
To: Struts Users Mailing List
Subject: AW: Caching data from resultset


Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have 
> implemented paging through large record resultsets from a JSP 
> application without making a SQL call from page to page to retreive 
> the data and looping through records to place the cursor at the right 
> offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache the 
> resultset object and as the user navigates forward, fetch row-by-row 
> of only those required for the display.  Then if the user navigates 
> backward, those
> records are in a cache inside this bean so the cache is referenced for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [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: Struts scalability and benchmarking

2004-06-14 Thread Jesse Alexander (KXT)
If you are not sure whether you will end up with 100 or 100'000 users...

Well, I would try do design the system with "clustering" in my mind.
Then I could throw more hardware at it, without too much problems. Seems
that even Tomcat 5 is capable of clustering nowadays, so  it should not
even be a problem of money.

"Clustering in my mind": If its just for scalability, then try to avoid
applicaiton-wide caches. If its also for fail-over: then you have to watch 
your session size.

hth
Alexander

-Original Message-
From: Ashu Jaiswal [mailto:[EMAIL PROTECTED]
Sent: Freitag, 11. Juni 2004 17:49
To: [EMAIL PROTECTED]
Subject: Re: Struts scalability and benchmarking


What if the system needed to scale to thousands (or potentially even
millions) of user? Would just throwing more hardware solve the
scalability issues? I know this sounds really open ended, but I'm just
trying to figure out how well struts has performed (or will) in the past
for large websites. The FAQ seems to have the "struts powered website"
link missing.

thanks,
Ashu

Subject:
Re: Struts scalability and benchmarking
From:
Bill Siggelkow <[EMAIL PROTECTED]>
Date:
Thu, 10 Jun 2004 17:23:37 -0400

To:
[EMAIL PROTECTED]


Personally, I think this would be more a function of
(1) the application server/container that you are using
(Tomcat/JBoss/WAS/...) and

(2) the hardware/clustering etc.

Also, you need to do some additional analysis on expected number of
users, estimate how much data will be held in the session, what database
you are using, blah blah

Ashu Jaiswal wrote:

> Hi,
> Just wondering if there have been any scalability and benchmarking
> studies done on struts. I am trying to figure out if struts would scale
> out well if the number of users in a system grew rapidly, starting from
> a small user base.
>
> I would appreciate any comments, suggestions or pointers.
>
> thanks,
> Ashu



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



RE: thnx for book reference :

2004-06-14 Thread Kalra, Ashwani

You will get lot of resources examples and good start at the apache site


 Thanks & Regds 
 Ashwani Kalra



-Original Message-
From: gitanjali [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 4:16 PM
To: [EMAIL PROTECTED]
Subject: thnx for book reference :


Thnx Preetam & Chris  for ur suggestion.preetam if u have some chapters pls
send it to me or tell me the site where i can find it ?
 
Anjali


Yahoo! India Matrimony: Find your partner online.


Our name has changed.  Please update your address book to the following format: 
"[EMAIL PROTECTED]".

This message contains information that may be privileged or confidential and is the 
property of the Capgemini Group. It is intended only for the person to whom it is 
addressed. If you are not the intended recipient,  you are not authorized to read, 
print, retain, copy, disseminate,  distribute, or use this message or any part 
thereof. If you receive this  message in error, please notify the sender immediately 
and delete all  copies of this message.


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



RE:

2004-06-14 Thread Shilpa Vaidya

hi anjali...
I would say the best is James GoodWill wrox publication  for new
learners
regds
shilpa



-Original Message-
From: gitanjali [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 4:03 PM
To: [EMAIL PROTECTED]
Subject: Hi:


Hi All,
 I m a new user of struts.still on R&D.on my forthcoming project i m
going to work on struts.can any body suggest me a really good book for
struts ?

Thnx in advance.

Anjali

Yahoo! India Matrimony: Find your partner online.

-- 


"This e-mail message may contain confidential, proprietary or legally privileged 
information. It 
should not be used by anyone who is not the original intended recipient. If you have 
erroneously 
received this message, please delete it immediately and notify the sender. The 
recipient 
acknowledges that ICICI Bank or its subsidiaries and associated companies,  
(collectively "ICICI 
Group"), are unable to exercise control or ensure or guarantee the integrity of/over 
the contents of the information contained in e-mail transmissions and further 
acknowledges that any views 
expressed in this message are those of the individual sender and no binding nature of 
the message shall be implied or assumed unless the sender does so expressly with due 
authority of ICICI Group.Before opening any attachments please check them for viruses 
and defects." 




thnx for book reference :

2004-06-14 Thread gitanjali
Thnx Preetam & Chris  for ur suggestion.preetam if u have some chapters pls send it to 
me or tell me the site where i can find it ?
 
Anjali


Yahoo! India Matrimony: Find your partner online.

RE:

2004-06-14 Thread Saurabh Bobde
Struts in Action by Ted Husted (Manning  Publication) is an excellent book.

-Saurabh Bobde

-Original Message-
From: gitanjali [mailto:[EMAIL PROTECTED]
Sent: Monday, June 14, 2004 4:03 PM
To: [EMAIL PROTECTED]
Subject: Hi:


Hi All,
 I m a new user of struts.still on R&D.on my forthcoming project i m
going to work on struts.can any body suggest me a really good book for
struts ?

Thnx in advance.

Anjali

Yahoo! India Matrimony: Find your partner online.


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



RE:

2004-06-14 Thread McCormack, Chris
Struts in Action - Ted Husted (Manning)
Programming Jakarta Struts - Chuck Cavaness (O'Reilly)

Both very good books and should both be read to get a good all round view of struts.

hth
Chris McCormack

-Original Message-
From: gitanjali [mailto:[EMAIL PROTECTED]
Sent: 14 June 2004 11:33
To: [EMAIL PROTECTED]
Subject: Hi:


Hi All,
 I m a new user of struts.still on R&D.on my forthcoming project i m going to 
work on struts.can any body suggest me a really good book for struts ?
 
Thnx in advance.
 
Anjali

Yahoo! India Matrimony: Find your partner online.

***
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]



Hi:

2004-06-14 Thread gitanjali
Hi All,
 I m a new user of struts.still on R&D.on my forthcoming project i m going to 
work on struts.can any body suggest me a really good book for struts ?
 
Thnx in advance.
 
Anjali

Yahoo! India Matrimony: Find your partner online.

AW: Caching data from resultset

2004-06-14 Thread Rosenberg, Leon
Take a look at the pager taglib.

http://jsptags.com/tags/navigation/pager/pager-taglib-2.0.html

regards
Leon

> -Ursprüngliche Nachricht-
> Von: CRANFORD, CHRIS [mailto:[EMAIL PROTECTED]
> Gesendet: Montag, 14. Juni 2004 11:23
> An: '[EMAIL PROTECTED]'
> Betreff: Caching data from resultset
> 
> I am working with Oracle 8i and JDBC and was curious how others have
> implemented paging through large record resultsets from a JSP application
> without making a SQL call from page to page to retreive the data and
> looping
> through records to place the cursor at the right offset in the resultset.
> 
> What I would prefer to do is make the database call once and cache the
> resultset object and as the user navigates forward, fetch row-by-row of
> only
> those required for the display.  Then if the user navigates backward,
> those
> records are in a cache inside this bean so the cache is referenced for the
> data (due to the fact Oracle's resultset is forward step only).
> 
> Is anyone familiar or done anything like this in the past?
> 
> ___
> Chris Cranford
> Programmer/Developer
> SETECH Inc. & Companies
> 6302 Fairview Rd, Suite 201
> Charlotte, NC  28210
> Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042
> Email: [EMAIL PROTECTED]



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



RE: Help with validate ActionForm method

2004-06-14 Thread Lesaint Sébastien
Hi Satish,

Problem is not related to validate="true" set on two actions, I've only one
in my whole struts-confif.xml file.

Any other idea?

-- 
Seb'

-Message d'origine-
De : Satish Kataria [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 14 juin 2004 10:09
À : Struts Users Mailing List; Lesaint Sébastien
Objet : RE: Help with validate ActionForm method

I hope you have not set validate="true" for the both the load and submit
action mapping
i.e there wld be a action mapping for loading the screen(say load) The
validate attribute for this action
Be set to false

Then there wld be a action maqpping when to want to validate(say on submit
of a button - lets call it submitaction). The validate attribute of only
this shld be set to true

Thanks,
Satish


-Original Message-
From: Lesaint Sébastien [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 1:19 PM
To: Struts Users Mailing List
Subject: Help with validate ActionForm method


Hi,

I'm using ActionForm for one of my pages and I implemented the validate
method as follow: public ActionErrors validate(ActionMapping mapping,
   HttpServletRequest request) {
ActionErrors errors = new ActionErrors();

if (isFieldEmpty(login)) {
  errors.add("login", new ActionError("loginForm.login.required"));
}

if (isFieldEmpty(password)) {
  errors.add("password", new
ActionError("loginForm.password.required"));
}

if (errors.isEmpty()) {
  if (!isConnected(login, password)) {
errors.add("login", new
ActionError("loginForm.msgs.wrongLoginorPassword"));
  }
}

if (!errors.isEmpty()) {
  getLogger().info(this, "Failed attempt to log in : [" + login + "/" +
password + "] from : " + request.getRemoteHost());
}
return (errors);
 }

You can see that I log each time someone fail to log in.
When the validate method returns an empty Error Array, login/password are
checked in an Action object.

The problem is that I have the following trace in the log when somebody
successfully log in : 09:26:54,500 INFO  [lex.LoginAction] User logged in
[login/pwd] sessionId [773BB4634682A159DC680847073E4EC8] from [10.10.10.10]
09:26:54,587 INFO  [lex.LoginActionForm] Failed attempt to log in : [/] from
: 10.10.10.10

These traces obiviously means that the validate method is called twice, the
second time the ActionForm having empty fields.

Does anybody know why such a thing would happen 

Thanks

-- 
Seb'

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


Caching data from resultset

2004-06-14 Thread CRANFORD, CHRIS
I am working with Oracle 8i and JDBC and was curious how others have
implemented paging through large record resultsets from a JSP application
without making a SQL call from page to page to retreive the data and looping
through records to place the cursor at the right offset in the resultset.

What I would prefer to do is make the database call once and cache the
resultset object and as the user navigates forward, fetch row-by-row of only
those required for the display.  Then if the user navigates backward, those
records are in a cache inside this bean so the cache is referenced for the
data (due to the fact Oracle's resultset is forward step only).  

Is anyone familiar or done anything like this in the past?

___
Chris Cranford
Programmer/Developer
SETECH Inc. & Companies
6302 Fairview Rd, Suite 201
Charlotte, NC  28210
Phone: (704) 362-9423, Fax: (704) 362-9409, Mobile: (704) 650-1042 
Email: [EMAIL PROTECTED]



RE: Chaining dispatchactions problem, how to do it cleanly

2004-06-14 Thread Cosyns Xavier
>I've used a similar approach but mine is working fine.
>what does your struts-config.xml look like?

Hi, 
Here is my struts-config, ShowAttributesList.do is my preaction before
displayin the list of objects, then we select one of the list and
execute the gocreateattribute action, and lastly we have the
CreateAttribute action which will reforward to the ShowAttributesList on
successful creation. The problem is that both actions are
DispatchActions with the same parameter. As explained in my former mail
I do not want to break that for different reasons.

Is there something I am missing?






  












>On Fri, 11 Jun 2004 11:26:54 +0200, Cosyns Xavier 
><[EMAIL PROTECTED]> wrote:
>> 
>> Hi,
>> 
>> I run into problems with chaining dispatchactions using the same 
>> parameter 'method'. We do use the same parameter name for all our 
>> dispatchaction for consistency reasons throughout the whole 
>> application, easier to maintain and using generique javascript 
>> functions.
>> 
>> The problem we ran into is that we have a first jsp page showing a 
>> list of items, and we achieve that by prepopulating with a 
>> dispatchaction some beans to be used in the jsp. Then we can go to a 
>> 'edit' page and when we submit we have another 
>dispatchaction with an 
>> 'update' method that should reforward on success to the first 
>> prepoplation dispatchaction. The problem is that forwarding 
>calls the 
>> 'update' method from the prepopulation dispatchaction, which 
>does not 
>> exist and should not exist. Redirecting the action does not 
>work as I 
>> lose a request parameter that permits to prepopulate the 
>right list of 
>> products on my first page (It will display the default list, not 
>> necesarely the list where he started an update upon).
>> 
>> So, our action&page flow is the following:
>> Prepopulation Action --> list.jsp --> detail (product Action) --> 
>> edit.jsp --> update (product action) --> Prepopulation Action.
>> 
>> Only options I see,
>> I could not use dispatchactions, but then I would have so many 
>> different action classes that are so closely related and 
>using common 
>> methods. I could break our 'inhouse rule' of using one global 
>> parameter name for dispatchactions, but it would not be 
>clean to have 
>> an exception to the rule, so I'm against that option. I could put an 
>> object in the session and in my prepopulation action testing for it, 
>> and if it exist showing the right list of products. But again, it's 
>> simulating a request parameter using a session, which is not a great 
>> design. None of the three options above are good design to me, so I 
>> would prefer another way.
>> 
>> What I would need is more something like the 'unspecified' 
>method from 
>> dispatchactions that would also be called if the given 
>parameter does 
>> not match any of the methods of the dispatchaction. From my tests, 
>> it's not the case,  the 'unspecified' method is called when the 
>> 'parameter' does not exist in the request and not when it does not 
>> match anny methods (my case). Or else, I would need a patameter 
>> 'overriding' mechanism, something where the dispatchaction 
>first do a 
>> request.getAttribute('method') and if this one does not 
>exist performs 
>> a request.getParameter('method'). But I have not found how 
>to achieve 
>> one of boths terchniques.
>> 
>> I'm sure someone else ran into this issue too, and I am aware that 
>> chaining actions is not a recommended design, but it's not a 
>> bussinesslogic problem, the issues addressed here only concerns 
>> presentation. Or did I missed something?
>> 
>> Thanks very much for your ideas,
>> 
>> Cosyns Xavier,
>> __
>> [EMAIL PROTECTED]
>> 
>> InveO Consulting & Development
>> Av. E. de Beco 112
>> 1050 Ixelles
>> Tel: +32 2 648 74 32
>> Fax: +32 2 648 87 64
>> 
>> -
>> 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: Cannot Find Bean in Any Scope

2004-06-14 Thread Satish Kataria
You are getting the error because you have not defined a scripting
variable for the threadbean.
Simple way of doing that is using the bean:define tag

 

Please let me know if there is any problem in using this
Thanks,
Satish

-Original Message-
From: Caroline Jen [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 13, 2004 5:30 AM
To: Struts Users Mailing List
Subject: RE: Cannot Find Bean in Any Scope


Sorry for not being clear about the problem that I
have.

1. I have a JavaBean, which is named as ThreadBean
with lots of properties.

2. My ListThread.java class extends Action.  In that
class, I created a collection of beans.  Each of those
beans is a ThreadBean.

3. By the end of the ListThread.java, I passed those
beans to my JSP in the request scope this way:

  request.setAttribute( "ThreadBeans", beans );

4. In my JSP (I did import the ThreadBean), I have

<%
Collection threadRows = ( Collection
)request.getAttribute( "ThreadBeans" );

int odd = 0;
   Iterator iterator = threadRows.iterator();
   while( iterator.hasNext() ) 
   {
  odd = ( odd + 1 )%2;
  ThreadBean threadBean = ( ThreadBean
)iterator.next();

  .
   }
%>

5. when I tried to write out the properties; for
example:

<%=threadBean.getSender()%> <%=threadBean.getThreadReplyCount()%>
<%=threadBean.getThreadViewCount()%>
..

I got the error message:

- Root Cause -
javax.servlet.ServletException: Cannot find bean
threadBean in any scope





--- "CRANFORD, CHRIS" <[EMAIL PROTECTED]>
wrote:
> 
> -- If you want to specify a new bean instance, use
> this:
>  type="org.MyOrg.MyProj.message.ThreadBean" />  name="threadBean" property="sender"/>  property="threadReplyCount"/>
>  property="threadViewCount"/>
> 
> -- If the bean already exists
>  type="org.MyOrg.MyProj.message.ThreadBean"/>
> 
> 
> 
> I think this is right ..
> Chris
> 
> -Original Message-
> From: Caroline Jen [mailto:[EMAIL PROTECTED]
> Sent: Saturday, June 12, 2004 7:28 PM
> To: [EMAIL PROTECTED]
> Subject: Cannot Find Bean in Any Scope
> 
> 
> I am using the Struts framework.  I have a JSP,
> which
> imports a JavaBean "ThreadBean".  Therefore, in the
> beginning of my JSP, in addition to
> 
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> <%@ taglib uri="/tags/struts-logic" prefix="logic"
> %>
> <%@ taglib uri="/tags/tiles" prefix="tiles" %>
> <%@ taglib uri="/tags/request" prefix="req" %>
> 
> I have
> 
> <%@ page
> import="org.MyOrg.MyProj.message.ThreadBean"
> %>
> 
> In my JSP, I try to write out the properties of this JavaBean; for 
> example:
> 
>   <%=threadBean.getSender()%>
>   <%=threadBean.getThreadReplyCount()%>
>   <%=threadBean.getThreadViewCount()%>
> 
> I got the error message:
> 
> - Root Cause -
> javax.servlet.ServletException: Cannot find bean
> threadBean in any scope
> 
> What is the correct way to do it?
> 
> 
> 
> __
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com 
> 
>
-
> 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]
> 
> 





__
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-
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: Help with validate ActionForm method

2004-06-14 Thread Satish Kataria
I hope you have not set validate="true" for the both the load and submit action mapping
i.e there wld be a action mapping for loading the screen(say load) The validate 
attribute for this action
Be set to false

Then there wld be a action maqpping when to want to validate(say on submit of a button 
- lets call it submitaction). The validate attribute of only this shld be set to true

Thanks,
Satish


-Original Message-
From: Lesaint Sébastien [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 14, 2004 1:19 PM
To: Struts Users Mailing List
Subject: Help with validate ActionForm method


Hi,

I'm using ActionForm for one of my pages and I implemented the validate method as 
follow: public ActionErrors validate(ActionMapping mapping,
   HttpServletRequest request) {
ActionErrors errors = new ActionErrors();

if (isFieldEmpty(login)) {
  errors.add("login", new ActionError("loginForm.login.required"));
}

if (isFieldEmpty(password)) {
  errors.add("password", new ActionError("loginForm.password.required"));
}

if (errors.isEmpty()) {
  if (!isConnected(login, password)) {
errors.add("login", new ActionError("loginForm.msgs.wrongLoginorPassword"));
  }
}

if (!errors.isEmpty()) {
  getLogger().info(this, "Failed attempt to log in : [" + login + "/" + password + 
"] from : " + request.getRemoteHost());
}
return (errors);
 }

You can see that I log each time someone fail to log in.
When the validate method returns an empty Error Array, login/password are checked in 
an Action object.

The problem is that I have the following trace in the log when somebody successfully 
log in : 09:26:54,500 INFO  [lex.LoginAction] User logged in [login/pwd] sessionId 
[773BB4634682A159DC680847073E4EC8] from [10.10.10.10] 09:26:54,587 INFO  
[lex.LoginActionForm] Failed attempt to log in : [/] from
: 10.10.10.10

These traces obiviously means that the validate method is called twice, the second 
time the ActionForm having empty fields.

Does anybody know why such a thing would happen 

Thanks

-- 
Seb'

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



Help with validate ActionForm method

2004-06-14 Thread Lesaint Sébastien
Hi,

I'm using ActionForm for one of my pages and I implemented the validate
method as follow:
public ActionErrors validate(ActionMapping mapping,
   HttpServletRequest request) {
ActionErrors errors = new ActionErrors();

if (isFieldEmpty(login)) {
  errors.add("login", new ActionError("loginForm.login.required"));
}

if (isFieldEmpty(password)) {
  errors.add("password", new
ActionError("loginForm.password.required"));
}

if (errors.isEmpty()) {
  if (!isConnected(login, password)) {
errors.add("login", new
ActionError("loginForm.msgs.wrongLoginorPassword"));
  }
}

if (!errors.isEmpty()) {
  getLogger().info(this, "Failed attempt to log in : [" + login + "/" +
password + "] from : " + request.getRemoteHost());
}
return (errors);
 }

You can see that I log each time someone fail to log in.
When the validate method returns an empty Error Array, login/password are
checked in an Action object.

The problem is that I have the following trace in the log when somebody
successfully log in :
09:26:54,500 INFO  [lex.LoginAction] User logged in [login/pwd] sessionId
[773BB4634682A159DC680847073E4EC8] from [10.10.10.10]
09:26:54,587 INFO  [lex.LoginActionForm] Failed attempt to log in : [/] from
: 10.10.10.10

These traces obiviously means that the validate method is called twice, the
second time the ActionForm having empty fields.

Does anybody know why such a thing would happen 

Thanks

-- 
Seb'


Help with Datavision + Struts

2004-06-14 Thread Miquel Angel
Hi. We are de developing an application using struts. In this application
we have to develop reports (of course) and we decided to use Datavision. We
want to use datavision in our action classes. We have one problem and we
don't know how to solve it. The problem is:
The user has a form in wich he or she enters some criteria to select the
records to be listed. ?Can I pass the WHERE  clause to datavision as a
parameter? Something like this: ID > 100 AND ID < 500 AND NAME LIKE
'PETER%'. If I can, do you have any example.

Does anyone have  experience with other reporting tool?, is there any other
tool better than datavision?

Thanks in advance.

Miquel Angel Segui


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