export in frames

2002-11-13 Thread Chen, Dean (Zhun)
Hi,
I have 2 frames. One submits a query to be displayed in the 2nd.
In the 2nd frame, there's a button to export. The export apparently works,
however, after the user exports, queries that the user submits no longer
appear on the screen. He/she has to refresh the browser to submit more
queries.

Currently the export works by running the query again, and then in the JSP,
issuing HttpServletResponse.setContentType("application/octet-stream") and
setHeader("content-disposition", "attachment; filename=export.csv").

Anyone have any suggestions?

Thanks,

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Should I use a persistence layer?

2002-10-03 Thread Chen, Dean (Zhun)

Thanks for this, what good persistence layers are there? Is there something
that works with struts and is simple?

Dean Chen




-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 03, 2002 2:41 PM
To: Struts Users Mailing List
Subject: RE: Should I use a persistence layer?


Yes.  The standard approach is to only keep in memory results that are
currently on the page.  Have a persistence layer (either EJB or O/R mapping
tool, or a combination of the two) "page" the results for you. i.e., you
give it search criteria, sort criteria, a begin index, and an end index, and
it gives you back the results.  This solves two problems:  The one you are
encountering with bad results with two different windows, and the memory
problems associated with very large result sets.

There are examples of this sort of implementation out there; sorry I can't
provide links. :(

peace,
Joe

> -Original Message-----
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, October 03, 2002 10:13 AM
> To: 'Struts Users Mailing List'
> Subject: Should I use a persistence layer?
> 
> 
> Hi,
> 
> For an web application, is there a way for a user to paginate through
> (similar to google) a lot of data across multiple browser windows.
> 
> The usual way of paginating with session scope works fine. 
> However, if a
> user has 2 windows open on the same application. When he/she 
> queries on one,
> then queries on another, and then comes back to the first 
> window and click
> "Next", he/she will get bad results.
> 
> Does this lead to EJB or any other persistence layers?
> 
> Thanks,
> 
> 
> Dean Chen
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 

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

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




Should I use a persistence layer?

2002-10-03 Thread Chen, Dean (Zhun)

Hi,

For an web application, is there a way for a user to paginate through
(similar to google) a lot of data across multiple browser windows.

The usual way of paginating with session scope works fine. However, if a
user has 2 windows open on the same application. When he/she queries on one,
then queries on another, and then comes back to the first window and click
"Next", he/she will get bad results.

Does this lead to EJB or any other persistence layers?

Thanks,


Dean Chen


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Display Tag Library

2002-10-03 Thread Chen, Dean (Zhun)

Has anyone been successful in using the display tag lib?

http://edhill.its.uiowa.edu/display-0.8/

It's a great tool, one piece that's not working is the export... The CSV
export exports the entire HTML, and Excel export exports everything in one
cell. Anyone had this problem before?

Also, for sorting numbers, does the underlying data be of type double, int,
etc? Or can it be String and use Decorators to override the functionality so
it'sint getNumber() ?

Thanks a lot.

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




has anyone gotten JSPTag's pager to work without using sessions?

2002-10-02 Thread Chen, Dean (Zhun)

has anyone gotten JSPTag's pager to work without using sessions?

Dean Chen


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




has anyone gotten JSPTag's pager to work without using sessions?

2002-10-02 Thread Chen, Dean (Zhun)

> has anyone gotten JSPTag's pager to work without using sessions?
> 
> Dean Chen
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




has anyone gotten JSPTag's pager to work without using sessions?

2002-10-01 Thread Chen, Dean (Zhun)

has anyone gotten JSPTag's pager to work without using sessions?

Dean Chen


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: pagination & session scope issue

2002-10-01 Thread Chen, Dean (Zhun)

I'm using Lists that represent recordsets. The resultsets per request
changes frequently.

Dean Chen

-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 12:43 PM
To: Struts Users Mailing List
Subject: RE: pagination & session scope issue


It is a jvm level thing. I have a cache that is instantiated at app startup.
It works in a shared hosting environment too becuz each app runs it's own
classLoader. When the app needs to lookup data it looks in the cache first
under a key that is determined by you (usually a unique id that is produced
by a combination of lookup parameters). If the key is there then it pulls
the cached results(A Bean List) from it. It sounds like you may need
something that is more like a persistence layer. Are you caching recordsets
or Lists?

Brandon Goodin
Phase Web and Multimedia
P(406)862-2245
F(406)862-0354
http://www.phase.ws

-Original Message-----
From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 10:19 AM
To: 'Struts Users Mailing List'
Subject: RE: pagination & session scope issue


When u cache it, do you cache it in session scope or in application scope?
If you cache it in application scope, how does each form know which cache to
use.
I don't have a problem paginating... but the combination of session scope &
pagination is a problem.

Thanks

Dean Chen


-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 12:06 PM
To: Struts Users Mailing List
Subject: RE: pagination & session scope issue


if your data doesn't need to be live all the time... cache it and set an
appropriate timeout. I wrote a simple caching mechanism that works great.

This will reduce database lookups then you can create your pagination on the
backend with Some classes.

I have a set of classes i called Scroller,ScrollerBean, and
ScrollerPageBean.

The Scroller handles the splitting up of the List according to the page size
specified and the size of the list passed and handles all the logic for
determing the values that are stored in the ScrollerBean and
ScrollerPageBean. The ScrollerBean holds all the values for the actual List,
pageNumberList, next, nextPage, previous, previousPage, resultSize, etc. The
ScrollerPageBean holds data specific to each page (i.e. pageLabel,
pageValue, isSelected). Oh, also the Scroller does not return the whole List
of objects to the page. It trims it down to the appropriate subList of the
cached results.

Scroller - populates ScrollerBean and ScrollerPageBean

ScrollerBean - contains shared values for paging and contains a collection
of ScrollerPageBeans
properties:
* int next - nextPage Number
* boolean isNext - is there a next page
* int previous - previous Page number
* boolean isPrevious - is there a previous page
* resultSize - this holds the total result size of the initial
result set
* List objects - A list of beans usually generated from a recordset
to bean
list translation
* List scrollerPageBeans - A list of page values for generation of
page
list (ex 1 2 3 4)

ScrollerPageBean - contains page specific paging values
* int pageNum - array location of page Number to be passed back when
the
page is selected
* int currPage - viewable page number (pageNum +1) so if pageNum is
0 (the
index in the List) then the currPage would be 1
* boolean selected - a boolean indicating if this is the current
page being
viewed.

All of this is then passed to the page where you can easily use tag libs to
produce a page list.

Brandon Goodin
Phase Web and Multimedia
P(406)862-2245
F(406)862-0354
http://www.phase.ws

-----Original Message-
From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 9:46 AM
To: 'Struts Users Mailing List'
Subject: pagination & session scope issue


Hi,
I'm currently using Pager from JSPTags.com to do pagination. However, I'm
running into problems because it requires the data  to be kept in session
scope. Basically the problem is that if 2 windows for a single application
are open, the pagination mechanism fails because it uses the latest data in
session scope.
Is there a way around this besides going back to the database for every
pagination?

How does big websites like amazon, google, yahoo solve this problem??

Thanks a lot.

Dean Chen

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



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

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



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL P

RE: pagination & session scope issue

2002-10-01 Thread Chen, Dean (Zhun)

When u cache it, do you cache it in session scope or in application scope?
If you cache it in application scope, how does each form know which cache to
use. 
I don't have a problem paginating... but the combination of session scope &
pagination is a problem.

Thanks

Dean Chen


-Original Message-
From: Brandon Goodin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 12:06 PM
To: Struts Users Mailing List
Subject: RE: pagination & session scope issue


if your data doesn't need to be live all the time... cache it and set an
appropriate timeout. I wrote a simple caching mechanism that works great.

This will reduce database lookups then you can create your pagination on the
backend with Some classes.

I have a set of classes i called Scroller,ScrollerBean, and
ScrollerPageBean.

The Scroller handles the splitting up of the List according to the page size
specified and the size of the list passed and handles all the logic for
determing the values that are stored in the ScrollerBean and
ScrollerPageBean. The ScrollerBean holds all the values for the actual List,
pageNumberList, next, nextPage, previous, previousPage, resultSize, etc. The
ScrollerPageBean holds data specific to each page (i.e. pageLabel,
pageValue, isSelected). Oh, also the Scroller does not return the whole List
of objects to the page. It trims it down to the appropriate subList of the
cached results.

Scroller - populates ScrollerBean and ScrollerPageBean

ScrollerBean - contains shared values for paging and contains a collection
of ScrollerPageBeans
properties:
* int next - nextPage Number
* boolean isNext - is there a next page
* int previous - previous Page number
* boolean isPrevious - is there a previous page
* resultSize - this holds the total result size of the initial
result set
* List objects - A list of beans usually generated from a recordset
to bean
list translation
* List scrollerPageBeans - A list of page values for generation of
page
list (ex 1 2 3 4)

ScrollerPageBean - contains page specific paging values
* int pageNum - array location of page Number to be passed back when
the
page is selected
* int currPage - viewable page number (pageNum +1) so if pageNum is
0 (the
index in the List) then the currPage would be 1
* boolean selected - a boolean indicating if this is the current
page being
viewed.

All of this is then passed to the page where you can easily use tag libs to
produce a page list.

Brandon Goodin
Phase Web and Multimedia
P(406)862-2245
F(406)862-0354
http://www.phase.ws

-Original Message-
From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 9:46 AM
To: 'Struts Users Mailing List'
Subject: pagination & session scope issue


Hi,
I'm currently using Pager from JSPTags.com to do pagination. However, I'm
running into problems because it requires the data  to be kept in session
scope. Basically the problem is that if 2 windows for a single application
are open, the pagination mechanism fails because it uses the latest data in
session scope.
Is there a way around this besides going back to the database for every
pagination?

How does big websites like amazon, google, yahoo solve this problem??

Thanks a lot.

Dean Chen

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



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

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




pagination & session scope issue

2002-10-01 Thread Chen, Dean (Zhun)

Hi,
I'm currently using Pager from JSPTags.com to do pagination. However, I'm
running into problems because it requires the data  to be kept in session
scope. Basically the problem is that if 2 windows for a single application
are open, the pagination mechanism fails because it uses the latest data in
session scope.
Is there a way around this besides going back to the database for every
pagination? 

How does big websites like amazon, google, yahoo solve this problem?? 

Thanks a lot.

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




issue with multiple message-resources

2002-09-27 Thread Chen, Dean (Zhun)

Hi,
I've implemented multiple message-resources. I'm running into issue where
some actionErrors exists in one bundle and not another, hence causing
displaying errors like this:

TEST ERROR  
???en_US.err.test???  

My JSP looks like this:



In
  
there's a mapping of "error.test=TEST ERROR", so the first line displays
fine

In 
  
there's no such mapping, so I get "???en_US.err.test???"

Any one know how I can fix this? 

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: RequestProcessor logging cannot be disabled

2002-09-11 Thread Chen, Dean (Zhun)

I believe that's for older Log4J. Anyone?

Dean Chen


-Original Message-
From: John Yu [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 10:32 PM
To: Struts Users Mailing List
Subject: Re: RequestProcessor logging cannot be disabled



Shouldn't it be log4j.category.org.apache.commons=WARN ?
   


At 06:03 am 11-09-2002, you wrote:
>Hi,
>I'm extending RequestProcessor. However, after extending RequestProcessor,
>all RequestProcessor logs are being printed.
>The problem is similar to
>http://www.mail-archive.com/struts-user@jakarta.apache.org/msg36010.html
>
>I've modified my Log4J properties file with
>
>log4j.logger.org.apache.commons=WARN
>log4j.logger.org.apache.struts=WARN
>
>But that apparently doesn't help. The RequestProcessor logs are still
>displayted.
>
>Thanks,
>
>Dean Chen

-- 
John Yu   Scioworks Technologies
e: [EMAIL PROTECTED] w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - "Don't develop Struts Apps without it!"
Copyright (c) 2002 John Yu/Scioworks Technologies. All rights reserved.


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RequestProcessor logging cannot be disabled

2002-09-10 Thread Chen, Dean (Zhun)

Hi,
I'm extending RequestProcessor. However, after extending RequestProcessor,
all RequestProcessor logs are being printed.
The problem is similar to 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg36010.html

I've modified my Log4J properties file with

log4j.logger.org.apache.commons=WARN
log4j.logger.org.apache.struts=WARN

But that apparently doesn't help. The RequestProcessor logs are still
displayted.

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: processPreprocess & ActionForward

2002-09-04 Thread Chen, Dean (Zhun)

This works great. Maybe it can be added to the OReilly book too.

Dean Chen

Dean Chen
Goldman Sachs & Co.
1 New York Plaza - 38th Floor, New York, NY  10004
(917) 343-8446
[EMAIL PROTECTED]


-Original Message-
From: Jason Rosen [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 1:05 PM
To: 'Struts Users Mailing List'
Subject: RE: processPreprocess & ActionForward


You can use the processActionForward method of the RequestProcessor:

processActionForward(request, response, (ActionForward)
appConfig.findForwardConfig("myForward"));

-Original Message-
From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 04, 2002 9:51 AM
To: 'Struts Users Mailing List'
Subject: processPreprocess & ActionForward


Is it possible to access the ActionForward object from processPreprocess?

I'm trying to override processPreprocess to implement authentication.
However, I want to specify the forward page via struts-config.xml instead of
hard coding it.  Chpt 9 of OReilly book on serverside said that's
recommended but doesn't give an example.

Any ideas?  I searched the archive and found this 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15542.html
But this example extends ActionServlet.

Thanks,

Dean Chen

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

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

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




processPreprocess & ActionForward

2002-09-04 Thread Chen, Dean (Zhun)

Is it possible to access the ActionForward object from processPreprocess?

I'm trying to override processPreprocess to implement authentication.
However, I want to specify the forward page via struts-config.xml instead of
hard coding it.  Chpt 9 of OReilly book on serverside said that's
recommended but doesn't give an example.

Any ideas?  I searched the archive and found this 
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg15542.html
But this example extends ActionServlet.

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




nested write issue

2002-09-03 Thread Chen, Dean (Zhun)

Hi,
I have a quick question, I need a way to write a table to HTML. However, the
# of columns is dynamic.
The column names are "column1", "column2", etc.
I tried the following:


">
<% for(int i=1;i


<% } %>





However, I get an exception, apparently the JSP <%=%> isn't processed before
the nested is.
I've also tried 
"/>
but that doesn't work either.

Any ideas?

Thanks.

Dean Chen



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Dispatch Action & Validator

2002-08-09 Thread Chen, Dean (Zhun)

Has anyone gotten DispatchAction and Validator to work?

I wish to validate when a the dispatch parameter is set to a certain value.

For example:
If you a user wants to:

Create new element - validate
Copy element - no validate
Save element - validate
Refresh page - no validate
Delete element - no validate

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Trouble getting response.setContentType to work

2002-07-16 Thread Chen, Dean (Zhun)

Hi,
I'm having a bit of trouble getting Struts to serve Excel spreadsheets.
I have the following JSP. If I serve the JSP directly, Internet Explorer
works fine. If I have a page not within a frame and do a post ie:
"getjsp.do", it works fine. However, if I have the page within a frame and
do "getjsp.do" IE doesn't prompt me for download/open Excel. I can do the
same thing in Netscape and it works fine also. Any ideas?

<%
out.clear();
response.setHeader("Content-Disposition","attachment;filename=data.xls");
response.setContentType("application/vnd.ms-excel");
%>




Excel-Export



1997
2000
1999


12.3
13.4
15.6





Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Collection for ResultSet

2002-06-26 Thread Chen, Dean (Zhun)

Check out Jakarta's Commons BeanUtils.

Dean Chen

-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 2:55 PM
To: [EMAIL PROTECTED]
Subject: Re: Collection for ResultSet


Subject: Re: Collection for ResultSet
From: "David Chu" <[EMAIL PROTECTED]>
 ===
I am no expert bean developer, so this question may seem trivial to most of
you:

Supposing I have a ResultSet with colmnn names x, y and z, how can I
implement a generic bean that has getter's and setter's such as getX getY
and getZ.  My goal is to not have to rework the bean when using it in
another setting, say for ResultSet with col names a,b and c.  Is this at all
possible with a vector of beans?

-david

"Chen, Dean (Zhun)" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> We use a collection of beans. We also have a generic bean that can be
> created based on resultset. So we basically have one bean and one
collection
> class for all types of resultsets.
>
> Dean Chen
>
> -Original Message-
> From: Joseph Barefoot [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 27, 2002 2:13 PM
> To: Struts Users Mailing List
> Subject: RE: Collection for ResultSet
>
>
> Good point.  Woudn't this require more logic in the JSP to retrieve values
> from the CachedRowSet though?  I mean, won't you have to write code like
<%
> int displayValue = getInt(n++); %>  in order to retrieve values?
>
> peace,
> Joe
>
> > -Original Message-
> > From: Shekhar Jain [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, June 26, 2002 11:07 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Collection for ResultSet
> >
> >
> > You can use a CachedRowSet instead of a ResultSet and then just iterate
> > thru that in the JSP
> >
> > Shekhar Jain
> >
> > -Original Message-
> > From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
> > Sent: Wednesday, June 26, 2002 10:40 AM
> > To: [EMAIL PROTECTED]
> > Subject: Collection for ResultSet
> >
> >
> > Subject: Collection for ResultSet
> > From: "David Chu" <[EMAIL PROTECTED]>
> >  ===
> > What is the preferred method to iterate through the rows of a database
> > query from a JSP under the Struts framework?  Should I write a class
> > that dumps the contents of a ResultSet into some Collection?  It seems
> > this is a reoccuring problem and would have been tackled before.  Please
> > advise on a preferred solution.  Thanks.
> >
> >
> > --
> > -david
> >
> > --
> > David C. Chu
> > America Online
> > Network Tools Intern
> > --
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>



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

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




RE: Struts and WebLogic 5.1 from WebLogic 6.1

2002-06-26 Thread Chen, Dean (Zhun)

I thought struts.jar is supposed to go into WEB-INF/lib.

Dean Chen


-Original Message-
From: Daniel Jaffa [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 1:51 PM
To: Struts Users Mailing List
Subject: Re: Struts and WebLogic 5.1 from WebLogic 6.1


I have struts working fine in 5.1 sp 11 and 5.1 sp 8.

Just make sure that you have your weblogic class path and java class path
built correctly.  I put the struts.jar in the weblogic classpath and it
works fine.  And put your
xerces.jar in the java class path
- Original Message -
From: "Chen, Dean (Zhun)" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Wednesday, June 26, 2002 10:38 AM
Subject: RE: Struts and WebLogic 5.1 from WebLogic 6.1


> There's a lot of issues with 5.1, I'm having trouble installing any struts
> apps that uses ApplicationResources.properties file. There's also problems
> with WebLogic classloaders, they load up the files in the wrong order.
>
> Dean Chen
> -Original Message-
> From: Chris Hardin [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, June 25, 2002 7:22 PM
> To: [EMAIL PROTECTED]
> Subject: Struts and WebLogic 5.1 from WebLogic 6.1
>
>
>
>
>   We have a problem where we have completed an app for a customer on
> WebLogic 6.1 using all aspects of the EJB2.0 API and Struts and now the
> customer refuses to upgrade. What are some issues that we will faced
> retrofitting the app to WebLogic 5.1. Specifically, how is struts going to
> be affected by going back to 5.1 and what are some of the cons against not
> doing this so maybe we can convince the customer to upgrade to 6.1.
>
>
>
>
> _
> Chat with friends online, try MSN Messenger: http://messenger.msn.com
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

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

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




RE: Collection for ResultSet

2002-06-26 Thread Chen, Dean (Zhun)

We use a collection of beans. We also have a generic bean that can be
created based on resultset. So we basically have one bean and one collection
class for all types of resultsets.

Dean Chen

-Original Message-
From: Joseph Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 27, 2002 2:13 PM
To: Struts Users Mailing List
Subject: RE: Collection for ResultSet


Good point.  Woudn't this require more logic in the JSP to retrieve values
from the CachedRowSet though?  I mean, won't you have to write code like  <%
int displayValue = getInt(n++); %>  in order to retrieve values?

peace,
Joe

> -Original Message-
> From: Shekhar Jain [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 26, 2002 11:07 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Collection for ResultSet
>
>
> You can use a CachedRowSet instead of a ResultSet and then just iterate
> thru that in the JSP
>
> Shekhar Jain
>
> -Original Message-
> From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
> Sent: Wednesday, June 26, 2002 10:40 AM
> To: [EMAIL PROTECTED]
> Subject: Collection for ResultSet
>
>
> Subject: Collection for ResultSet
> From: "David Chu" <[EMAIL PROTECTED]>
>  ===
> What is the preferred method to iterate through the rows of a database
> query from a JSP under the Struts framework?  Should I write a class
> that dumps the contents of a ResultSet into some Collection?  It seems
> this is a reoccuring problem and would have been tackled before.  Please
> advise on a preferred solution.  Thanks.
>
>
> --
> -david
>
> --
> David C. Chu
> America Online
> Network Tools Intern
> --
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>
>
>
>
> --
> To unsubscribe, e-mail:

For additional commands, e-mail:



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ApplicationResources.properties location

2002-06-26 Thread Chen, Dean (Zhun)

Do I need to have WEB-INF/classes/ in my class path? Doesn't WebLogic
load up files in WEB-INF? it sees the *.class files in WEB-INF/classes. Any
WebLogic gurus out there that might know this answer?

Dean Chen

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 26, 2002 11:36 AM
To: Struts Users Mailing List
Subject: Re: ApplicationResources.properties location


It needs to be on the class-path, like any standard resource bundle. 

Where does WebLogic want you to put resource bundles?

"Chen, Dean (Zhun)" wrote:
> 
> Is there a way to put ApplicationResources.properties inside WEB-INF
instead
> of WEB-INF/classes/.?
> 
> I'm trying to work around the WebLogic 5.1 issue of not picking up
> ApplicationResources.properties. Thanks,
> 
> Dean Chen
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

-- Ted Husted, Husted dot Com, Fairport NY US
-- Java Web Development with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services

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

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




ApplicationResources.properties location

2002-06-26 Thread Chen, Dean (Zhun)

Is there a way to put ApplicationResources.properties inside WEB-INF instead
of WEB-INF/classes/.?

I'm trying to work around the WebLogic 5.1 issue of not picking up
ApplicationResources.properties. Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Struts and WebLogic 5.1 from WebLogic 6.1

2002-06-26 Thread Chen, Dean (Zhun)

There's a lot of issues with 5.1, I'm having trouble installing any struts
apps that uses ApplicationResources.properties file. There's also problems
with WebLogic classloaders, they load up the files in the wrong order.

Dean Chen
-Original Message-
From: Chris Hardin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 7:22 PM
To: [EMAIL PROTECTED]
Subject: Struts and WebLogic 5.1 from WebLogic 6.1




  We have a problem where we have completed an app for a customer on 
WebLogic 6.1 using all aspects of the EJB2.0 API and Struts and now the 
customer refuses to upgrade. What are some issues that we will faced 
retrofitting the app to WebLogic 5.1. Specifically, how is struts going to 
be affected by going back to 5.1 and what are some of the cons against not 
doing this so maybe we can convince the customer to upgrade to 6.1.




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




URGENT: Weblogic Application.properties issue

2002-06-25 Thread Chen, Dean (Zhun)

Hi,
I have tried deploying the application as either WAR for exploded format. I
checked my WAR file and it has the ApplicationResources.properties in it,
but WebLogic doesn't load that into the working directory and then complains
about NullPointerException. When I exploded the WAR file, it appears in
/WEB-INF/class/com/youcompany/yourapplication package, but WebLogic still
doesn't pick it up. This has been an issue for WebLogic 5.1 for some time
now, however, the solutions posted on the web was to copy them manually to
the working directory. Are there any other ways around it? I'm using Struts
1.1b.

Thanks,

Dean Chen

-Original Message-
From: Anand Raman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 9:04 AM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


hi chen

I am not sure how you are deploying your web application. If you are
deploying it the "war" way you need to 
1. place the application resources under the
/WEB-INF/class/com/youcompany/yourapplication package
2. restart the application server 

If you are deploying the application in a exploded war format, then just
place the applicationresources file in the classpath/

Things should start working now. You might have the root proviliges but I am
assuming that you have priviliges to change the application war 

hope this helps
anand

-----Original Message-
From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 25, 2002 12:05 AM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


I tried copying the ApplicationResources.properties to the correct folder in
_tmp_xxx, however, since I'm not root, I don't have permission to do that?
Are there any work arounds? I saw something for SP8, but I'm not using SP8.
Thanks,

Dean Chen


-Original Message-
From: Chen, Dean (Zhun) 
Sent: Monday, June 24, 2002 2:11 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Thanks

Dean Chen


-Original Message-
From: Dan Cancro [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Here you go.

http://jakarta.apache.org/struts/doc-1.0.2/installation-wls.html

> -Original Message-
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 11:08 AM
> To: 'Struts Users Mailing List'
> Subject: Weblogic Application.properties issue
> Importance: High
> 
> 
> Hi,
> 
> I have a question, for my application, it works fine under 
> Tomcat, however,
> when I try to port it to WebLogic 5.1 SP10, I get this issue: 
> 
> java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources
> .java:558)
> at
> org.apache.struts.action.ActionServlet.initInternal(ActionServ
> let.java:989)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)
> 
> I looked in the _tmp_ folder than WebLogic generates and 
> do not find the
> ApplicationResources.properties file. Is this a WebLogic 
> issue? Is there a
> way to get that file in there? I see the files are created as 
> root but I
> don't have root access. 
> 
> PS> I deployed the application un-war'ed.
> 
> Thanks,
> 
> Dean
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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

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

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

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




RE: Weblogic Application.properties issue

2002-06-24 Thread Chen, Dean (Zhun)

I tried copying the ApplicationResources.properties to the correct folder in
_tmp_xxx, however, since I'm not root, I don't have permission to do that?
Are there any work arounds? I saw something for SP8, but I'm not using SP8.
Thanks,

Dean Chen


-Original Message-----
From: Chen, Dean (Zhun) 
Sent: Monday, June 24, 2002 2:11 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Thanks

Dean Chen


-Original Message-
From: Dan Cancro [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Here you go.

http://jakarta.apache.org/struts/doc-1.0.2/installation-wls.html

> -----Original Message-
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 11:08 AM
> To: 'Struts Users Mailing List'
> Subject: Weblogic Application.properties issue
> Importance: High
> 
> 
> Hi,
> 
> I have a question, for my application, it works fine under 
> Tomcat, however,
> when I try to port it to WebLogic 5.1 SP10, I get this issue: 
> 
> java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources
> .java:558)
> at
> org.apache.struts.action.ActionServlet.initInternal(ActionServ
> let.java:989)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)
> 
> I looked in the _tmp_ folder than WebLogic generates and 
> do not find the
> ApplicationResources.properties file. Is this a WebLogic 
> issue? Is there a
> way to get that file in there? I see the files are created as 
> root but I
> don't have root access. 
> 
> PS> I deployed the application un-war'ed.
> 
> Thanks,
> 
> Dean
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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

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

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




RE: Weblogic Application.properties issue

2002-06-24 Thread Chen, Dean (Zhun)

Thanks

Dean Chen


-Original Message-
From: Dan Cancro [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:13 PM
To: 'Struts Users Mailing List'
Subject: RE: Weblogic Application.properties issue


Here you go.

http://jakarta.apache.org/struts/doc-1.0.2/installation-wls.html

> -Original Message-
> From: Chen, Dean (Zhun) [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 11:08 AM
> To: 'Struts Users Mailing List'
> Subject: Weblogic Application.properties issue
> Importance: High
> 
> 
> Hi,
> 
> I have a question, for my application, it works fine under 
> Tomcat, however,
> when I try to port it to WebLogic 5.1 SP10, I get this issue: 
> 
> java.lang.NullPointerException
> at
> org.apache.struts.util.MessageResources.getMessageResources(Me
> ssageResources
> .java:558)
> at
> org.apache.struts.action.ActionServlet.initInternal(ActionServ
> let.java:989)
> at
> org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)
> 
> I looked in the _tmp_ folder than WebLogic generates and 
> do not find the
> ApplicationResources.properties file. Is this a WebLogic 
> issue? Is there a
> way to get that file in there? I see the files are created as 
> root but I
> don't have root access. 
> 
> PS> I deployed the application un-war'ed.
> 
> Thanks,
> 
> Dean
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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

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




Weblogic Application.properties issue

2002-06-24 Thread Chen, Dean (Zhun)

Hi,

I have a question, for my application, it works fine under Tomcat, however,
when I try to port it to WebLogic 5.1 SP10, I get this issue: 

java.lang.NullPointerException
at
org.apache.struts.util.MessageResources.getMessageResources(MessageResources
.java:558)
at
org.apache.struts.action.ActionServlet.initInternal(ActionServlet.java:989)
at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:411)

I looked in the _tmp_ folder than WebLogic generates and do not find the
ApplicationResources.properties file. Is this a WebLogic issue? Is there a
way to get that file in there? I see the files are created as root but I
don't have root access. 

PS> I deployed the application un-war'ed.

Thanks,

Dean

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JSP Pager Tag performance issues

2002-06-21 Thread Chen, Dean (Zhun)

I am currently using JSP Tag's Pager Tag Library v1.1. The tag library is
very easy to use. However, I'm suspecting there's a performance issue.
I'm returning a Collection of beans. However, it takes a very long time for
JSP to generate the page even for small # of results. It also takes very
long to go from one page to another, longer than even SQL queries. I check
the logs, after the servlet returns to the jsp, it would take a long time
for the page to generate.

Are there any performance tuning that I can do? Are there another JSP Paging
tags?

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Weblogic 5.1 + commons.logging

2002-06-20 Thread Chen, Dean (Zhun)

I'm using sp8 I believe. But it's on Unix.  The jar files are in
/WEB-INF/lib directory.  I don't understand where WebLogic
looks for Jar files. Does it look in the WEB-INF/lib directory, what about
the appclasses directory?

Thanks,

Dean Chen



-Original Message-
From: Daniel Jaffa [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 20, 2002 4:48 PM
To: Struts Users Mailing List
Subject: Re: Weblogic 5.1 + commons.logging


What sp are you using and, where in startweblogic.cmd  are u putting the jar
in the classpath (The weblogic or java)
- Original Message -----
From: "Chen, Dean (Zhun)" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, June 20, 2002 3:07 PM
Subject: Weblogic 5.1 + commons.logging


> Hi,
>
> I'm migrating my Tomcat application to WebLogic 5.1, in doing so I am
> getting this error:
>
> Thu Jun 20 15:05:07 EDT 2002:  Error
> instantiating servlet: com.gs.eq.ed.atlas.web.commons.SetsActionServlet
> org.apache.commons.logging.LogConfigurationException:
> java.lang.ClassNotFoundException:
> org.apache.commons.logging.impl.LogFactoryImpl
> at
> org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:497)
> at
> org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
> at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
> at
> org.apache.struts.action.ActionServlet.(ActionServlet.java:331)
>
> I placed the commons-logging.jar into the WEB-INF/lib directory, however,
it
> still complains. Has anyone seen these types of error before? Is this a
> weblogic problem or a commons-logging problem?
>
> Thanks,
>
> Dean Chen
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

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

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




Weblogic 5.1 + commons.logging

2002-06-20 Thread Chen, Dean (Zhun)

Hi,

I'm migrating my Tomcat application to WebLogic 5.1, in doing so I am
getting this error:

Thu Jun 20 15:05:07 EDT 2002:  Error
instantiating servlet: com.gs.eq.ed.atlas.web.commons.SetsActionServlet
org.apache.commons.logging.LogConfigurationException:
java.lang.ClassNotFoundException:
org.apache.commons.logging.impl.LogFactoryImpl
at
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:497)
at
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:350)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:381)
at
org.apache.struts.action.ActionServlet.(ActionServlet.java:331)

I placed the commons-logging.jar into the WEB-INF/lib directory, however, it
still complains. Has anyone seen these types of error before? Is this a
weblogic problem or a commons-logging problem?

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




datetime

2002-06-07 Thread Chen, Dean (Zhun)

Hi,
There's been discussion whether to use long or String to keep track of dates
between Forms & JSP. What is the best way?

If a use needs to enter  6/6/2002, and passed in as a String,
Date.valueOf() won't work because it's not in JDBC Date format. Any
suggestions?

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




SqlTimeConverter usage

2002-06-07 Thread Chen, Dean (Zhun)

Anyone have succesfully used SqlTimeConverter?

I'm having trouble using it. The API didn't seem up-to-date, so I looked at
the source.

I tried, 

SqlTimeConverter stc = new SqlTimeConverter(null);
fromDate = stc.convert(java.sql.Time.class, fromDate);

But that doesn't work, I get  incompatible types error. Thanks in advance,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Validation and Frames

2002-06-05 Thread Chen, Dean (Zhun)

Has anyone gotten Validation to work with Frames? Right now, when using
frames, the server-side errors will show up in the target frame. Any way
around it?

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DynaBean

2002-06-05 Thread Chen, Dean (Zhun)

Is there a way to obtain a collection of all the properties in a DynaBean or
a BasicDynaBean???

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




nested tag issue

2002-06-03 Thread Chen, Dean (Zhun)

Hi,

I am trying to use the nested tag. It's giving me a null pointer exception
if I try access a method of the nested tags by itself. However, if I enclose
it in a  then it'll work. Any ideas?

Thanks,


This works, where filter.do maps to the form that holds myCollection:





  
  


This doesn't:




  


Thanks in advance.

Dean Chen


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: please help - validator null pointer

2002-05-31 Thread Chen, Dean (Zhun)

I'm getting the same error. I'm using DynaValidatorForm though



My validation.xml is:












btw, where I can find the documentation on validation.xml?

Dean Chen



-Original Message-
From: Fernando Esteban Barril Otero [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 2:51 PM
To: Struts Users Mailing List
Subject: Re: please help - validator null pointer


Try to put the dynamic="true" attribute in your form-bean definition.

 (MyForm extends ValidatorForm)

I was getting a NullPointerException in the getDynaClass() method inside the
validate() and it worked after I put the dynamic attribute (which tells that
the bean have dynamic properties).

Fernando


- Original Message -
From: "Peter Onthrops" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 31, 2002 3:37 PM
Subject: please help - validator null pointer


>
> I am having problems installing the validator. I am getting a
NullPointerException (see below) in the validate method of
...commons.validator.Validator. I followed the install instructions and just
can't figure out what is causing the exception. Has anyone encountered this?
>
> ---
>
> java.lang.NullPointerException
> at org.apache.commons.validator.Validator.validate(Unknown Source)
> at
org.apache.struts.validator.action.ValidatorForm.validate(Unknown Sou
> rce)
> at
org.apache.struts.action.ActionServlet.processValidate(ActionServlet.
> java:2038)
> at
org.apache.struts.action.ActionServlet.process(ActionServlet.java:149
> 7)
> at
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:504)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
> at com.evermind[Orion/1.5.4 (build 10585)]._deb._lnc(.:514)
> at com.evermind[Orion/1.5.4 (build 10585)]._deb._wmb(.:170)
> at com.evermind[Orion/1.5.4 (build 10585)]._co._wbb(.:581)
> at com.evermind[Orion/1.5.4 (build 10585)]._co._fs(.:189)
> at com.evermind[Orion/1.5.4 (build 10585)]._bt.run(.:62)
>
> -
>
> My configuration is as follows.
>
> 1) /WEB-INF/struts-config.xml
>
>  (MyForm
extends ValidatorForm)
>
> 2) /WEB-INF/validation.xml
>
> 
>
>
>
>   
>  indexedProperty="member"
>   indexedListProperty="members"
>   depends="required">
>
>   
>   
>
> 
>
>
> 3) validator-rules.xml includes the validator "required"
>
> 4) /WEB-INF/lib includes commons-validator.jar, struts-validator.jar, and
jakarta-regexp-1.2.jar
>
> 5) web.xml includes the example servet config given in the install
directions
>
> My guess is I missed a configuration step, however I can't seem to figure
out where.
>
> Any help is greatly appreciated.
>
>
>
> Thanks so much,
>
> Petra


--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Missing API pages

2002-05-31 Thread Chen, Dean (Zhun)

Anyone else getting this?

Not Found
The requested URL
/struts/api/org/apache/struts/validator/DynaValidatorForm.html was not found
on this server.




Apache/2.0.37-dev Server at jakarta.apache.org Port 80

Thanks,


Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




DynaActionForm + Nested tags

2002-05-30 Thread Chen, Dean (Zhun)

I have a couple questions regarding DynaActionForm + the Nested tag

For DynaActionForm, I can reference any Objects, not only String? Including
ones I create for my application?

In my Action class, can I do this:

DynaActionForm histForm = (DynaActionForm) form;  //creates form
histForm.set("totalResults",new Integer(3));

Then in the JSP, if I do


That should display the #?

Does the Nested Tag automatically refer to the form associated with the page
defined in struts-config.xml?

For example:
If the DynaActionForm has a TdCollection object, defined in
struts-config.xml as:


and the TdCollection object contains a Collection of Td objects, and each Td
object has two properties, prop1 and prop2, is this how I can iterate
through them in the JSP?








Thanks,

Dean Chen

Dean Chen
Goldman Sachs & Co.
1 New York Plaza - 38th Floor, New York, NY  10004
(917) 343-8446
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: CachedRowSet vs Collection of ValueObject

2002-05-29 Thread Chen, Dean (Zhun)

Is CachedRowSet performant?

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

"A CachedRowSet class-a disconnected rowset that caches its data in memory;
not suitable for very large data sets, but an ideal way to provide thin Java
clients, such as a Personal Digital Assistant (PDA) or Network Computer
(NC), with tabular data "

Is this information in the tutorial out of date?

Thanks,

Dean Chen


-Original Message-
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 11:10 AM
To: [EMAIL PROTECTED]
Subject: Re: CachedRowSet vs Collection of ValueObject


Subject: Re: CachedRowSet vs Collection of ValueObject
From: Vic C <[EMAIL PROTECTED]>
 ===
When people use a the old ResultSet API (instead of the newer RowSet 
API) they need a collection to store rows.

You can avoid creating collecion and the garbage collection and the meta 
data about the collection by using the RowSet's CachedRowSet.

(Also RowSet can be created using new() and not ResultSet, making it 
less likely to leak memory. )

A CachedRowSet is a list of rows.
Why is it so cool and why is it called Cached?
Becuase it is DISCONNECTED.
So after you retrieve, you can disconnect and still access the row. You 
do not need to create a collection.

The reason people used to need a collection is becuase they used to use 
ResultSet which is not a JavaBean and ... it needed to be connected.

Vic


vivek shrivastava wrote:
> Hi,
> 
> Following question may sound stupid but this is something I just thought 
> of it.
> 
> Can we use a helper class (Let's say HelperDB) which has "CachedRowSet" 
> as a private member of that helper class instead of using a collection 
> of ValueObject?
> 
> I am thinking of using this helper class in EmpForm object of my little 
> application. In EmpAction class i can get a instance of helper class 
> from EmpForm or i can build a instance of helper class in EmpAction 
> class and set it to EmpForm class.
> 
> i am also thinking of implementing Iterator interface in helper class so 
> that i can use this class in  tag. Like:
> 
> 
> 
> This way i don't have to create a collection of EmpVO (almost duplicate 
> of Empform).
> 
> is it a good idea or bad?
> 
> Please do comment.
> 
> Thanks
> vivek
> 
> 
> _
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
> 
> 
> -- 
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 



--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Why use DAOFactory? Can't get connection

2002-05-24 Thread Chen, Dean (Zhun)

Hi,

I'm running into some issue with implementing a DAO. I see posts that some
design use a DaoFactory, I don't understand the benefit of it. Is it
possible to obtain connections instead of using a Factory?

For example: 

In my XXXAction class, I have

BeanDao beandao = new BeanDao();
beandao.executeQuery(sql, VO);


The BeanDao extends BaseDao, which has the following, where name is
"java:comp/env/jdbc/myDatasource"

protected Connection getConnection(String name) throws
DatabaseUnavailableException{
Connection conn = null;
try {
InitialContext ic = new InitialContext();

DataSource ds = (DataSource) ic.lookup(name);

if (ds==null)
throw new
DatabaseUnavailableException("Cannot connect to database: "+name);

try {
conn = ds.getConnection();  
}
catch (SQLException e) {
// log
e.printStackTrace();
}
}
catch (NamingException e) {
//e.printStackTrace();
}
return conn;
}

This however, doesn't work, I get this error:

java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:243)
at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:233)
at
tyrex.jdbc.xa.EnabledDataSource.getConnection(EnabledDataSource.java:204)

The even odder thing is that instead of
DataSource ds = (DataSource) ic.lookup(name);
I explicitly call using
DataSource ds = (DataSource)
ic.lookup("java:comp/env/jdbc/myDatasource");

I don't get the above SQL error, instead, I get a
java.lang.NullPointerException when I try to use the connection.

I'm using Tomcat 4.03 with Struts 1.1 + Sybase jconn2.jar

If anyone can shed some light on this, I'd really appreciate it. I looked up
on the tomcat mailing-list archive and didn't see any solutions.

Thanks,

Dean Chen



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: org.apache.struts.actions.ReloadAction missing in Struts 1.1

2002-05-23 Thread Chen, Dean (Zhun)

Are there any ways to simulate the functionality of ReloadAction? I'm using
Tomcat 4+, even with the reload option turned on, it doesn't reload changes
to struts-config.xml or web.xml, how would I reload them without shutting
down the server and bring it back up? Is there a way to compile the
ReloadAction separately? (I didn't look into the code yet)
Thanks,

Dean Chen




-Original Message-
From: Dave Weis [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 23, 2002 11:46 AM
To: Struts Users Mailing List
Subject: Re: org.apache.struts.actions.ReloadAction missing in Struts
1.1



On Thu, 23 May 2002, Chen, Dean (Zhun) wrote:
> I started transferring my 1.0 app to 1.1, however, I realized some Action
> classes are missing,
> I cannot find org.apache.struts.actions.ReloadAction in the binary
> distribution. I've also checked the nightly build and it's not there. I
> found a similar post here
> http://www.mail-archive.com/struts-user@jakarta.apache.org/msg23877.html

Craig had said earlier that he removed them. I personally would like them
readded, it makes debugging much easier.

dave

-- 
Dave Weis "I believe there are more instances of the abridgment
[EMAIL PROTECTED]   of the freedom of the people by gradual and silent
  encroachments of those in power than by violent 
  and sudden usurpations."- James Madison


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

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




org.apache.struts.actions.ReloadAction missing in Struts 1.1

2002-05-23 Thread Chen, Dean (Zhun)

I started transferring my 1.0 app to 1.1, however, I realized some Action
classes are missing,

I cannot find org.apache.struts.actions.ReloadAction in the binary
distribution. I've also checked the nightly build and it's not there. I
found a similar post here
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg23877.html

Any solutions/explanations for this?

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Multiple struts-config.xml for Struts 1.1

2002-05-22 Thread Chen, Dean (Zhun)

There were description about implementing multiple struts-config.xml in
Struts 1.0x, see
http://www.mail-archive.com/struts-user@jakarta.apache.org/msg28739.html

Are there any similar solutions for Struts 1.1?

Thanks

Dean Chen


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




JDK 1.4 Logging with Struts

2002-05-16 Thread Chen, Dean (Zhun)

Has anyone implemented JDK 1.4's Logging features with Struts? We used
Log4J, but since 1.4 has Logging incorporated, we are investigating this
option, any suggestions? The examples on Sun's web site aren't too helpful
because it doesn't give you examples of configuration files. Also, how can
this be integrated with Tomcat or Weblogic?

Thanks,

Dean Chen


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Now how does one do this?

2002-05-03 Thread Chen, Dean (Zhun)

The document keeps referencing catalina-ant.jar
but I don't see it anywhere. I have Tomcat 4 Release version. The directory
structure seems different from the documentation. Any one know where I can
get catalina-ant.jar?
Thanks

Dean Chen



-Original Message-
From: Jim Crossley [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 03, 2002 2:49 PM
To: Struts Users Mailing List
Subject: Re: Now how does one do this?


"Craig R. McClanahan" <[EMAIL PROTECTED]> writes:

> In the Tomcat 4 distribution, there is an Application Developer's Guide
> document that describes some "best practices" at organizing your source
> code repositories for webapp development, and includes a nice prebuilt Ant
> build.xml file that illustrates these practices.  If you grab the 4.1.0
> alpha release, it even includes custom Ant tasks that can deploy and
> undeploy webapps dynamically, without restarting Tomcat.

Is this the document, Craig?

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/appdev/index.html

Or is the one you're describing only available in the dist?

-- Jim

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Forms Beans and DAO (Best Practices)

2002-05-03 Thread Chen, Dean (Zhun)

This might be a stupid question, but what are DAO and Value Object supposed
to be?

Does DAO encapsulate the logic to make JDBC calls?  For example, would it
contain the name of a stored procedure or would that be passed to it?

Is ValueObject a generic object that stores the result sets?  For example, a
Collection of somesort? or a Collection of Collections?

Thanks, I am also trying to figure out what the most performant way to
design this.


Dean Chen



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 03, 2002 1:17 PM
To: Struts Users Mailing List
Subject: Re: Forms Beans and DAO (Best Practices)





I see what you're doing and agree it seems easier.

But coupling the form beans to the DAO's so tightly I wouldn't call a best
practice. Here is another approach:


- Have the DAO's return Value Objects. But then have a setValueObject() on
the form bean so you can store the entire value object in it.

 First, in your action class, do something like:

  myFormBean1.setValueObject1(myDao1.getValueObject1());

 Then either,

 1. Have your get/set methods for the form bean properties use the
value object for storage internally, like:

  // in the form bean.java file

  private ValueObject valueObject1
  public void setValueObject1(ValueObject val1) {
   this.valueObject = val1;
  }

  // Note: no property1 field needed!
  public String getProperty1() {
   return this.valueObject.getProperty1();
  }
  public void setProperty1(String property1) {
   this.valueObject.setProperty1(property1);
  }


 - or -

 2. Have the setValueObject() in the form bean deconstruct the value
object and store its components in the form bean

  // again, in the form bean.java file

  // Note: no valueObject1 field needed!
  public void setValueObject1(ValueObject val1) {
   this.property1= val1.getProperty1();
  }

  private String property1;
  public String getProperty1() {
   return this.valueObject.getProperty1();
  }


Another alternative would be to put a "facade" in front of multiple DAO's
to simplify the actoin class and decouple it from the back end data
sources.

 // In  MyAction.java

 int id = 123;  // id is key into back end systems
 MyFacade facade = new MyFacade();
 MyFormBean formBean1 = facade.getFormBean(id);

 // Then in the facade, have something like:

 public MyFormBean (int identifier) {

  MyFormBean mfb = new MyFormBean();

  MyDao1 dao1 = new MyDao1 ();
  mfb.setDao1Vals(dao1.getVals(id));

  MyDao2 dao2 = new MyDao2 ();
  mfb.setDao2Vals(dao2.getVals(id));

  MyDao3 dao3 = new MyDao3 ();
  mfb.setDao3Vals(dao3.getVals(id));

  return mfb;
 }

 This decouples the FormBean and the Action class  from the structure
of the DAOs and the back-end sysems.



Given all this, I like the first approach above the best.


FWIW -
Kevin





Mike Duffy <[EMAIL PROTECTED]> on 05/03/2002 11:50:37 AM

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

To:   [EMAIL PROTECTED]
cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:  Forms Beans and DAO (Best Practices)


I am pre-populating a form with information from a data base.

Is the following procedure acceptable, or is there another procedure
that would be considered a "Best Practice"?

Instantiate the form bean in the action class.

Instantiate one or more DAO objects in the action class.

Call methods in the DAO objects that would take the form bean as an
argument and fill up the necessary fields.

I understand the need to keep layers separate; however, if I am just
trying to fill up the fields in a form, it seems unnecessary to have
the DAO objects return data objects and then call a series of
"get/set" methods to take the data from the data objects and put it
in the form bean.

Thanks.

__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

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







---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---

RE: how do I do something after a forward?

2002-05-03 Thread Chen, Dean (Zhun)

We have it implemented a little differently


   public final class myAction report extends Action
   {
public ActionForward perform(...)
{

try {
dbh = get_database_connection()
initialize_some_beans( dbh , other , stuff );

} catch {

  return (mapping.findForward("error"));

}
finally
{
  close_connection_no_matter_what();
}

  return (mapping.findForward("success"));

}
  }


Dean Chen


-Original Message-
From: Nelson, Laird [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 03, 2002 3:15 PM
To: 'Struts Users Mailing List'
Subject: RE: how do I do something after a forward?


> -Original Message-
> From: Malcolm Dew-Jones [mailto:[EMAIL PROTECTED]]
> Want I want is conceptually the same as
> 
>public final class myAction report extends Action
>{
>   public ActionForward perform(...)
>   {
>   dbh = get_database_connection()
>   initialize_some_beans( dbh , other , stuff );
> 
>   try 
>   {
> return (mapping.findForward("success"));
>   } 
>   finally
>   {
> close_connection_no_matter_what();
>   }
>   }
>   }
> 
> Obviously the above does not work.

It should; finally blocks are supposed to execute before the final value is
returned.

See
http://java.sun.com/docs/books/jls/second_edition/html/statements.doc.html#2
36653 for details.

Cheers,
Laird

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Excel Export

2002-05-03 Thread Chen, Dean (Zhun)

I have a simple question regarding these implementations?

After a bean is populated by the Action class, do I write the contents of
the bean to a temporary xls file and then do:

Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader ("CONTENT-DISPOSITION", "attachment; filename =file.xls")

in the Action class?


Or do I build the JSP using contents of the bean but setting 

response.setHeader("Content-Disposition","attachment;filename=data.csv");
response.setHeader("Content-Type", "application/ms-excel");

Will the file created by the JSP be called data.csv?

Thanks,

Dean Chen



-Original Message-
From: Ajay Chitre [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 3:16 PM
To: Struts Users Mailing List
Subject: RE: Excel Export


I really liked Vic's suggestion regarding SOAP.  I am going to explore that
myself.  In the mean time here's a quick & dirty Test.jsp that you can
use


HTH!







Excel Format
<%


response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","inline" );

ServletOutputStream outStream = response.getOutputStream();

PrintWriter pw = response.getWriter();



pw.println("");
pw.println("");
pw.println("");
pw.println("");
pw.println("");
pw.println("");
pw.println("Custom Reports Process - xxx Report");
pw.println("");
pw.println("");
pw.println("");
pw.println("Selection Criteria");
pw.println(" ");
pw.println("");
pw.println("");
pw.println("This is a test");
pw.println("");
pw.println("");

pw.println("Testing$$$");
pw.flush();
pw.close();


%>






>-- Original Message --
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>From: "Galbreath, Mark" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: Excel Export
>Date: Mon, 29 Apr 2002 13:44:00 -0400
>
>
>This is way too complicated.  All you have to do is set the MIME type in
>the
>setContentType() declaration in the servlet delivering the output to
>"application/vnd.msExcel" and the browser will automatically display the
>output in an Excel spreadsheet.
>
>Mark
>
>-Original Message-
>From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
>Sent: Monday, April 29, 2002 1:40 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Excel Export
>
>
>Subject: Re: Excel Export
>From: Vic C <[EMAIL PROTECTED]>
> ===
>Struts is Java. Excel is VBA. They don't like each other. One good way

>is to expose your Java (Form) beans via SOAP.
>Then in Excel (using Pocket Soap client for example) write a VBA macro

>that gets the SOAP XML data.
>You will need to add SOAP interface to you web app server.
>
>SOAP is good for most distributed  or diverse applications and good for

>hetrogenous enviroments. (There is a news list on soap at 
>news.strutsplus.com)
>
>Vic
>
>
>Chen, Dean (Zhun) wrote:
>> This might be a little of topic, however, does struts support a
>standardized
>> way to export results from queries in a comma delimited format, for
>> importing into excel?
>> Thanks,
>> 
>> Dean Chen
>> 
>> --
>> To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>> 
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

Ajay Chitre

Diligent Team, Inc.
(Where Diligent People Work as a Team)

http://www.DiligentTeam.com


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

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




RE: Loading Database

2002-05-03 Thread Chen, Dean (Zhun)

Thanks this will help alot. Our application is not based on EJB, rather
using straight forward JavaBeans. However, I assume there can be a lot of
performance gains in using EJB such as via JMS. I'll look into this more,
and keep everyone updated if I find an elegant and performant solution.
Additional input is well appreciated.

Thanks,

Dean Chen




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 03, 2002 10:33 AM
To: Struts Users Mailing List
Subject: Re: Loading Database






The easiest approach is to retrieve all the content for later pages in the
Action for the first page. This would slow the first page, but would allow
later pages to be pulled from cache. This seems like the easiest approach.
It could be accomplished using a course-grained Entity Bean or some sort of
Data Access Object (DAO) stored in session.

If you really want to send the first page to the use while caching the
later pages "simultaneously", you'd have to have more than one thread
working on it.

This is because the Struts main controlling Servlet directs the View (i.e.
jsp file) to be rendered and sent to the use AFTER you return an
ActionForward.

In other words, you have to "return" from your Action class as a
prerequisite to sending the response to the user. There may be a way around
this that I'm not aware of.

There are still ways you could accomplish this if you really want to:

One method may be to have your Action class launch a seperate thread which
fetches the data and stores it in the form bean. You could store the form
bean in the session (or servlet) context and the thread should be able to
access it. I recommend against this approach though, once you have multiple
threads updating a single object you're asking for trouble.

A better approach may be this:

 - Create a startup servlet (outside Struts) that launches a thread in its
init() method to perform caching for you.
 - Put an object in the Servlet context that holds cache requests.
 - In the action class for the first page, add a "cache request" to the
object in the Servlet Context
 - Have the thread from the startup servlet monitor this object
periodically and perform the fetching of the data when it finds a new cache
request.
 - The startup thread then updates the "cache request" object with either
an object holding the cached data or the name of a ServletContext attibute
where the cached object is stored.

I'm not completely happy with this as it seems a bit of a hack - but it
should work and allows you to solve the problem using only a servlet
container (i.e. Tomcat only solution).


A better way (assuming you have an ejb container that supports JMS), would
be to have the first Action class send a JMS message requesting the data.
The next Action class could then receive via the JMS response an object
containing all the cached data. If there's no JMS response, it could just
go get the data itself. JMS Provides a good method of doing "asynchronous"
processing. And it's easier than most people think.

Good luck,

FWIW -
Kevin















"Chen, Dean (Zhun)" <[EMAIL PROTECTED]> on 05/03/2002 09:27:45 AM

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

To:   "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:  Loading Database


Hi,

For struts, I know it's possible to load a bean and then display the
contents of the bean in sequence. Is it possible to load a bean partially,
display the contents, while simultaneously loading the rest of the bean.
This way when the user is viewing the 1st page, the rest of the pages are
loading. We are trying to make the system feel as responsive as possible.

Also, if there are any workarounds, I would really appreciate it.

Thanks,

Dean Chen

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







---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---


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

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




Loading Database

2002-05-03 Thread Chen, Dean (Zhun)

Hi,

For struts, I know it's possible to load a bean and then display the
contents of the bean in sequence. Is it possible to load a bean partially,
display the contents, while simultaneously loading the rest of the bean.
This way when the user is viewing the 1st page, the rest of the pages are
loading. We are trying to make the system feel as responsive as possible.

Also, if there are any workarounds, I would really appreciate it.

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: html:options

2002-05-01 Thread Chen, Dean (Zhun)

I have a similar situation:

I'm trying to display the keys of an enumeration in a drop down list.

The keys are Integers and are stored in a Hashtable
>reports.put(new Integer(reportID), item);

The function getReportsKeys returns  reports.keys();

I have two questions:

1. Can html:options collection be used with an enumeration?

2. How can I display the list of keys in JSP?
I have this, what should go in ___WHAT_GOES_HERE???,
I tried intValue   //from the Integer class, but I get
"javax.servlet.ServletException: No getter method for property
reports.reportsKeys of bean com.gs.ed.sh.GLOBAL"

if there's no solution, would I have to create another class call reportID
with getters & setters?
here's the code


--Select Report
Type--

  

Thanks,

Dean Chen

-Original Message-
From: Leonardo Maciel [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:55 PM
To: 'Struts Users Mailing List'
Subject: RE: html:options



insert line 

like this:




 

Actually  should do




-Original Message-
From: Jayaraman Dorai [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 2:52 PM
To: [EMAIL PROTECTED]
Subject: html:options


Hi,
 
I want in my drop down a blank record. This needs to be the default. This
provides the user an option to not select anything( It is a null field). 
 
Is it possible to do this other than putting an empty string in the
collection. How to set this blank string as the default(not affecting the
user's selected value in the edit mode)? 
 
I hope I am clear. 
 
Jayaraman

--
To unsubscribe, e-mail:

For additional commands, e-mail:


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Pagination

2002-04-30 Thread Chen, Dean (Zhun)

I figured it out, all I had to do was to make everything session scope.
I do have a question though, what is the difference between setting scope in
struts-config.xml vs. in the  tag?

Dean Chen


-Original Message-
From: Mark Nichols [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 30, 2002 12:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Pagination


This is a little different than you describe but it may help you:

http://jsptags.com/tags/navigation/pager/

HTH,
/\/\ark


>From: "Chen, Dean (Zhun)" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: Pagination
>Date: Tue, 30 Apr 2002 11:56:04 -0400
>
>Hi,
>I've got pagination to work with struts.
>
>After a user fills out a form & clicks submit, the Action class parses the
>query & invokes a stored procedure, which in turn fills the bean. If the
>user specified 10 items per page, the resultset will stop after 10
>iterations. The correct 10 items will be displayed on the following JSP.
>
>My issue is that on the JSP, when I click Next, the users settings does not
>get passed to the Action class.
>
>My question is, how do I keep a users settings persistent across multiple
>pages?
>
>Should I use session scope (currently request scope) or should I use hidden
>forms?
>
>I would appreciate any sample sites using struts that implemented
>pagination.
>
>Thanks,
>
>Dean Chen
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>


_
Join the world's largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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

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




Pagination

2002-04-30 Thread Chen, Dean (Zhun)

Hi,
I've got pagination to work with struts.

After a user fills out a form & clicks submit, the Action class parses the
query & invokes a stored procedure, which in turn fills the bean. If the
user specified 10 items per page, the resultset will stop after 10
iterations. The correct 10 items will be displayed on the following JSP.

My issue is that on the JSP, when I click Next, the users settings does not
get passed to the Action class.

My question is, how do I keep a users settings persistent across multiple
pages?

Should I use session scope (currently request scope) or should I use hidden
forms?

I would appreciate any sample sites using struts that implemented
pagination.

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Excel Export

2002-04-29 Thread Chen, Dean (Zhun)

Thanks everyone.

Dean Chen

Dean Chen
Goldman Sachs & Co.
1 New York Plaza - 38th Floor, New York, NY  10004
(917) 343-8446
[EMAIL PROTECTED]


-Original Message-
From: Ajay Chitre [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 3:16 PM
To: Struts Users Mailing List
Subject: RE: Excel Export


I really liked Vic's suggestion regarding SOAP.  I am going to explore that
myself.  In the mean time here's a quick & dirty Test.jsp that you can
use


HTH!







Excel Format
<%


response.setContentType("application/vnd.ms-excel");
response.setHeader("Content-Disposition","inline" );

ServletOutputStream outStream = response.getOutputStream();

PrintWriter pw = response.getWriter();



pw.println("");
pw.println("");
pw.println("");
pw.println("");
pw.println("");
pw.println("");
pw.println("Custom Reports Process - xxx Report");
pw.println("");
pw.println("");
pw.println("");
pw.println("Selection Criteria");
pw.println(" ");
pw.println("");
pw.println("");
pw.println("This is a test");
pw.println("");
pw.println("");

pw.println("Testing$$$");
pw.flush();
pw.close();


%>






>-- Original Message --
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>From: "Galbreath, Mark" <[EMAIL PROTECTED]>
>To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
>Subject: RE: Excel Export
>Date: Mon, 29 Apr 2002 13:44:00 -0400
>
>
>This is way too complicated.  All you have to do is set the MIME type in
>the
>setContentType() declaration in the servlet delivering the output to
>"application/vnd.msExcel" and the browser will automatically display the
>output in an Excel spreadsheet.
>
>Mark
>
>-Original Message-
>From: Struts Newsgroup [mailto:[EMAIL PROTECTED]]
>Sent: Monday, April 29, 2002 1:40 PM
>To: [EMAIL PROTECTED]
>Subject: Re: Excel Export
>
>
>Subject: Re: Excel Export
>From: Vic C <[EMAIL PROTECTED]>
> ===
>Struts is Java. Excel is VBA. They don't like each other. One good way

>is to expose your Java (Form) beans via SOAP.
>Then in Excel (using Pocket Soap client for example) write a VBA macro

>that gets the SOAP XML data.
>You will need to add SOAP interface to you web app server.
>
>SOAP is good for most distributed  or diverse applications and good for

>hetrogenous enviroments. (There is a news list on soap at 
>news.strutsplus.com)
>
>Vic
>
>
>Chen, Dean (Zhun) wrote:
>> This might be a little of topic, however, does struts support a
>standardized
>> way to export results from queries in a comma delimited format, for
>> importing into excel?
>> Thanks,
>> 
>> Dean Chen
>> 
>> --
>> To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>> For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>> 
>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

Ajay Chitre

Diligent Team, Inc.
(Where Diligent People Work as a Team)

http://www.DiligentTeam.com


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

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




Excel Export

2002-04-29 Thread Chen, Dean (Zhun)

This might be a little of topic, however, does struts support a standardized
way to export results from queries in a comma delimited format, for
importing into excel?
Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts & Performance

2002-04-26 Thread Chen, Dean (Zhun)

Hi,
I'm new to struts and have a couple general questions.

1. With struts, once you make a request to the database and begin getting
results back, does struts wait until the entire result set has been
populated into the beans then transfer control to the JSP? The reason why I
ask this is that my project requires data to be displayed ASAP, although
additional data can be retrieved while the 1st page is displayed. How can
this be accomplished?

2. What is the max # of records a bean can hold? If I have 1 million rows,
can I put them all in a bean without crashing my system? I assume the web
browser would probably crash if all that data is displayed at once. How
would pagination affect the performance?

3. Is there some way to export the contents of a result set to a comma
delimited file (ie: CSV) and have the user download it?

Thanks,

Dean Chen

--
To unsubscribe, e-mail:   
For additional commands, e-mail: