Re: HttpServletRequest.getParameterNames()

2005-07-25 Thread Laurie Harper

Wendy Smoak wrote:

From: "Carl Smith" <[EMAIL PROTECTED]>
In my application, I need to get all the HTTP request parameter names 
and their values,

I am using HttpServletRequest.getParameterNames() and it works very well.
Then in one of my page, I have to submit the request as a type of 
"multipart/form-data",
and then I found out HttpServletRequest.getParameterNames()  stop 
working.
Do you have any idea/alternatice as how to get the parameters for 
multipart HTTP request?


Let the framework populate a form bean, and retrieve the values from it.
  http://struts.apache.org/faqs/actionForm.html

Is this already a Struts app?  If you need help getting started, just ask.


Shouldn't request.getParameterName() 'just work' if it's called from within 
a Struts context? Multipart requests should get fed the 
MultipartRequestHandler automatically shouldn't they?


L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


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



Re: HttpServletRequest.getParameterNames()

2005-07-25 Thread Wendy Smoak

From: "Carl Smith" <[EMAIL PROTECTED]>
In my application, I need to get all the HTTP request parameter names and 
their values,

I am using HttpServletRequest.getParameterNames() and it works very well.
Then in one of my page, I have to submit the request as a type of 
"multipart/form-data",

and then I found out HttpServletRequest.getParameterNames()  stop working.
Do you have any idea/alternatice as how to get the parameters for 
multipart HTTP request?


Let the framework populate a form bean, and retrieve the values from it.
  http://struts.apache.org/faqs/actionForm.html

Is this already a Struts app?  If you need help getting started, just ask.

--
Wendy Smoak 




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



Re: Re: JSF is the beginning of the end of Struts !!!

2005-07-25 Thread John Henry Xu
JSF has been there for a while. We have to see how it does in real 
applications. 

EJB has been there for many years, but its complexity of configuration (at 
least before mature tools were developed) kept many J2EE projects expensive and 
over budgets (bad ROI examples).

Thus we have so many frameworks in Java. Sun is to be blamed for always 
providing UNPROVEN technologies for java. In many cases, following sun too 
closely is not wise.

PHP was great but I hope java can catch up in real application.

John H. Xu


http://www.usanalyst.com

http://www.GetusJobs.com (The largest free job portal in North America)  



  - Original Message -
  From: netsql
  To: user@struts.apache.org
  Subject: Re: JSF is the beginning of the end of Struts !!!
  Date: Mon, 25 Jul 2005 20:13:05 -0500

  >
  > John Public wrote:
  > > After just finishing my JSF class, I can confidently
  > > confirm that JSF will eventually lead to Struts
  > > becoming OBSOLETE.
  >
  > :-) Enhydra and Torque would say that too circa 2001.
  > Put up a site and lets see it.
  >
  > > Let's all get
  > > behind JSF before MS takes over the web.
  >
  > Nothing wrong w/ C# IMO.
  > I think PHP is "best(fast and cheap, lowest risk, most roi)" for
  > "genric" server side rendering applications. (But then... I think
  > the future is client side rendering )
  > If JSF(or EJB) fails, it won't be becuase somone did not "get
  behind it".
  >
  > Competition should give us best answer, and I am all for using
  > better tech. Every few years I'd like a new tech please.
  >
  >
  > -- .V
  >
  > People are conversing... without posting their email or filling up
  their
  > mail box.
  > roomity.com
  >
  > No sign up to read or search this Rich Internet App.
  >
  >
  >
  -
  > To unsubscribe, e-mail: [EMAIL PROTECTED]
  > For additional commands, e-mail: [EMAIL PROTECTED]






Jack H. Xu
Technology columnist and editor

http://www.usanalyst.com

http://www.getusjobs.com (The largest free job portal in North America)

-- 
___
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm



Re: JavaScript question?

2005-07-25 Thread Frank W. Zammetti
The property document.readyState can be used to get the current status 
of any document... I forget all the possible states it can return, I 
always only check for "complete" to trigger some event when the page 
loads.  You can use this to check the status of the child window as long 
as you keep a reference to it when you open it.


I don't think this will work if you simply load the CSV into the child 
though... Give it a try, but I'm not sure when readyState will return 
complete, assuming it does at all, when a save as dialog is in play.


Frank

Balasubramaniam, Sezhiyan wrote:

Hi Frank,

Thanks a lot for taking time to explain the options.

Based on our requirements, the option 3 looks more promising to me (we
already use frames for this solution)

BTW, is there anyway, I can check the child window document status from
the main widow, in this case? 
As the result comes in the dialog, which event or attribute may indicate

the main window about the successful csv download on the child window?

As a note, we took care of multiple submissions by disabling the button.

Once again thanks.

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 25, 2005 4:10 PM

To: Struts Users Mailing List
Subject: Re: JavaScript question?

Hi Sezhiyan,

There isn't any "standard" way of doing this... what's happening is that

the request is coming back just like any other would that updates what 
the user sees.  As you mentioned though, the save as dialog appears 
instead... there is no event you can hook that will tell you when the 
page is loaded because, in essence, the browser is expecting a new page 
that would overwrite any event you could hook even if one existed.


There's a couple of ways I can think of to do this...

(1) Perhaps the easiest is to target your form submission (or link) that

gets the CSV to _new.  This will open a popup that will be the target of

the return... since it's a save as dialog, the popup should, I believe, 
go away, leaving just the save as dialog.  This wouldn't help you 
determine when to change back to the default cursor though... you could 
kick off a timer to change it back in a few seconds.


Before I forget, note that changing to an hourglass isn't stopping the 
user from clicking more than once, it's just a visual cue that they 
shouldn't.  You may want to disable the button instead of changing 
cursors.  The same problem of knowing when to change back applies though

:)

(2) Use AJAX to get the CSV, then display it to the user, perhaps in a 
new window, perhaps in a  on the same page.  You'll know exactly 
when to switch the cursor back in this case.


(3) If you can use frames, have a hidden frame (cols/rows=0) and target 
that... you can then kick off a timer in your main frame that checks the


document status.  When its complete, change the cursor back.

(4) Kind of a hybrid of 1 and 3... open a new window, and in response to

onLoad, make the call that gets the CSV... Put a message that says 
"After the Save As dialog appears, please click here" and when they 
click here, call a function back in the parent window that resets the 
cursor.


Hope that helps!

Frank

Balasubramaniam, Sezhiyan wrote:


Though this is not a direct struts question, hope I will some guidance
for my issue. 
In one of our struts application, we have a CSV download


functionality.


We use response.setContentType("application/csv;").

When the download happens, user has no clue about the state of the
request and keeps on clicking the submit button.

So we changed cursor to hour-glass on the form submit. This technique
works well with the other pages where response shown in the browser
itself. 
But in the csv download, the page stays as it is, but the response


comes


as a windows dialog for saving it or to open it.

What happens is, even after the download, the mouse stays as


hourglass.


Can somebody advice me, which event, we have to look for, to turn the
mouse to default, after the page download?

Thanks in advance.

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










--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



Re: JSF is the beginning of the end of Struts !!!

2005-07-25 Thread Michael Jouravlev
On 7/25/05, John Public <[EMAIL PROTECTED]> wrote:
> After just finishing my JSF class, I can confidently
> confirm that JSF will eventually lead to Struts
> becoming OBSOLETE. Make no mistake about it. JSF
> rocks. JSF is based on "true" MVC architecture, not
> the MODEL 2 version that Struts uses. Struts had a
> good run, now it is time to build on the JSF
> foundation. JSF is the ONLY foundation that can
> compete witn ASP.NET 2.0 at this time. Let's all get
> behind JSF before MS takes over the web. Hopefully
> Tool Vendors will harness JSF potential and make
> Front-end web dev as easy as VS 2005 does. Time is not
> on our side. Let's get busy !!!
> 
> J.J.
> JSF Developer (former Struts Lead Developer)

Brainwashed, converted, brandishing with a cross, on a mission to save
unholy ones from gehenna.

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



Re: JSF is the beginning of the end of Struts !!!

2005-07-25 Thread netsql

John Public wrote:

After just finishing my JSF class, I can confidently
confirm that JSF will eventually lead to Struts
becoming OBSOLETE. 


:-) Enhydra and Torque would say that too circa 2001.
Put up a site and lets see it.


Let's all get
behind JSF before MS takes over the web. 


Nothing wrong w/ C# IMO.
I think PHP is "best(fast and cheap, lowest risk, most roi)" for 
"genric" server side rendering applications. (But then... I think the 
future is client side rendering )

If JSF(or EJB) fails, it won't be becuase somone did not "get behind it".

Competition should give us best answer, and I am all for using better 
tech. Every few years I'd like a new tech please.



--

.V

People are conversing... without posting their email or filling up their
mail box.
roomity.com 

No sign up to read or search this Rich Internet App.


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



JSF is the beginning of the end of Struts !!!

2005-07-25 Thread John Public
After just finishing my JSF class, I can confidently
confirm that JSF will eventually lead to Struts
becoming OBSOLETE. Make no mistake about it. JSF
rocks. JSF is based on "true" MVC architecture, not
the MODEL 2 version that Struts uses. Struts had a
good run, now it is time to build on the JSF
foundation. JSF is the ONLY foundation that can
compete witn ASP.NET 2.0 at this time. Let's all get
behind JSF before MS takes over the web. Hopefully
Tool Vendors will harness JSF potential and make
Front-end web dev as easy as VS 2005 does. Time is not
on our side. Let's get busy !!!

J.J.
JSF Developer (former Struts Lead Developer)





Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 

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



RE: JavaScript question?

2005-07-25 Thread Balasubramaniam, Sezhiyan
Hi Frank,

Thanks a lot for taking time to explain the options.

Based on our requirements, the option 3 looks more promising to me (we
already use frames for this solution)

BTW, is there anyway, I can check the child window document status from
the main widow, in this case? 
As the result comes in the dialog, which event or attribute may indicate
the main window about the successful csv download on the child window?

As a note, we took care of multiple submissions by disabling the button.

Once again thanks.

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 25, 2005 4:10 PM
To: Struts Users Mailing List
Subject: Re: JavaScript question?

Hi Sezhiyan,

There isn't any "standard" way of doing this... what's happening is that

the request is coming back just like any other would that updates what 
the user sees.  As you mentioned though, the save as dialog appears 
instead... there is no event you can hook that will tell you when the 
page is loaded because, in essence, the browser is expecting a new page 
that would overwrite any event you could hook even if one existed.

There's a couple of ways I can think of to do this...

(1) Perhaps the easiest is to target your form submission (or link) that

gets the CSV to _new.  This will open a popup that will be the target of

the return... since it's a save as dialog, the popup should, I believe, 
go away, leaving just the save as dialog.  This wouldn't help you 
determine when to change back to the default cursor though... you could 
kick off a timer to change it back in a few seconds.

Before I forget, note that changing to an hourglass isn't stopping the 
user from clicking more than once, it's just a visual cue that they 
shouldn't.  You may want to disable the button instead of changing 
cursors.  The same problem of knowing when to change back applies though
:)

(2) Use AJAX to get the CSV, then display it to the user, perhaps in a 
new window, perhaps in a  on the same page.  You'll know exactly 
when to switch the cursor back in this case.

(3) If you can use frames, have a hidden frame (cols/rows=0) and target 
that... you can then kick off a timer in your main frame that checks the

document status.  When its complete, change the cursor back.

(4) Kind of a hybrid of 1 and 3... open a new window, and in response to

onLoad, make the call that gets the CSV... Put a message that says 
"After the Save As dialog appears, please click here" and when they 
click here, call a function back in the parent window that resets the 
cursor.

Hope that helps!

Frank

Balasubramaniam, Sezhiyan wrote:
> Though this is not a direct struts question, hope I will some guidance
> for my issue. 
> In one of our struts application, we have a CSV download
functionality.
> We use response.setContentType("application/csv;").
>  
> When the download happens, user has no clue about the state of the
> request and keeps on clicking the submit button.
> 
> So we changed cursor to hour-glass on the form submit. This technique
> works well with the other pages where response shown in the browser
> itself. 
> But in the csv download, the page stays as it is, but the response
comes
> as a windows dialog for saving it or to open it.
> 
> What happens is, even after the download, the mouse stays as
hourglass.
> 
> Can somebody advice me, which event, we have to look for, to turn the
> mouse to default, after the page download?
> 
> Thanks in advance.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.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: JavaScript question?

2005-07-25 Thread Frank W. Zammetti

Hi Sezhiyan,

There isn't any "standard" way of doing this... what's happening is that 
the request is coming back just like any other would that updates what 
the user sees.  As you mentioned though, the save as dialog appears 
instead... there is no event you can hook that will tell you when the 
page is loaded because, in essence, the browser is expecting a new page 
that would overwrite any event you could hook even if one existed.


There's a couple of ways I can think of to do this...

(1) Perhaps the easiest is to target your form submission (or link) that 
gets the CSV to _new.  This will open a popup that will be the target of 
the return... since it's a save as dialog, the popup should, I believe, 
go away, leaving just the save as dialog.  This wouldn't help you 
determine when to change back to the default cursor though... you could 
kick off a timer to change it back in a few seconds.


Before I forget, note that changing to an hourglass isn't stopping the 
user from clicking more than once, it's just a visual cue that they 
shouldn't.  You may want to disable the button instead of changing 
cursors.  The same problem of knowing when to change back applies though :)


(2) Use AJAX to get the CSV, then display it to the user, perhaps in a 
new window, perhaps in a  on the same page.  You'll know exactly 
when to switch the cursor back in this case.


(3) If you can use frames, have a hidden frame (cols/rows=0) and target 
that... you can then kick off a timer in your main frame that checks the 
document status.  When its complete, change the cursor back.


(4) Kind of a hybrid of 1 and 3... open a new window, and in response to 
onLoad, make the call that gets the CSV... Put a message that says 
"After the Save As dialog appears, please click here" and when they 
click here, call a function back in the parent window that resets the 
cursor.


Hope that helps!

Frank

Balasubramaniam, Sezhiyan wrote:

Though this is not a direct struts question, hope I will some guidance
for my issue. 
In one of our struts application, we have a CSV download functionality.

We use response.setContentType("application/csv;").
 
When the download happens, user has no clue about the state of the

request and keeps on clicking the submit button.

So we changed cursor to hour-glass on the form submit. This technique
works well with the other pages where response shown in the browser
itself. 
But in the csv download, the page stays as it is, but the response comes

as a windows dialog for saving it or to open it.

What happens is, even after the download, the mouse stays as hourglass.

Can somebody advice me, which event, we have to look for, to turn the
mouse to default, after the page download?

Thanks in advance.

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







--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



[SOLVED] Re: Cannot retrieve definition for form bean null disaster

2005-07-25 Thread Gareth Meyrick
hi,

thanks for the responses.. the subject line did look like a FAQ question,
hence there were few replies (thanks Lucas and Vincent).

as per the FAQ, i added a null form bean for the action question.. although
it still didn't work:(

i was confused because the web application worked the first time.. but never
again.  the problem was caused by a misbehaving JAAS servlet filter (arguably
OT for this list, but i'll probably post a URL for the fixed incarnation
since the "login" question comes up so often).

programming late at night and then making lame posts for help is not
a practice i'd advocate.. unfortunately i broke my own rules..  sorry
for any noise.

cheers -gm

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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread Vinny
Yo Rick!
I think that statement was in regard to self-implemented (inflicted?) 
 POJO DAOs,
not IBATIS in particular. 


> The fact that you state:
> 
> "You'll spend all your time writing grunt-work plumbing and error
> handling and maintenance is a nightmare."
> 
> only shows you haven't even tried iBATIS since, for if you had, you
> wouldn't be making such erroneous statements.
> 
> --
> Rick
> 
> -
> 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]



JavaScript question?

2005-07-25 Thread Balasubramaniam, Sezhiyan

Though this is not a direct struts question, hope I will some guidance
for my issue. 
In one of our struts application, we have a CSV download functionality.
We use response.setContentType("application/csv;").
 
When the download happens, user has no clue about the state of the
request and keeps on clicking the submit button.

So we changed cursor to hour-glass on the form submit. This technique
works well with the other pages where response shown in the browser
itself. 
But in the csv download, the page stays as it is, but the response comes
as a windows dialog for saving it or to open it.

What happens is, even after the download, the mouse stays as hourglass.

Can somebody advice me, which event, we have to look for, to turn the
mouse to default, after the page download?

Thanks in advance.

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



HttpServletRequest.getParameterNames()

2005-07-25 Thread Carl Smith

In my application, I need to get all the HTTP request parameter names and their 
values, I am using HttpServletRequest.getParameterNames() and it works very 
well. Then in one of my page, I have to submit the request as a type of 
"multipart/form-data", and then I found out 
HttpServletRequest.getParameterNames()  stop working. Do you have any 
idea/alternatice as how to get the parameters for multipart HTTP request?

Thanks in advace.


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

Re: Cannot retrieve definition for form bean null disaster

2005-07-25 Thread Vincent
Shouldn't it be? :

name="surveyForm" <---
 forward="/pages/Survey.jsp"/>


Gareth Meyrick wrote:
> hi,
> 
> i'm at a loss.. i've verified the usual suspects, checked the usual places,
> but still can't find an answer.
> 
> background:
> 
>   /Login -> /LoginSubmit -> /Survey -> /SurveySubmit
> 
>   from struts-config.xml (IMHO unrelelated stuff elided):
> 
>   
>  type="com.w3elements.form.SurveyForm"/>
>   
> 
>   
> 
>   
> 
>   
>  forward="/pages/Survey.jsp"/>
>   
> 
> the first time everything works.
> 
> the next time tomcat bails with:
> 
> 
>   - Root Cause -
>   javax.servlet.jsp.JspException: Cannot retrieve definition for form bean 
> null on
>  action /Survey
> 
> 
> and won't work again unless you restart tomcat.
> 
> well.. it's just a forward hiding a JSP.  Survey.jsp contains a form
> that forwards to /SurveySubmit (which _is_ associated with a form bean..
> yup.. also works the first time).
> 
> software:
>   tomcat 5.0.19
> struts 1.2.6
> 
> i'm probably doing something incredibly stupid..
> 
> any comments or suggestions appreciated.
> 
> TIA -gm
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
The most beautiful thing we can experience is the mysterious.
It is the source of all true art and science.
- Albert Einstein

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



Re: How to read ResourceBundle

2005-07-25 Thread Vincent
I've found Nick Heudecker's tutorial helpful
on this subject:
http://www.systemmobile.com/articles/strutsMessageResources.html


Ashutosh Satyam wrote:
> Hi,
>  In my application I want to set the error key based on whether 
> the error key is present in resource bundle. The error key is 
> generated in the system and the top most layer 'Action class' is 
> supposed to set the keys based on the error key availability.
> 
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> Sample/Pseudo code demonstrating what I exactly tend to do.
> 
> String key = null;
> String[] param = null;
> 
> ResourceBundle bundle =  getBudle();
> if("a.b.c.d".isPresent(bundle))
>   key = "a.b.c.d";
>   param = new String[2]
> param[0]="s1";
> param[1]="s2;
> elseif("a.b.c."isPresent(bundle))
>   key = "a.b.c";
> elseif("a.b".isPresent(bundle))
>   key="a.b";
> elseif("a".isPresent(bundle))
>   key = "a"
> else
>   key = "default.errorkey";
> 
> ActionErrors errors = new ActionErrors();
> If(param != null)
>  errors.add(ActionErrors.GLOBAL_ERROR,
> new ActionError(key,params));
> else
>  errors.add(ActionErrors.GLOBAL_ERROR,
> new ActionError(key,params));
> 
> saveErrors(req,errors);
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> 
> Is there a handle available through Struts framework to read Resource Bundle 
> so that I can look whether a particular key is present or not and accordingly 
> construct ActionError.
> 
> Any pointers on this will be appreciated.
> 
> Thansk & Regards,
> Ashutosh
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


-- 
The most beautiful thing we can experience is the mysterious.
It is the source of all true art and science.
- Albert Einstein

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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Michael Jouravlev
On 7/25/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> You know, we've really gotten away from what was originally being
> discussed here... we were talking about DispatchActions, and now we're
> talking about redirect-after-post.  How did that happen?

Because these are related things. Because two-phase component is
easier to build with DispatchAction. You said that you did not see the
use for DispatchAction and I offered you an example. But you are
right, I have steered too far away.

Michael.

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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Frank W. Zammetti
On Mon, July 25, 2005 3:38 pm, Michael Jouravlev said:
> Oh gosh, Frank, can you think more abstractively (is this a proper
> adjective?) It does not really matter, why login page follows welcome
> page, this is merely an *example*. Ok, consider that welcome page *is*
> a login page, but a user came from another site and after unsuccessful
> login attempt wants to return back to the previous site. Better?

Abstractly is the correct term, but that's not important :)

I don't care if the user can get to their previous site with one back
click from my site.  Not my problem.  How they navigate MY site is all I'm
paid to care about.

> Why??? They want to return from "login page" to whatever "previous
> page". I see only two pages here, why should they hit back 6 times???

You know, we've really gotten away from what was originally being
discussed here... we were talking about DispatchActions, and now we're
talking about redirect-after-post.  How did that happen?

> They expect a webapp, which navigates from page one to page two.
> Therefore, it should be possible to navigate from page two to page one
> in one click. Is not this logical? *That* is the way it should work.
> Instead, users have to deal with raw implementation of HTTP POST. They
> don't care about HTTP, they just want to go back from page two to page
> one.

I agree, but my point is that you are achieving this by defeating the
fundamental nature of the browser, whether that fundamental nature is good
or bad (and I would tend to agree with you that it is bad).  People tend
to perceive things that don't work as expected as being broken, even if
what they expected wasn't good to begin with.

> Actually, vintage browsers work great. It is the Opera which is a
> black sheep. Umm... should HD television be broadcasted? It is used by
> what? 1%, 3% of subscribers. Those who do not use it, get the same
> show with lower quality, that is it.
>
> Conversely to HD TV, Opera is used by only about 2% of users, and most
> of them use Opera specifically because it caches every page. These
> users like exactly this behavior and *they* expect that. So it is OK
> for them if they had to click Back six times.

Unless there is an alternative that solves the problem for all, and there
is, as I described earlier.  I'm not saying it's a BETTER solution,
because it has shortcomings too, but in this one regard I think it might
be better.

> Normal... hm... users expect just to return from page two to page one.
> If they use browser other than Opera, they get exactly what should
> happen, return from page two to page one. If they use the application
> on Opera, they have to click back six times, just like in most other
> applications, but application does not break because of this. Hell,
> fill it up with 89 instead of Sunoco 94, it will still be driveable,
> not that fast though :)

Until it starts knocking and makes my car seem to be broken. :)


But, I'd still like to know how we got to here from a discussion of
DispatchActions? :)

Frank

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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Michael Jouravlev
On 7/25/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> On Mon, July 25, 2005 3:11 pm, Michael Jouravlev said:
> > Ok, I will use the same use case I used during last weeks :) a login
> > form. Say, you have a welcome page on a website, which directs a user
> > to a login page. How many pages do you have? I hope your answer is
> > two.
> 
> I would have said one... why would I force a user to click a button to GET
> to the logon page in the first place?  Why isn't the logon page and
> welcome page the same thing?  This is the case in my apps.  Therefore,
> when a logon failure occurs, they are on the logon/welcome page, with a
> message telling them about the failure, and they can try again.

Oh gosh, Frank, can you think more abstractively (is this a proper
adjective?) It does not really matter, why login page follows welcome
page, this is merely an *example*. Ok, consider that welcome page *is*
a login page, but a user came from another site and after unsuccessful
login attempt wants to return back to the previous site. Better?

> > It did
> > not work, and a login page is redisplayed with error (is not this the
> > same login page, logically?) The user  wants to return to welcome
> > page.
> 
> Why?  They are already where they need to be.  If they really want to go
> back, let'em hit back 6 times :)

Why??? They want to return from "login page" to whatever "previous
page". I see only two pages here, why should they hit back 6 times???

> But again, what was the original expectation by the client?  Is
> this a web app?  Then guess what?  That's the way it works.  Deal with it.

They expect a webapp, which navigates from page one to page two.
Therefore, it should be possible to navigate from page two to page one
in one click. Is not this logical? *That* is the way it should work.
Instead, users have to deal with raw implementation of HTTP POST. They
don't care about HTTP, they just want to go back from page two to page
one.

> > Having one address for login page, and redirecting to it after
> > submitting the data, we ensure (for most browsers) that browser
> > history contains only one entry of our logical page. Which is exactly
> > what a user expects.
> 
> It's that "for most browsers" part that bugs me... If you code to
> standards, in theory at least, things work across all browsers (of a
> reasonable vintage anyway)... even if we agree that its better to not have
> the 6 browser history items, why should I put something in place to defeat
> it that isn't even entirely cross-browser?  That seems to me to be
> exacerbating an already bad situation.

Actually, vintage browsers work great. It is the Opera which is a
black sheep. Umm... should HD television be broadcasted? It is used by
what? 1%, 3% of subscribers. Those who do not use it, get the same
show with lower quality, that is it.

Conversely to HD TV, Opera is used by only about 2% of users, and most
of them use Opera specifically because it caches every page. These
users like exactly this behavior and *they* expect that. So it is OK
for them if they had to click Back six times.

Normal... hm... users expect just to return from page two to page one.
If they use browser other than Opera, they get exactly what should
happen, return from page two to page one. If they use the application
on Opera, they have to click back six times, just like in most other
applications, but application does not break because of this. Hell,
fill it up with 89 instead of Sunoco 94, it will still be driveable,
not that fast though :)

> > Right, clients don't know the details of tecnhology. We as developers
> > should offer them the best we can do (in reasonable time, of course).
> > On the other hand, do your clients really care about what happens when
> > a user clicks Refresh button? I would say, they ask for certain pages
> > to be bookmarkable. And oh, make it in blue, not in yellow ;)
> 
> Perhaps... but are they going to be happy when you tell them it might not
> work in browser A and B but is OK in C and D?

What "it"? Application works either way, only on non-Opera browsers it
works nicer, that is it.

Michael.

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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread netsql

Leon Rosenberg wrote:
 




I think the sentence "clustering will help you scaling" is an urban myth :-)

Leon

+1

--

.V

People are conversing... without posting their email or filling up their
mail box.
roomity.com 

No sign up to read and search.


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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread Leon Rosenberg
 

> -Ursprüngliche Nachricht-
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 25. Juli 2005 21:19
> An: Struts Users Mailing List
> Betreff: Re: [OT] Hibernate vs. iBatis vs. POJO
> 
> On 7/25/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> > I think the problem is rather that none of the dbs scales.
> > To scale you need something in front of db in the business layer 
> > (middleware), so it's no difference whether you use ibatis or sql. 
> > Could be nasty with hibernate though, at least you need to turn off 
> > the lazy loading...
> > 
> > leon
> 
> I thought that database clusters exist before J2EE clusters 
> ;) And I believe that former are more robust than latter too.
> 
> Michael.


Database clusters exists, true. But who tells you that they scale???

Actually I has often seen projects, where the architect told, if we will
have scalability problems, we will cluster the db.
Then, the day X came, they clustered the db and then... surprise, surprise
it became even slower...

I think the sentence "clustering will help you scaling" is an urban myth :-)

Leon



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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread Leon Rosenberg
 

> -Ursprüngliche Nachricht-
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Montag, 25. Juli 2005 21:19
> An: Struts Users Mailing List
> Betreff: Re: [OT] Hibernate vs. iBatis vs. POJO
> 
> On 7/25/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> > I think the problem is rather that none of the dbs scales.
> > To scale you need something in front of db in the business layer 
> > (middleware), so it's no difference whether you use ibatis or sql. 
> > Could be nasty with hibernate though, at least you need to turn off 
> > the lazy loading...
> > 
> > leon
> 
> I thought that database clusters exist before J2EE clusters 
> ;) And I believe that former are more robust than latter too.
> 
> Michael.


Database clusters exists, true. But who tells you that they scale???

Actually I has often seen projects, where the architect told, if we will
have scalability problems, we will cluster the db.
Then, the day X came, they clustered the db and then... surprise, surprise
it became even slower...

I think the sentence "clustering will help you scaling" is an urban myth :-)

Leon



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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Frank W. Zammetti
On Mon, July 25, 2005 3:11 pm, Michael Jouravlev said:
> Ok, I will use the same use case I used during last weeks :) a login
> form. Say, you have a welcome page on a website, which directs a user
> to a login page. How many pages do you have? I hope your answer is
> two.

I would have said one... why would I force a user to click a button to GET
to the logon page in the first place?  Why isn't the logon page and
welcome page the same thing?  This is the case in my apps.  Therefore,
when a logon failure occurs, they are on the logon/welcome page, with a
message telling them about the failure, and they can try again.

If we're talking user friendliness and expectations, THIS is how it should
be IMO.

> So we have two pages and we can return from a login page to
> welcome page using Back, and then to go again to login page using
> Forward. I think it is logical, that we need to click Back *only once*
> to return from login page to welcome page.

And I would agree, if we really want to persue a fundamentally flawed site
design :)

> Now a user tries to login. He makes several attempts, say five.

Should have been locked out at 3, but I digress... ;)

> It did
> not work, and a login page is redisplayed with error (is not this the
> same login page, logically?) The user  wants to return to welcome
> page.

Why?  They are already where they need to be.  If they really want to go
back, let'em hit back 6 times :)

> How many times is he supposed to click Back button? In most
> applications, six times. Why? because browser recorded each login
> attempt as a separate resource location.
>
> Therefore, a user actually *expects* to click Back only once to return
> back, because login page is a second page. Instead, he is *forced* to
> click six times. Do you really think that clicking Back six times is
> logical and expected by a user? I do not thik so.

Agreed.  But again, what was the original expectation by the client?  Is
this a web app?  Then guess what?  That's the way it works.  Deal with it.
 If they wanted something more fat-client-like, then I would address the
fundamentally bad design first.

> Having one address for login page, and redirecting to it after
> submitting the data, we ensure (for most browsers) that browser
> history contains only one entry of our logical page. Which is exactly
> what a user expects.

It's that "for most browsers" part that bugs me... If you code to
standards, in theory at least, things work across all browsers (of a
reasonable vintage anyway)... even if we agree that its better to not have
the 6 browser history items, why should I put something in place to defeat
it that isn't even entirely cross-browser?  That seems to me to be
exacerbating an already bad situation.

> Right, clients don't know the details of tecnhology. We as developers
> should offer them the best we can do (in reasonable time, of course).
> On the other hand, do your clients really care about what happens when
> a user clicks Refresh button? I would say, they ask for certain pages
> to be bookmarkable. And oh, make it in blue, not in yellow ;)

Perhaps... but are they going to be happy when you tell them it might not
work in browser A and B but is OK in C and D?

Frank

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



Re: SSL with struts

2005-07-25 Thread Laurie Harper

mickey wrote:

Hi,
When using struts instead of recieving the page, that I've defined in 
struts-config.xml, I'm getting the page, that in forward part for this 
page. Do you have any idea what could be a problem?


What URL are you requesting from your browser? What does the associated 
action mapping in struts-config look like?


L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread Michael Jouravlev
On 7/25/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> I think the problem is rather that none of the dbs scales.
> To scale you need something in front of db in the business layer
> (middleware),
> so it's no difference whether you use ibatis or sql. Could be nasty with
> hibernate though,
> at least you need to turn off the lazy loading...
> 
> leon

I thought that database clusters exist before J2EE clusters ;) And I
believe that former are more robust than latter too.

Michael.

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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread Leon Rosenberg
I think the problem is rather that none of the dbs scales. 
To scale you need something in front of db in the business layer
(middleware),
so it's no difference whether you use ibatis or sql. Could be nasty with
hibernate though, 
at least you need to turn off the lazy loading...

leon
> 
> 
> On 7/25/05, Adam Hardy <[EMAIL PROTECTED]> wrote:

> > Is there any truth to the urban myth that iBatis doesn't scale?



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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread Leon Rosenberg
I think the problem is rather that none of the dbs scales. 
To scale you need something in front of db in the business layer
(middleware),
so it's no difference whether you use ibatis or sql. Could be nasty with
hibernate though, 
at least you need to turn off the lazy loading...

leon
> 
> 
> On 7/25/05, Adam Hardy <[EMAIL PROTECTED]> wrote:

> > Is there any truth to the urban myth that iBatis doesn't scale?



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



Re: How to read ResourceBundle

2005-07-25 Thread Laurie Harper

See the Javadoc for Action. To get the resource bundle from your action:

http://struts.apache.org/api/org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest)

You then have various options for retrieving specific messages:

http://struts.apache.org/api/org/apache/struts/util/MessageResources.html

L.

Ashutosh Satyam wrote:


Hi,
 In my application I want to set the error key based on whether 
the error key is present in resource bundle. The error key is 
generated in the system and the top most layer 'Action class' is 
supposed to set the keys based on the error key availability.


- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Sample/Pseudo code demonstrating what I exactly tend to do.


String key = null;
String[] param = null;

ResourceBundle bundle =  getBudle();
if("a.b.c.d".isPresent(bundle))
key = "a.b.c.d";
param = new String[2]
param[0]="s1";
param[1]="s2;
elseif("a.b.c."isPresent(bundle))
  key = "a.b.c";
elseif("a.b".isPresent(bundle))
  key="a.b";
elseif("a".isPresent(bundle))
  key = "a"
else
  key = "default.errorkey";

ActionErrors errors = new ActionErrors();
If(param != null)
 errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError(key,params));
else
 errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError(key,params));

saveErrors(req,errors);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Is there a handle available through Struts framework to read Resource Bundle 
so that I can look whether a particular key is present or not and accordingly 
construct ActionError.


Any pointers on this will be appreciated.

Thansk & Regards,
Ashutosh



--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Michael Jouravlev
On 7/25/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> > Having same address is important to prevent browser history from
> > growing, thus effectively disabling Back button. This makes
> > application more robust and user experience closer to desktop
> > application.
> 
> In my experience, there are two distinct expectations a client can have...
> one is that the application be very much like a desktop app, the other is
> that it be very much like a web app.  People DO, amazingly, understand the
> fundamental difference.
> 
> In the former case, I have always solved the problem by having the app
> exist in its own chromeless window.  I provide full navigation
> capabilities within the app, and the users understand that if they try and
> defeat this by using keyboard shortcuts or extra mouse buttons or the
> like, the app is not guaranteed to not break.
> 
> THIS is in fact closer to a desktop app, and if that's the goal I suggest
> this rather than some sort of hybrid approach.
> 
> In the the later case, users will absolutely expect the history to work as
> it always does, and an app that defeats that is seen as broken.

Ok, I will use the same use case I used during last weeks :) a login
form. Say, you have a welcome page on a website, which directs a user
to a login page. How many pages do you have? I hope your answer is
two. So we have two pages and we can return from a login page to
welcome page using Back, and then to go again to login page using
Forward. I think it is logical, that we need to click Back *only once*
to return from login page to welcome page.

Now a user tries to login. He makes several attempts, say five. It did
not work, and a login page is redisplayed with error (is not this the
same login page, logically?) The user  wants to return to welcome
page. How many times is he supposed to click Back button? In most
applications, six times. Why? because browser recorded each login
attempt as a separate resource location.

Therefore, a user actually *expects* to click Back only once to return
back, because login page is a second page. Instead, he is *forced* to
click six times. Do you really think that clicking Back six times is
logical and expected by a user? I do not thik so.

Having one address for login page, and redirecting to it after
submitting the data, we ensure (for most browsers) that browser
history contains only one entry of our logical page. Which is exactly
what a user expects.

> I have thought of it, like I said.  As for what I believe, it doesn't
> matter... it's what the CLIENT believes.  I can guide them and direct
> them, but ultimately they write the requirements.  I've been fortunate to
> be involved in analysis and design from inception in most of my projects,
> so I can make sure they are getting things right.  That's not always the
> case.

Right, clients don't know the details of tecnhology. We as developers
should offer them the best we can do (in reasonable time, of course).
On the other hand, do your clients really care about what happens when
a user clicks Refresh button? I would say, they ask for certain pages
to be bookmarkable. And oh, make it in blue, not in yellow ;)

Michael.

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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread netsql
I used iBatis 2 w/ 7000 concurent users and subsecond response time 
(each users requested data from a page that had many tiles, 1up.com)


It's much faster than others becuase of a simple row based cache.

I am one of few SQL instructors certified to teach P&T, I would argue 
it's by far the most scaleable. However... that does not abosolve you 
from stress testing your DAO.



Larry Meadors wrote:
Not that I have seen. 


I have used it on a project with 800GB of data + 40-50 concurrent users.

Vic will probably chime in on this thread as well...

Larry




Is there any truth to the urban myth that iBatis doesn't scale?



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








--

.V

People are conversing... without posting their email or filling up their
mail box.
roomity.com 

No sign up to read and search.


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



Re: DB Connection

2005-07-25 Thread Laurie Harper

Stéphane Zuckerman wrote:

Senthilrajan VS a écrit :

Thanks for your response. Can u please tell me how can I close the
connection if the user close the window directly because I am not 
maintain

any session in the window


These are two unrelated events : you want a client-side event to create 
a server-side event. I don't know enough JavaScript to help you an 
"onClose" event (I don't even know if that exists). You'd better use a 
link to make the session close, and if you really don't want to have a 
session to stay opened too long, just shrink its timeout to a few 
seconds. :-)


You may not be able easily to trigger a server-side session expiry event on 
window close, but the session will still expire and that *does* generate a 
server-side event.


Set up a session listener in web.xml and have your listener do the session 
clean-up, including any DB connections you have stored in your session.


Note: personally, I'd avoid associating a DB connection with each session 
like this, since it will limit how far the application can scale. The 
number of users it can support will be limited by the number of database 
connections you can cope with. Connection pools are designed to allow 
connections to be reused by different requests/sessions/users inexpensively 
precisely to avoid this kind of problem.


L.
--
Laurie, Open Source advocate, Java geek and novice blogger:
http://www.holoweb.net/laurie


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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Frank W. Zammetti
On Mon, July 25, 2005 2:32 pm, Michael Jouravlev said:
> DispatchAction allows you to have one mapping for a related set of
> operations. Therefore, you can call different operations for one
> object using the same web address, which is impossible using separate
> actions unless you use filter or something like mod_rewrite.

I understand that, always have.  Even if I didn't you've been telling us
all this for weeks, so I'd certainly understand it now :)

> Having same address is important to prevent browser history from
> growing, thus effectively disabling Back button. This makes
> application more robust and user experience closer to desktop
> application.

In my experience, there are two distinct expectations a client can have...
one is that the application be very much like a desktop app, the other is
that it be very much like a web app.  People DO, amazingly, understand the
fundamental difference.

In the former case, I have always solved the problem by having the app
exist in its own chromeless window.  I provide full navigation
capabilities within the app, and the users understand that if they try and
defeat this by using keyboard shortcuts or extra mouse buttons or the
like, the app is not guaranteed to not break.

THIS is in fact closer to a desktop app, and if that's the goal I suggest
this rather than some sort of hybrid approach.

In the the later case, users will absolutely expect the history to work as
it always does, and an app that defeats that is seen as broken.

> You just might have not thought about that. Or, conversely, you
> stronlgly believe that each page change must be recorded in browser
> history, even if it is a series of login attempts, just because
> "browsers are supposed to do so" ;)

I have thought of it, like I said.  As for what I believe, it doesn't
matter... it's what the CLIENT believes.  I can guide them and direct
them, but ultimately they write the requirements.  I've been fortunate to
be involved in analysis and design from inception in most of my projects,
so I can make sure they are getting things right.  That's not always the
case.



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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread Dave Newton

Larry Meadors wrote:


I have used it on a project with 800GB of data + 40-50 concurrent users.
 

I wasn't directly involved in the project, but coworkers used it for 
less data (100G maybe?) but substantially more concurrent users (100-200 
or so).


Dave



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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread Larry Meadors
Not that I have seen. 

I have used it on a project with 800GB of data + 40-50 concurrent users.

Vic will probably chime in on this thread as well...

Larry


On 7/25/05, Adam Hardy <[EMAIL PROTECTED]> wrote:
> 
> Ted Husted on 22/07/05 18:12, wrote:
> >
> > The truth is that iBATIS is very easy to use, and there isn't much to
> > learn that you don't already know. Basically, iBATIS lets you put a
> > wrapper around SQL statements and use disconnected POJO objects for
> > input and output. The user guide covers all the essentials, and the
> > mailing list and wiki will help out with the rest.
> 
> Is there any truth to the urban myth that iBatis doesn't scale?
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>


Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Michael Jouravlev
On 7/25/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> I actually do not use any form of DispatchAction most of the time... very
> rarely will I use anything along those lines.  I find it to break the idea
> of separating responsibilities.  I prefer to see a well-named Action for
> each actual action that can be invoked from a page.  Whatever the
> relationship is, I prefer this.  I have some Actions that aren't tied to a
> particular page at all, some that are very much page-specific, etc.  Even
> when they are only a few lines of code and bloat is not an issue if they
> are all in the same class, I find it better architecturally for them to be
> separate.  Many people feel differently of course, but that's my
> perspective on it.

DispatchAction allows you to have one mapping for a related set of
operations. Therefore, you can call different operations for one
object using the same web address, which is impossible using separate
actions unless you use filter or something like mod_rewrite.

Having same address is important to prevent browser history from
growing, thus effectively disabling Back button. This makes
application more robust and user experience closer to desktop
application.

You just might have not thought about that. Or, conversely, you
stronlgly believe that each page change must be recorded in browser
history, even if it is a series of login attempts, just because
"browsers are supposed to do so" ;)

Michael.

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



Re: [OT] Hibernate vs. iBatis vs. POJO

2005-07-25 Thread Adam Hardy

Ted Husted on 22/07/05 18:12, wrote:


The truth is that  iBATIS is very easy to use, and there isn't much to
learn that you don't already know. Basically, iBATIS lets you put a
wrapper around SQL statements and use disconnected POJO objects for
input and output. The user guide covers all the essentials, and the
mailing list and wiki will help out with the rest.


Is there any truth to the urban myth that iBatis doesn't scale?



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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Frank W. Zammetti
On Mon, July 25, 2005 1:55 pm, Michael Jouravlev said:
> Well, I am not sure that Struts can pick up changes in property file,
> though I saw some "Reloadable properties" subproject in Struts
> Applications tree.

You can always force the issue... not a good idea, but it can be done. 
You are correct in general though, it's not something that you can do
out-of-the-box.

> On the other hand, I think that tying a button textual caption to a
> method name like LookupDispatchAction does, is a not right thing to
> do.

I agree.

> Separating events, handlers and captions seems logical for me. I got
> used to this when I was programming for Windows. Windows resources
> just have an ID, and anyone interested can catch a message from
> control with that ID. Button captions are not relevant at all, one can
> even change them right in compiled exe file.

Again, I agree.  These things should be separated as much as possible. 
All I was saying is that I perfer what binds them to not require me
changing code, and a map in a class still counts, even if it's not all
that extreme :)

> One more note. I am not sure that all config info should be
> externalized. It is much easier to have an action and a corresponding
> HTML/JSP page(s), than to tie them in a config file. That is, I prefer
> Action-page relationship as 1:M, not as M:1 or M:M. Maybe
> externalising such relationships works better for you, if you have M:1
> relationship. I am trying to imagine such a use case, and with using
> dispatching action, I cannot think of one.

I actually do not use any form of DispatchAction most of the time... very
rarely will I use anything along those lines.  I find it to break the idea
of separating responsibilities.  I prefer to see a well-named Action for
each actual action that can be invoked from a page.  Whatever the
relationship is, I prefer this.  I have some Actions that aren't tied to a
particular page at all, some that are very much page-specific, etc.  Even
when they are only a few lines of code and bloat is not an issue if they
are all in the same class, I find it better architecturally for them to be
separate.  Many people feel differently of course, but that's my
perspective on it.

> Anyway, there are as many opinions as there are people ;)

Absolutely :)

> Michael.

Frank

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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Michael Jouravlev
On 7/25/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> On Mon, July 25, 2005 1:11 pm, Michael Jouravlev said:
> > Having the map right in an action file is easier, faster and does not
> > tie you to a property file, does it?
> 
> Just wanted to stick my proboscis in on this particular point (I've been
> following along this whole discussion by the way)...
> 
> I view this sort of thing as configuration information, not unlike
> struts-config.  As such, it should I believe, be externalized.  So for me,
> I'd rather have something like this in a property file.
> 
> In the world of high availability web apps, you don't want to take the app
> down to change a map in a class when you could, in theory at least, change
> a config file and reload it on-the-fly, no deployment issues, no downtime,
> etc.  Where I work it takes a minimum of 48 hours to get a prod elevation
> done unless it's an emergency, and then it require about 10 signatures
> from senior management... if I had to tell them I needed to change an
> entry in a map in an Action, they'd kill me for having to take the app
> down for something like that.

Well, I am not sure that Struts can pick up changes in property file,
though I saw some "Reloadable properties" subproject in Struts
Applications tree.

On the other hand, I think that tying a button textual caption to a
method name like LookupDispatchAction does, is a not right thing to
do. You cannot change the caption at the runtime. I mean, you can, but
then you have to change a property file as well, and to reload
properties.

Having a map correlating request key to method name instead of
correlating a button value to method name allows to change button
caption at any time without the need to reload the properties.

Separating events, handlers and captions seems logical for me. I got
used to this when I was programming for Windows. Windows resources
just have an ID, and anyone interested can catch a message from
control with that ID. Button captions are not relevant at all, one can
even change them right in compiled exe file.

One more note. I am not sure that all config info should be
externalized. It is much easier to have an action and a corresponding
HTML/JSP page(s), than to tie them in a config file. That is, I prefer
Action-page relationship as 1:M, not as M:1 or M:M. Maybe
externalising such relationships works better for you, if you have M:1
relationship. I am trying to imagine such a use case, and with using
dispatching action, I cannot think of one.

Anyway, there are as many opinions as there are people ;)

Michael.

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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Frank W. Zammetti
On Mon, July 25, 2005 1:11 pm, Michael Jouravlev said:
> Having the map right in an action file is easier, faster and does not
> tie you to a property file, does it?

Just wanted to stick my proboscis in on this particular point (I've been
following along this whole discussion by the way)...

I view this sort of thing as configuration information, not unlike
struts-config.  As such, it should I believe, be externalized.  So for me,
I'd rather have something like this in a property file.

In the world of high availability web apps, you don't want to take the app
down to change a map in a class when you could, in theory at least, change
a config file and reload it on-the-fly, no deployment issues, no downtime,
etc.  Where I work it takes a minimum of 48 hours to get a prod elevation
done unless it's an emergency, and then it require about 10 signatures
from senior management... if I had to tell them I needed to change an
entry in a map in an Action, they'd kill me for having to take the app
down for something like that.

Frank

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



Re: [OT] saving stats from session when session destroyed

2005-07-25 Thread Wendy Smoak
From: "Daniel Perry" <[EMAIL PROTECTED]>

> I cant see an obvious way to find out when sessions are destroyed.

You can register an HttpSessionListener and be notified of 'sessionCreated'
and 'sessionDestroyed' events:

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpSessionListener.html

-- 
Wendy Smoak


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



ClassCastException

2005-07-25 Thread Nick Heudecker
I'm using Tomcat 5.5, JDK 1.5, Struts 1.2.7 and Tiles.  I'm getting
the following exception when I navigate to a Tiles page, I'm getting
the following:

java.lang.ClassCastException: org.apache.struts.taglib.tiles.UseAttributeTei
at 
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:420)
at 
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:248)
at 
org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:162)
at 
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:418)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1543)
at org.apache.jasper.compiler.Parser.parse(Parser.java:126)

Anybody got an idea about what's causing this and a potential
fix/workaround?  Thanks.

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



RE: Technique for undetermined time of processing - progress bar

2005-07-25 Thread Wiebe de Jong
Yes, that is what I did when I implemented it.

Wiebe

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 25, 2005 9:52 AM
To: 'Struts Users Mailing List'
Subject: RE: Technique for undetermined time of processing - progress bar

Thanks for the tip.  That one actually is using javascript to refresh the
page, but you could just as easily do a meta tag to refresh the page as
well.

-David

> -Original Message-
> From: Wiebe de Jong [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 25, 2005 10:35 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Technique for undetermined time of processing - progress bar
> 
> Here is a graphical progress bar that doesn't use AJAX or JavaScript.
> 
> http://www.onjava.com/lpt/a/3886
> 
> Wiebe
> 
> -Original Message-
> From: David Erickson [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 25, 2005 7:26 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Technique for undetermined time of processing - progress bar
> 
> Ya I think the ajax thing is a great idea for the main work.. but on the
> offchance someone doesn't have javascript enabled ill have to fall back to
> a
> not as graphically nice implementation.
> 
> 
> 
> -David
> 
> 
> 
>   _
> 
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 25, 2005 6:14 AM
> To: Struts Users Mailing List
> Cc: 'Struts Users Mailing List'
> Subject: RE: Technique for undetermined time of processing - progress bar
> 
> 
> 
> Unfortunately, any AJAX implementation will require JavaScript. You can
> replace this with a standard JSP implementation, but you will have a lot
> of
> "Flicker" as your page updates. You will also have to keep all information
> that is displayed on your page in the session or request which can chew up
> your bandwidth on heavly used sites.
> 
> Inactive hide details for "David Erickson" <[EMAIL PROTECTED]>"David
> Erickson" <[EMAIL PROTECTED]>
> 
> 
> 
> 
> "David Erickson" <[EMAIL PROTECTED]>
> 
> 07/23/2005 09:52 AM
> 
> 
> Please respond to
> "Struts Users Mailing List" 
> 
> 
> 
> 
> To
> 
> 
> "'Struts Users Mailing List'" 
> 
> 
> 
> 
> cc
> 
> 
> 
> 
> 
> 
> Subject
> 
> 
> RE: Technique for undetermined time of processing - progress bar
> 
> 
> 
> 
> 
> 
> 
> 
> 
> What If the end user has javascript disabled?  Does DWR handle that
> cleanly
> or are you out of luck?
> 
> 
> 
> -David
> 
> 
> 
>  _
> 
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 22, 2005 1:55 PM
> To: Struts Users Mailing List
> Cc: 'Struts Users Mailing List'
> Subject: Re: Technique for undetermined time of processing - progress bar
> 
> 
> 
> I use AJAX to kick off the process. For this case You can send an AJAX
> request to get the time, once recieved display a div that will contain the
> "progress bar" and submit a second request to run the actual process. On
> completion, you can forward the page to the next url.
> 
> If you use DWR and can just display an anamated gif or flash movie, then
> you
> can use the built in pre and post process hooks. The preprocess would
> display the image and the post would hide it. on completion of the process
> have the page submit to the next screen.
> 
> Inactive hide details for "David Erickson" <[EMAIL PROTECTED]>"David
> Erickson" <[EMAIL PROTECTED]>
> 
> 
> 
> 
> "David Erickson" <[EMAIL PROTECTED]>
> 
> 07/22/2005 02:41 PM
> 
> 
> Please respond to
> "Struts Users Mailing List" 
> 
> 
> 
> 
> To
> 
> 
> "'Struts Users Mailing List'" 
> 
> 
> 
> 
> cc
> 
> 
> 
> 
> 
> 
> Subject
> 
> 
> Technique for undetermined time of processing - progress bar
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Sorry for the vague subject.  I've got a situation where I need to do some
> processing before moving a user to a specific page.  The processing could
> be
> very fast or very long.  I'd like to have some kind of a progress bar type
> meter than can show how much time is left.  I will know for sure the exact
> time it will take to process, and I can retrieve that at the beginning of
> the processing.  When processing is done I want to go to a different url.
> Has anyone done anything like this before, and if so what were the best
> ways
> you found of accomplishing this?
> 
> Thanks,
> David
> 
> 
> -
> 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: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Michael Jouravlev
On 7/25/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> starki78 wrote the following on 7/25/2005 2:04 AM:
> > Hi, I've tested both types of actions but I really
> > cannot say which action is better and I don't have the slightest
> > feeling when which action to take.
> 
> Without trying to open up a whole other can of worms since there have
> been a bunch of recent threads concerning the dispatch/lookup concept, I
> would stay away from the LookupDispatchAction. There are other variants
> out there MappingDispatchAction, SimpleDispatchAction, and now
> SelectAction. Personally, I've just stuck with DispatchAction and like
> it. The other new flavors mentioned have some merit, but since you asked
> about LookupDispatchAction I'll reiterate again why I hate it...
> 
> 1) Figuring out what method gets called when you press a button is way
> too annoying. You have to define a map in your Action class which
> represents the names of the buttons, but if you use your
> ApplicationResources file to have the names display on you page, you
> know have to do this translation to figure out what gets called... you
> need to look in the app resources file and then look in the map and find
> that key represented by the value in app resources and then you can see
> the method being called.

Having the map right in an action file is easier, faster and does not
tie you to a property file, does it?

> 2) It makes it difficult for your button to do perform more than one
> type of action. For example, maybe you have a generic button used on a
> from that can be used for a couple different actions methods. If you
> call it "submit" it's only going to what 'submit' equates to in the
> Lookup map in your Action. If you use a Dispatch Action you can have
> your button do more than one type of action method since it's not keyed
> off the button name.

I don't see how it is different. In the end of the day it is just a
request parameter, and you can do whatever you want with it.
DispatchAction uses "method=methodName" to obtain method name.
LookupDispatchAction uses a map, but you still can change the request
parameter. Also, indirection gives you some sort of protection,
because users do not know about actual method names, and they cannot
call any public method of action class on their choice. I think having
an indirect call is a little more robust.

> 3) There are issues when you have more than one submit button on a page
> and the user presses enter on their keyboard. I forgot the exact
> problems but it was a real pain. In IE it acts one way, in other
> browsers a different way. I just remember cases where the button name
> being passed wasn't what was expected.

I was testing default submit yesterday. I have two sample apps, both
use form, text field and some buttons. Firefox always submits the
first button, defined in the form. IE submits the first button in one
case, and does not submit any buttons in other case. I don't know why.
Therefore I decided to use a hidden field which contains default event
in case no buttons are submitted.

Michael.

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



RE: [OT] saving stats from session when session destroyed

2005-07-25 Thread Daniel Perry
Now I knew there was something like that!  Turns out I was looking at
servlet 2.2 specs and that only had HttpSessionBindingListener!!! Duh!

Thanks

Daniel.


> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 25 July 2005 17:59
> To: Struts Users Mailing List
> Cc: Struts User List
> Subject: Re: [OT] saving stats from session when session destroyed
>
>
> SessionListener is what you want.
>
> Here's an example from one of my apps (condensed for space)... it is used
> to delete a temporary PDF that may have been generated for the user when
> they log off:
>
> import company.app.User;
> import javax.servlet.http.HttpSession;
> import javax.servlet.http.HttpSessionEvent;
> import javax.servlet.http.HttpSessionListener;
> public class MySessionListener implements HttpSessionListener {
>   public synchronized void sessionCreated(HttpSessionEvent se) {
>   }
>   public synchronized void sessionDestroyed(HttpSessionEvent se) {
> HttpSession sess = se.getSession();
> User user = (User)sess.getAttribute("user");
> String userID = user.getUserID();
> AppHelpers.deletePDF(userID);
>   }
> }
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Mon, July 25, 2005 12:47 pm, Daniel Perry said:
> > I have an app where i need to record key user stats, which are
> updated by
> > certain struts actions.  The problem is that i want to keep these in the
> > session, and then only save them to the database when the session is
> > either
> > invalidated through logout, or when it times out and is removed by the
> > server.  It doesnt matter if some stats are lost through crashes, server
> > restarts, etc.
> >
> > I cant see an obvious way to find out when sessions are destroyed.
> >
> > Would it be possible to have a class called stats, which is put into the
> > session, and override the finalize method, so that this writes to the
> > database the calls super.finalize?  Would this work?
> >
> > If i make this serializable, what happens if the server decides
> to remove
> > this session after writing to disk - does it just delete the
> file, or does
> > it reserialize it and call finalize?
> >
> > Thanks,
> >
> > Daniel.
> >
> >
> > -
> > 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: [OT] saving stats from session when session destroyed

2005-07-25 Thread Dave Newton

Daniel Perry wrote:


Would it be possible to have a class called stats, which is put into the
session, and override the finalize method, so that this writes to the
database the calls super.finalize?  Would this work?
 

Just as a followup to Frank's correct answer, _never_ count on a 
finalize method; they are not guaranteed to be run, and most certainly 
not guaranteed to be run in a timely manner. They're definitely not like 
a C++ destructor and have limited usefulness.


Dave



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



Re: [OT] saving stats from session when session destroyed

2005-07-25 Thread Frank W. Zammetti
I guess it *might* be helpful to tell you you need an entry in web.xml for
this...


  company.app.MySessionListener 


Yeah, that might help ;)

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Mon, July 25, 2005 12:58 pm, Frank W. Zammetti said:
> SessionListener is what you want.
>
> Here's an example from one of my apps (condensed for space)... it is used
> to delete a temporary PDF that may have been generated for the user when
> they log off:
>
> import company.app.User;
> import javax.servlet.http.HttpSession;
> import javax.servlet.http.HttpSessionEvent;
> import javax.servlet.http.HttpSessionListener;
> public class MySessionListener implements HttpSessionListener {
>   public synchronized void sessionCreated(HttpSessionEvent se) {
>   }
>   public synchronized void sessionDestroyed(HttpSessionEvent se) {
> HttpSession sess = se.getSession();
> User user = (User)sess.getAttribute("user");
> String userID = user.getUserID();
> AppHelpers.deletePDF(userID);
>   }
> }
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
>
> On Mon, July 25, 2005 12:47 pm, Daniel Perry said:
>> I have an app where i need to record key user stats, which are updated
>> by
>> certain struts actions.  The problem is that i want to keep these in the
>> session, and then only save them to the database when the session is
>> either
>> invalidated through logout, or when it times out and is removed by the
>> server.  It doesnt matter if some stats are lost through crashes, server
>> restarts, etc.
>>
>> I cant see an obvious way to find out when sessions are destroyed.
>>
>> Would it be possible to have a class called stats, which is put into the
>> session, and override the finalize method, so that this writes to the
>> database the calls super.finalize?  Would this work?
>>
>> If i make this serializable, what happens if the server decides to
>> remove
>> this session after writing to disk - does it just delete the file, or
>> does
>> it reserialize it and call finalize?
>>
>> Thanks,
>>
>> Daniel.
>>
>>
>> -
>> 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: [OT] saving stats from session when session destroyed

2005-07-25 Thread Frank W. Zammetti
SessionListener is what you want.

Here's an example from one of my apps (condensed for space)... it is used
to delete a temporary PDF that may have been generated for the user when
they log off:

import company.app.User;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
public class MySessionListener implements HttpSessionListener {
  public synchronized void sessionCreated(HttpSessionEvent se) {
  }
  public synchronized void sessionDestroyed(HttpSessionEvent se) {
HttpSession sess = se.getSession();
User user = (User)sess.getAttribute("user");
String userID = user.getUserID();
AppHelpers.deletePDF(userID);
  }
}

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Mon, July 25, 2005 12:47 pm, Daniel Perry said:
> I have an app where i need to record key user stats, which are updated by
> certain struts actions.  The problem is that i want to keep these in the
> session, and then only save them to the database when the session is
> either
> invalidated through logout, or when it times out and is removed by the
> server.  It doesnt matter if some stats are lost through crashes, server
> restarts, etc.
>
> I cant see an obvious way to find out when sessions are destroyed.
>
> Would it be possible to have a class called stats, which is put into the
> session, and override the finalize method, so that this writes to the
> database the calls super.finalize?  Would this work?
>
> If i make this serializable, what happens if the server decides to remove
> this session after writing to disk - does it just delete the file, or does
> it reserialize it and call finalize?
>
> Thanks,
>
> Daniel.
>
>
> -
> 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] saving stats from session when session destroyed

2005-07-25 Thread Daniel Perry
I have an app where i need to record key user stats, which are updated by
certain struts actions.  The problem is that i want to keep these in the
session, and then only save them to the database when the session is either
invalidated through logout, or when it times out and is removed by the
server.  It doesnt matter if some stats are lost through crashes, server
restarts, etc.

I cant see an obvious way to find out when sessions are destroyed.

Would it be possible to have a class called stats, which is put into the
session, and override the finalize method, so that this writes to the
database the calls super.finalize?  Would this work?

If i make this serializable, what happens if the server decides to remove
this session after writing to disk - does it just delete the file, or does
it reserialize it and call finalize?

Thanks,

Daniel.


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



RE: Technique for undetermined time of processing - progress bar

2005-07-25 Thread David Erickson
Thanks for the tip.  That one actually is using javascript to refresh the
page, but you could just as easily do a meta tag to refresh the page as
well.

-David

> -Original Message-
> From: Wiebe de Jong [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 25, 2005 10:35 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Technique for undetermined time of processing - progress bar
> 
> Here is a graphical progress bar that doesn't use AJAX or JavaScript.
> 
> http://www.onjava.com/lpt/a/3886
> 
> Wiebe
> 
> -Original Message-
> From: David Erickson [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 25, 2005 7:26 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Technique for undetermined time of processing - progress bar
> 
> Ya I think the ajax thing is a great idea for the main work.. but on the
> offchance someone doesn't have javascript enabled ill have to fall back to
> a
> not as graphically nice implementation.
> 
> 
> 
> -David
> 
> 
> 
>   _
> 
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Monday, July 25, 2005 6:14 AM
> To: Struts Users Mailing List
> Cc: 'Struts Users Mailing List'
> Subject: RE: Technique for undetermined time of processing - progress bar
> 
> 
> 
> Unfortunately, any AJAX implementation will require JavaScript. You can
> replace this with a standard JSP implementation, but you will have a lot
> of
> "Flicker" as your page updates. You will also have to keep all information
> that is displayed on your page in the session or request which can chew up
> your bandwidth on heavly used sites.
> 
> Inactive hide details for "David Erickson" <[EMAIL PROTECTED]>"David
> Erickson" <[EMAIL PROTECTED]>
> 
> 
> 
> 
> "David Erickson" <[EMAIL PROTECTED]>
> 
> 07/23/2005 09:52 AM
> 
> 
> Please respond to
> "Struts Users Mailing List" 
> 
> 
> 
> 
> To
> 
> 
> "'Struts Users Mailing List'" 
> 
> 
> 
> 
> cc
> 
> 
> 
> 
> 
> 
> Subject
> 
> 
> RE: Technique for undetermined time of processing - progress bar
> 
> 
> 
> 
> 
> 
> 
> 
> 
> What If the end user has javascript disabled?  Does DWR handle that
> cleanly
> or are you out of luck?
> 
> 
> 
> -David
> 
> 
> 
>  _
> 
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 22, 2005 1:55 PM
> To: Struts Users Mailing List
> Cc: 'Struts Users Mailing List'
> Subject: Re: Technique for undetermined time of processing - progress bar
> 
> 
> 
> I use AJAX to kick off the process. For this case You can send an AJAX
> request to get the time, once recieved display a div that will contain the
> "progress bar" and submit a second request to run the actual process. On
> completion, you can forward the page to the next url.
> 
> If you use DWR and can just display an anamated gif or flash movie, then
> you
> can use the built in pre and post process hooks. The preprocess would
> display the image and the post would hide it. on completion of the process
> have the page submit to the next screen.
> 
> Inactive hide details for "David Erickson" <[EMAIL PROTECTED]>"David
> Erickson" <[EMAIL PROTECTED]>
> 
> 
> 
> 
> "David Erickson" <[EMAIL PROTECTED]>
> 
> 07/22/2005 02:41 PM
> 
> 
> Please respond to
> "Struts Users Mailing List" 
> 
> 
> 
> 
> To
> 
> 
> "'Struts Users Mailing List'" 
> 
> 
> 
> 
> cc
> 
> 
> 
> 
> 
> 
> Subject
> 
> 
> Technique for undetermined time of processing - progress bar
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Sorry for the vague subject.  I've got a situation where I need to do some
> processing before moving a user to a specific page.  The processing could
> be
> very fast or very long.  I'd like to have some kind of a progress bar type
> meter than can show how much time is left.  I will know for sure the exact
> time it will take to process, and I can retrieve that at the beginning of
> the processing.  When processing is done I want to go to a different url.
> Has anyone done anything like this before, and if so what were the best
> ways
> you found of accomplishing this?
> 
> Thanks,
> David
> 
> 
> -
> 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: [OT] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Okundaye, Derrick

Your arguments are extending beyond the cause of open source struts
development and verging into the personal.  Please take it elsewhere.


-Original Message-
From: Dakota Jack [mailto:[EMAIL PROTECTED] 
Sent: 25 July 2005 17:16
To: Struts Users Mailing List
Subject: Re: [OT] Re: SelectAction - an improved DispatchAction

There is no such thing as an "ad hominem attack" dear Dave.  There are
ad hominen arguments.  Those are argument which attempt to draw a
conclusion contrary to something someone adverts by challenging their
character.  I never have seen one of those on this list. Oh, wait,
your response was one.  LOL  And, if there were such a thing as an ad
hominem attack, you would be rather immune anyway, right?  LOL 
Anyway, at least this submission by you contained some bit of fire and
a little light too.  Good show!  Quite a surprise, really.  Thanks.

On 7/25/05, Dave Newton <[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> 
> >Then there is Dave, dear sweet, but
> >
> >
> *awww*
> 
> >ever so odd, Dave, closer to Fig than Isaac.
> >
> That much might be true; we have a fairly detailed family tree back to
> the very late 1500s and alas, Isaac does not seem to be on it.
> 
> I am definitely odd, and I wake up happy about that nearly every day.
> 
> >If the topic of me and
> >McGrady was so tiresome, why do you four continually divert bottom
> >water errors about code analysis to this tripe?  What is tiresome,
> >Dave, and especially so for you, is the code in fact.
> >
> >
> You're right, code _is_ tiresome to me. (XML configuration files
> positively knock me out.) The "code analysis" comment above must be
> directed to the "other three," because I have not been involved in
> looking at the "competing" code in question--code _attribution_ is
even
> MORE tiresome, especially when it's an "I wrote/he wrote" discussion,
> where it's not a particularly interesting, difficult, or unique
problem
> being solved.
> 
> >Third, those who just sit by and
> >kiss the-powers-that-be's butts, like you Dave, are even more
tiresome
> >than those who hide the dull edge on their tools by talking about the
> >weather in Poughkeepsie.
> >
> >
> Whose butt am I kissing?! Struts-powers-that-be?! I code most of my
> webapps in Lisp and Ruby. As far as I know none of the Struts folks
work
> much in Lisp or Ruby, although I could be mistaken. Butt-kicking, on
> occasion (all that silat and kali has to be useful someday, I just
know
> it!), but rarely butt-kissing. And I have no dull (or rusty, or
pitted)
> edges--I'm quite scrupulous about my edged weapons.
> 
> But I always enjoy your use of ad hominem attacks rather than saying
> useful things--at least you stick to what you're good at.
> 
> Dave "I wanna play too!"
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its
back."
~Dakota Jack~

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



This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.

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



RE: Technique for undetermined time of processing - progress bar

2005-07-25 Thread Wiebe de Jong
Here is a graphical progress bar that doesn't use AJAX or JavaScript.

http://www.onjava.com/lpt/a/3886 

Wiebe

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 25, 2005 7:26 AM
To: 'Struts Users Mailing List'
Subject: RE: Technique for undetermined time of processing - progress bar

Ya I think the ajax thing is a great idea for the main work.. but on the
offchance someone doesn't have javascript enabled ill have to fall back to a
not as graphically nice implementation.

 

-David

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, July 25, 2005 6:14 AM
To: Struts Users Mailing List
Cc: 'Struts Users Mailing List'
Subject: RE: Technique for undetermined time of processing - progress bar

 

Unfortunately, any AJAX implementation will require JavaScript. You can
replace this with a standard JSP implementation, but you will have a lot of
"Flicker" as your page updates. You will also have to keep all information
that is displayed on your page in the session or request which can chew up
your bandwidth on heavly used sites.

Inactive hide details for "David Erickson" <[EMAIL PROTECTED]>"David
Erickson" <[EMAIL PROTECTED]>




"David Erickson" <[EMAIL PROTECTED]> 

07/23/2005 09:52 AM 


Please respond to
"Struts Users Mailing List" 




To


"'Struts Users Mailing List'" 




cc






Subject


RE: Technique for undetermined time of processing - progress bar

 







What If the end user has javascript disabled?  Does DWR handle that cleanly
or are you out of luck?



-David



 _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Friday, July 22, 2005 1:55 PM
To: Struts Users Mailing List
Cc: 'Struts Users Mailing List'
Subject: Re: Technique for undetermined time of processing - progress bar



I use AJAX to kick off the process. For this case You can send an AJAX
request to get the time, once recieved display a div that will contain the
"progress bar" and submit a second request to run the actual process. On
completion, you can forward the page to the next url.

If you use DWR and can just display an anamated gif or flash movie, then you
can use the built in pre and post process hooks. The preprocess would
display the image and the post would hide it. on completion of the process
have the page submit to the next screen.

Inactive hide details for "David Erickson" <[EMAIL PROTECTED]>"David
Erickson" <[EMAIL PROTECTED]>




"David Erickson" <[EMAIL PROTECTED]> 

07/22/2005 02:41 PM 


Please respond to
"Struts Users Mailing List" 




To


"'Struts Users Mailing List'" 




cc






Subject


Technique for undetermined time of processing - progress bar









Sorry for the vague subject.  I've got a situation where I need to do some
processing before moving a user to a specific page.  The processing could be
very fast or very long.  I'd like to have some kind of a progress bar type
meter than can show how much time is left.  I will know for sure the exact
time it will take to process, and I can retrieve that at the beginning of
the processing.  When processing is done I want to go to a different url.
Has anyone done anything like this before, and if so what were the best ways
you found of accomplishing this?

Thanks,
David


-
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] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Dave Newton

Dakota Jack wrote:

I never have seen one of those on this list. 


*rotflmao*

Curious. I _knew_ you didn't read your own posts; they were a bit too 
non-sensical.


Are you SURE you're not just a poorly-written Markov chaining program?

your response was one.  LOL  


The irony is thick, huh?


And, if there were such a thing as an ad
hominem attack, you would be rather immune anyway, right?


Mos def, and thankful for it.

Dave "_I_ built the pyramids"



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



Re: [OT] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Dakota Jack
There is no such thing as an "ad hominem attack" dear Dave.  There are
ad hominen arguments.  Those are argument which attempt to draw a
conclusion contrary to something someone adverts by challenging their
character.  I never have seen one of those on this list. Oh, wait,
your response was one.  LOL  And, if there were such a thing as an ad
hominem attack, you would be rather immune anyway, right?  LOL 
Anyway, at least this submission by you contained some bit of fire and
a little light too.  Good show!  Quite a surprise, really.  Thanks.

On 7/25/05, Dave Newton <[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> 
> >Then there is Dave, dear sweet, but
> >
> >
> *awww*
> 
> >ever so odd, Dave, closer to Fig than Isaac.
> >
> That much might be true; we have a fairly detailed family tree back to
> the very late 1500s and alas, Isaac does not seem to be on it.
> 
> I am definitely odd, and I wake up happy about that nearly every day.
> 
> >If the topic of me and
> >McGrady was so tiresome, why do you four continually divert bottom
> >water errors about code analysis to this tripe?  What is tiresome,
> >Dave, and especially so for you, is the code in fact.
> >
> >
> You're right, code _is_ tiresome to me. (XML configuration files
> positively knock me out.) The "code analysis" comment above must be
> directed to the "other three," because I have not been involved in
> looking at the "competing" code in question--code _attribution_ is even
> MORE tiresome, especially when it's an "I wrote/he wrote" discussion,
> where it's not a particularly interesting, difficult, or unique problem
> being solved.
> 
> >Third, those who just sit by and
> >kiss the-powers-that-be's butts, like you Dave, are even more tiresome
> >than those who hide the dull edge on their tools by talking about the
> >weather in Poughkeepsie.
> >
> >
> Whose butt am I kissing?! Struts-powers-that-be?! I code most of my
> webapps in Lisp and Ruby. As far as I know none of the Struts folks work
> much in Lisp or Ruby, although I could be mistaken. Butt-kicking, on
> occasion (all that silat and kali has to be useful someday, I just know
> it!), but rarely butt-kissing. And I have no dull (or rusty, or pitted)
> edges--I'm quite scrupulous about my edged weapons.
> 
> But I always enjoy your use of ad hominem attacks rather than saying
> useful things--at least you stick to what you're good at.
> 
> Dave "I wanna play too!"
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



[OT] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Dave Newton

Dakota Jack wrote:


Then there is Dave, dear sweet, but
 


*awww*


ever so odd, Dave, closer to Fig than Isaac.

That much might be true; we have a fairly detailed family tree back to 
the very late 1500s and alas, Isaac does not seem to be on it.


I am definitely odd, and I wake up happy about that nearly every day.


If the topic of me and
McGrady was so tiresome, why do you four continually divert bottom
water errors about code analysis to this tripe?  What is tiresome,
Dave, and especially so for you, is the code in fact.
 

You're right, code _is_ tiresome to me. (XML configuration files 
positively knock me out.) The "code analysis" comment above must be 
directed to the "other three," because I have not been involved in 
looking at the "competing" code in question--code _attribution_ is even 
MORE tiresome, especially when it's an "I wrote/he wrote" discussion, 
where it's not a particularly interesting, difficult, or unique problem 
being solved.



Third, those who just sit by and
kiss the-powers-that-be's butts, like you Dave, are even more tiresome
than those who hide the dull edge on their tools by talking about the
weather in Poughkeepsie.
 

Whose butt am I kissing?! Struts-powers-that-be?! I code most of my 
webapps in Lisp and Ruby. As far as I know none of the Struts folks work 
much in Lisp or Ruby, although I could be mistaken. Butt-kicking, on 
occasion (all that silat and kali has to be useful someday, I just know 
it!), but rarely butt-kissing. And I have no dull (or rusty, or pitted) 
edges--I'm quite scrupulous about my edged weapons.


But I always enjoy your use of ad hominem attacks rather than saying 
useful things--at least you stick to what you're good at.


Dave "I wanna play too!"



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



[ANN] XMoon Petstore 1.2.0

2005-07-25 Thread Mario Neè

Struts 1.2.7, XMoon, Hibernate 3 and Jstl.

zip : http://prdownloads.sourceforge.net/xmoon/petstore.zip?download
live : http://www.demozone.org

--
Mario Nee'
Brescia Italy
[EMAIL PROTECTED]
http://www.xmoon.org


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



Re: [FRIDAY] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Michael Jouravlev
On 7/25/05, Dakota Jack <[EMAIL PROTECTED]> wrote:
> Why don't you do your own code and then submit that?
I did, but I acknowledge that using suffix with method name directly
in the parameter is easier than using prefix and a method map. But I
can return back to prefix, no big deal for me.

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



Re: LookupDispatchAction or DispatchAction?

2005-07-25 Thread Rick Reumann

starki78 wrote the following on 7/25/2005 2:04 AM:

Hi, I've tested both types of actions but I really
cannot say which action is better and I don't have the slightest
feeling when which action to take.


Without trying to open up a whole other can of worms since there have 
been a bunch of recent threads concerning the dispatch/lookup concept, I 
would stay away from the LookupDispatchAction. There are other variants 
out there MappingDispatchAction, SimpleDispatchAction, and now 
SelectAction. Personally, I've just stuck with DispatchAction and like 
it. The other new flavors mentioned have some merit, but since you asked 
about LookupDispatchAction I'll reiterate again why I hate it...


1) Figuring out what method gets called when you press a button is way 
too annoying. You have to define a map in your Action class which 
represents the names of the buttons, but if you use your 
ApplicationResources file to have the names display on you page, you 
know have to do this translation to figure out what gets called... you 
need to look in the app resources file and then look in the map and find 
that key represented by the value in app resources and then you can see 
the method being called.


2) It makes it difficult for your button to do perform more than one 
type of action. For example, maybe you have a generic button used on a 
from that can be used for a couple different actions methods. If you 
call it "submit" it's only going to what 'submit' equates to in the 
Lookup map in your Action. If you use a Dispatch Action you can have 
your button do more than one type of action method since it's not keyed 
off the button name.


3) There are issues when you have more than one submit button on a page 
and the user presses enter on their keyboard. I forgot the exact 
problems but it was a real pain. In IE it acts one way, in other 
browsers a different way. I just remember cases where the button name 
being passed wasn't what was expected.


I wrote that above quickly, so it might not make sense, but save 
yourself some headaches and just use the DispatchAction (unless you want 
to look at some of the variants out there other than 
LookupDispatchAction... I was just lazy and dispatch works for me:)



--
Rick

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



Re: Syntax

2005-07-25 Thread Martin Gainty

Herr Berg:

This from junlu (with regards to html:multibox property specification)
"The associated property in the form-bean is an array of type string, which 
holds a list of selected values after submitting the form"
In other words the property is defined as an 'array of strings' from your 
form


Viel Gluck,
Martin-

- Original Message - 
From: "Kjersti Berg" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" ; "ViJaY" 
<[EMAIL PROTECTED]>

Sent: Monday, July 25, 2005 9:46 AM
Subject: Re: Syntax


On 25/07/05, Vijay K Anand <[EMAIL PROTECTED]> wrote:

Hi

What is wrong in the below code ? Eclipse is making noise...but code
runs fine...
" />


Not sure, but this looks odd:
styleId="<%= "c"+(String)CoreID %>" />

How about styleId='<%= "c" + (String)CoreID %>' ?

Kjersti



Regards
Vijay

-
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: Technique for undetermined time of processing - progress bar

2005-07-25 Thread David Erickson
Ya I think the ajax thing is a great idea for the main work.. but on the
offchance someone doesn't have javascript enabled ill have to fall back to a
not as graphically nice implementation.

 

-David

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Monday, July 25, 2005 6:14 AM
To: Struts Users Mailing List
Cc: 'Struts Users Mailing List'
Subject: RE: Technique for undetermined time of processing - progress bar

 

Unfortunately, any AJAX implementation will require JavaScript. You can
replace this with a standard JSP implementation, but you will have a lot of
"Flicker" as your page updates. You will also have to keep all information
that is displayed on your page in the session or request which can chew up
your bandwidth on heavly used sites.

Inactive hide details for "David Erickson" <[EMAIL PROTECTED]>"David
Erickson" <[EMAIL PROTECTED]>




"David Erickson" <[EMAIL PROTECTED]> 

07/23/2005 09:52 AM 


Please respond to
"Struts Users Mailing List" 




To


"'Struts Users Mailing List'" 




cc






Subject


RE: Technique for undetermined time of processing - progress bar

 







What If the end user has javascript disabled?  Does DWR handle that cleanly
or are you out of luck?



-David



 _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: Friday, July 22, 2005 1:55 PM
To: Struts Users Mailing List
Cc: 'Struts Users Mailing List'
Subject: Re: Technique for undetermined time of processing - progress bar



I use AJAX to kick off the process. For this case You can send an AJAX
request to get the time, once recieved display a div that will contain the
"progress bar" and submit a second request to run the actual process. On
completion, you can forward the page to the next url.

If you use DWR and can just display an anamated gif or flash movie, then you
can use the built in pre and post process hooks. The preprocess would
display the image and the post would hide it. on completion of the process
have the page submit to the next screen.

Inactive hide details for "David Erickson" <[EMAIL PROTECTED]>"David
Erickson" <[EMAIL PROTECTED]>




"David Erickson" <[EMAIL PROTECTED]> 

07/22/2005 02:41 PM 


Please respond to
"Struts Users Mailing List" 




To


"'Struts Users Mailing List'" 




cc






Subject


Technique for undetermined time of processing - progress bar









Sorry for the vague subject.  I've got a situation where I need to do some
processing before moving a user to a specific page.  The processing could be
very fast or very long.  I'd like to have some kind of a progress bar type
meter than can show how much time is left.  I will know for sure the exact
time it will take to process, and I can retrieve that at the beginning of
the processing.  When processing is done I want to go to a different url.
Has anyone done anything like this before, and if so what were the best ways
you found of accomplishing this?

Thanks,
David


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







Re: [OT] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Stéphane Zuckerman

Mmmh. Not always - at least, not in French right, for instance. If there
is no license tied to code on a web site, but said code is clearly
defined as Mr X's code, then it is implicit that you don't have the
right to use it, integrate it, etc. for whatever purpose unless you have
some written (1) authorization from Mr X.

If you use the code for your personal needs and don't publish the code
or try to make money with a derivative from it, what I've just said
doesn't apply, of course.

Now there is always the matter of "common sense", which would have us
think that since the code is available for free, without anything
written about using it, then it should be alright to reuse it. Most of
the time, this assertion is correct. Sometimes it is not (just think of
the "GIF problem" a few years ago - I know, this isn't the same kind of
problem, but it is related in some way).

(1) : well, "written", or at least "perfectly non-ambiguous".


--
Stéphane Zuckerman

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

The idea that someone has "ownership" of code anyway (legalisms aside) is 


somewhat megalomaniacal. I don't think anyone can code even a single line of 
code without benefiting from someone else's work. 



Should we comment credit 
to the GOF every time we apply a design pattern? 


If I remember correctly, your are explicitly allowed to use the code 
given in their book, and as far as I can remember, every CS/IT book I've 
read has made the same explicit authorization.


Should we ask for 
permission every time we google our way through a problem and integrate the 
code (yes, even using copy/paste) into our package, then distribute it to 
the public? 


This is already another kind of code reuse. And if the web site is done 
"the right way" (whatever that might mean), you should be able to see 
somewhere on the web site that you do have a right for reusing the code 
you saw.


 This idea that "you sole my (his/her) code" only applies when the code was 
literally stolen: forcefully or covertly taken. 


This is what happens in practice, yes. Now imagine someone does this 
wonderful library, which is very convenient. For YOUR kind of 
development, this is The Right Tool. And you're not the only one to 
think that way. And now, the "owner" of this library starts saying "hey, 
I've never said that you could do some commercial stuff with MY library".


Like I said, this is more or less what's happened with the GIF image 
format, excepted that there was a patent on it which was never used, 
until it became apparent that everybody on the web was using this image 
format (at least at some point in Internet time :-) ).


In the end I agree with you of course. But that doesn't mean that, in 
the law's point of view, you (or me, or anyone sensible around) are right.


--
Stéphane Zuckerman

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



Re: Syntax

2005-07-25 Thread Kjersti Berg
On 25/07/05, Vijay K Anand <[EMAIL PROTECTED]> wrote:
> Hi
> 
> What is wrong in the below code ? Eclipse is making noise...but code
> runs fine...
>  styleId="<%= "c"+(String)CoreID %>" />

Not sure, but this looks odd:
styleId="<%= "c"+(String)CoreID %>" />

How about styleId='<%= "c" + (String)CoreID %>' ? 

Kjersti

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



Syntax

2005-07-25 Thread Vijay K Anand

Hi

What is wrong in the below code ? Eclipse is making noise...but code 
runs fine...
styleId="<%= "c"+(String)CoreID %>" />


Regards
Vijay

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



SSL with struts

2005-07-25 Thread mickey
Hi,
When using struts instead of recieving the page, that I've defined in 
struts-config.xml, I'm getting the page, that in forward part for this 
page. Do you have any idea what could be a problem?


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



Re: Reports

2005-07-25 Thread Martin Gainty
The Poi-Hwpf Apache project is currently addressing the task of writing 
Microsoft Compound documents.

More information can be ascertained at the jakarta site which is located at
http://jakarta.apache.org/poi/hwpf/docoverview.html

Good Luck,
Martin-

__
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relating to the official 
business of Sender and is proprietary to Sender. It is confidential, legally 
privileged and protected by law. Sender does not own and endorse any other 
content.

(mobile) 617-852-7822
(http)www.laconiadatasystems.com





From: Shajee <[EMAIL PROTECTED]>
Reply-To: Shajee <[EMAIL PROTECTED]>
To: Struts Users Mailing List , Martin Gainty 
<[EMAIL PROTECTED]>

Subject: Re: Reports
Date: Mon, 25 Jul 2005 17:08:08 +0530
MIME-Version: 1.0
Received: from mail.apache.org ([209.237.227.199]) by mc7-f16.hotmail.com 
with Microsoft SMTPSVC(6.0.3790.211); Mon, 25 Jul 2005 04:39:44 -0700

Received: (qmail 13057 invoked by uid 500); 25 Jul 2005 11:38:10 -
Received: (qmail 13044 invoked by uid 99); 25 Jul 2005 11:38:10 -
Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49)by 
apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 04:38:10 -0700
Received: pass (asf.osuosl.org: domain of [EMAIL PROTECTED] designates 
64.233.184.206 as permitted sender)
Received: from [64.233.184.206] (HELO wproxy.gmail.com) (64.233.184.206)
by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Jul 2005 04:38:03 -0700
Received: by wproxy.gmail.com with SMTP id i11so969243wrafor 
; Mon, 25 Jul 2005 04:38:08 -0700 (PDT)
Received: by 10.54.139.7 with SMTP id m7mr2120266wrd;Mon, 25 Jul 
2005 04:38:08 -0700 (PDT)

Received: by 10.54.78.7 with HTTP; Mon, 25 Jul 2005 04:38:08 -0700 (PDT)
X-Message-Info: JGTYoYF78jHm/9tpMMGYSNypa6P+XcCUI5Cnbs+MAJE=
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Unsubscribe: 
List-Help: 
List-Post: 
List-Id: "Struts Users Mailing List" 
Delivered-To: mailing list user@struts.apache.org
X-ASF-Spam-Status: No, hits=0.0 
required=10.0tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS

X-Spam-Check-By: apache.org
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;s=beta; 
d=gmail.com;
h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; 
   
b=VdbttcWdjaW+f5ZD2dkF+3eHmYHqT3ZFVaChbIW3s94mtzF0gPHDh5xE7bMF8G+557ltPfPZ46rPIhyE6oZkoi1CXTsR+OmfZ+64aRG0a159xuGJ5vSrU4oPFUp7e7Up+QxPI4h6h/zwCP39P5COHn7HXfoqOXRTJvMYzura4XM=
References: <[EMAIL PROTECTED]> 
<[EMAIL PROTECTED]>

X-Virus-Checked: Checked by ClamAV on apache.org
Return-Path: [EMAIL PROTECTED]
X-OriginalArrivalTime: 25 Jul 2005 11:39:44.0744 (UTC) 
FILETIME=[8DACC680:01C5910D]


hi, As far as i have seen in open source and web applications (with
jsp) all tools support either XML, PDF, HTML or CSV etc
However there's none which gives a RTF or MS Word output

Do you have any idea of a reporting tool/engine which does give a
RTF/Word output.

Thanks & Regards
Shajee

On 5/17/05, Martin Gainty <[EMAIL PROTECTED]> wrote:
> Rafael-
>
> what format are you looking for output?
> PDF?
> doc?
> rtf?
>
> Saludos!
> Martin-
> - Original Message -
> From: "Rafael Taboada" <[EMAIL PROTECTED]>
> To: "Struts List" 
> Sent: Monday, May 16, 2005 3:20 PM
> Subject: Reports
>
>
> Hi folks. I'm doing reports for my project and I was asking me if
> there are tools in order to help to do that.
>
> Is it possible to integrate Crystal Reports with Struts?. I heard
> about Business Object... Do u know some documentation about it?
>
> What other tools are there in order to make reports???
>
> Thanks for help me.
>
>
> --
>
>  Rafael Taboada
>
> -
> 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]
>
>


--
Cheers!!!
Shajee
(New Delhi)
9891245472

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

2005-07-25 Thread Stéphane Zuckerman

Senthilrajan VS a écrit :

Hi Stéphane Zuckerman,

Thanks for your response. Can u please tell me how can I close the
connection if the user close the window directly because I am not maintain
any session in the window



These are two unrelated events : you want a client-side event to create 
a server-side event. I don't know enough JavaScript to help you an 
"onClose" event (I don't even know if that exists). You'd better use a 
link to make the session close, and if you really don't want to have a 
session to stay opened too long, just shrink its timeout to a few 
seconds. :-)

--
Stéphane Zuckerman

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



Re: [OT] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Michael Meadows
On 7/25/05, Stéphane Zuckerman <[EMAIL PROTECTED]> wrote: 
> 
> Craig McClanahan a écrit :
> > On 7/21/05, Dakota Jack <[EMAIL PROTECTED]> wrote:
> >
> >
> >>This code does not belong to Michael. It is purloined from
> >>www.michaelmcgrady.com  and other 
> discussion on this list.
> >
> >
> > In the midst of chuckling at the assertions made in this thread, a
> > serious comment for DJ (and others like him) to consider. Publishing
> > source code on a public web site, without any associated license, as
> > was done here, is basically putting that code into the public doman.
> > If you want to assert ownership rights, you might think about a
> > different behavior.
> 
> Mmmh. Not always - at least, not in French right, for instance. If there
> is no license tied to code on a web site, but said code is clearly
> defined as Mr X's code, then it is implicit that you don't have the
> right to use it, integrate it, etc. for whatever purpose unless you have
> some written (1) authorization from Mr X.
> 
> If you use the code for your personal needs and don't publish the code
> or try to make money with a derivative from it, what I've just said
> doesn't apply, of course.
> 
> Now there is always the matter of "common sense", which would have us
> think that since the code is available for free, without anything
> written about using it, then it should be alright to reuse it. Most of
> the time, this assertion is correct. Sometimes it is not (just think of
> the "GIF problem" a few years ago - I know, this isn't the same kind of
> problem, but it is related in some way).
> 
> (1) : well, "written", or at least "perfectly non-ambiguous".
> 
> 
> --
> Stéphane Zuckerman
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>  The idea that someone has "ownership" of code anyway (legalisms aside) is 
somewhat megalomaniacal. I don't think anyone can code even a single line of 
code without benefiting from someone else's work. Should we comment credit 
to the GOF every time we apply a design pattern? Should we ask for 
permission every time we google our way through a problem and integrate the 
code (yes, even using copy/paste) into our package, then distribute it to 
the public? Should we research every passage of code to make sure someone 
else hasn't done it first (I guarantee that almost everything has been done 
before).
 This idea that "you sole my (his/her) code" only applies when the code was 
literally stolen: forcefully or covertly taken. IMO, if MJ wants to 
copy/paste code from fifty sites (and I'm not accusing him of doing so) and 
compile them in to something that works well and benefits the community, 
he's welcome.


How to read ResourceBundle

2005-07-25 Thread Ashutosh Satyam
Hi,
 In my application I want to set the error key based on whether 
the error key is present in resource bundle. The error key is 
generated in the system and the top most layer 'Action class' is 
supposed to set the keys based on the error key availability.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Sample/Pseudo code demonstrating what I exactly tend to do.

String key = null;
String[] param = null;

ResourceBundle bundle =  getBudle();
if("a.b.c.d".isPresent(bundle))
key = "a.b.c.d";
param = new String[2]
param[0]="s1";
param[1]="s2;
elseif("a.b.c."isPresent(bundle))
  key = "a.b.c";
elseif("a.b".isPresent(bundle))
  key="a.b";
elseif("a".isPresent(bundle))
  key = "a"
else
  key = "default.errorkey";

ActionErrors errors = new ActionErrors();
If(param != null)
 errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError(key,params));
else
 errors.add(ActionErrors.GLOBAL_ERROR,
new ActionError(key,params));

saveErrors(req,errors);
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

Is there a handle available through Struts framework to read Resource Bundle 
so that I can look whether a particular key is present or not and accordingly 
construct ActionError.

Any pointers on this will be appreciated.

Thansk & Regards,
Ashutosh



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



RE: Technique for undetermined time of processing - progress bar

2005-07-25 Thread BHansard

Unfortunately, any AJAX implementation will require _javascript_.  You can replace this with a standard JSP implementation, but you will have a lot of "Flicker" as your page updates.  You will also have to keep all information that is displayed on your page in the session or request which can chew up your bandwidth on heavly used sites.

">"David Erickson" <[EMAIL PROTECTED]>








"David Erickson" <[EMAIL PROTECTED]> 
07/23/2005 09:52 AM

Please respond to
"Struts Users Mailing List" 








To
"'Struts Users Mailing List'" 


cc



Subject
RE: Technique for undetermined time of processing - progress bar








What If the end user has _javascript_ disabled?  Does DWR handle that cleanly
or are you out of luck?

 

-David

 

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] 
Sent: Friday, July 22, 2005 1:55 PM
To: Struts Users Mailing List
Cc: 'Struts Users Mailing List'
Subject: Re: Technique for undetermined time of processing - progress bar

 

I use AJAX to kick off the process. For this case You can send an AJAX
request to get the time, once recieved display a div that will contain the
"progress bar" and submit a second request to run the actual process. On
completion, you can forward the page to the next url.

If you use DWR and can just display an anamated gif or flash movie, then you
can use the built in pre and post process hooks. The preprocess would
display the image and the post would hide it. on completion of the process
have the page submit to the next screen.

Inactive hide details for "David Erickson" <[EMAIL PROTECTED]>"David
Erickson" <[EMAIL PROTECTED]>




"David Erickson" <[EMAIL PROTECTED]> 

07/22/2005 02:41 PM 


Please respond to
"Struts Users Mailing List" 




To


"'Struts Users Mailing List'" 




cc






Subject


Technique for undetermined time of processing - progress bar

 







Sorry for the vague subject.  I've got a situation where I need to do some
processing before moving a user to a specific page.  The processing could be
very fast or very long.  I'd like to have some kind of a progress bar type
meter than can show how much time is left.  I will know for sure the exact
time it will take to process, and I can retrieve that at the beginning of
the processing.  When processing is done I want to go to a different url.
Has anyone done anything like this before, and if so what were the best ways
you found of accomplishing this?

Thanks,
David


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







Re: DB Connection

2005-07-25 Thread Senthilrajan VS

Hi Stéphane Zuckerman,

Thanks for your response. Can u please tell me how can I close the
connection if the user close the window directly because I am not maintain
any session in the window


- Original Message - 
From: "Stéphane Zuckerman" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Monday, July 25, 2005 5:34 PM
Subject: Re: DB Connection


Vijay K Anand a écrit :
> hi
>
> How to share the saem db connection across user requests..without
> exhausitn the connection pool.
>
> regards
> Vijay

You could create a plugin that connects to the Database when launching
the webapp, then put the handler in the servlet context. Then you could
retrieve it from there, or try to put it in the session scope at the
beginning of the user's session.

-- 
Stéphane Zuckerman

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

2005-07-25 Thread Stéphane Zuckerman

Vijay K Anand a écrit :

hi

How to share the saem db connection across user requests..without 
exhausitn the connection pool.


regards
Vijay


You could create a plugin that connects to the Database when launching 
the webapp, then put the handler in the servlet context. Then you could 
retrieve it from there, or try to put it in the session scope at the 
beginning of the user's session.


--
Stéphane Zuckerman

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



Re: Reports

2005-07-25 Thread Shajee
hi, As far as i have seen in open source and web applications (with
jsp) all tools support either XML, PDF, HTML or CSV etc
However there's none which gives a RTF or MS Word output

Do you have any idea of a reporting tool/engine which does give a
RTF/Word output.

Thanks & Regards
Shajee

On 5/17/05, Martin Gainty <[EMAIL PROTECTED]> wrote:
> Rafael-
> 
> what format are you looking for output?
> PDF?
> doc?
> rtf?
> 
> Saludos!
> Martin-
> - Original Message -
> From: "Rafael Taboada" <[EMAIL PROTECTED]>
> To: "Struts List" 
> Sent: Monday, May 16, 2005 3:20 PM
> Subject: Reports
> 
> 
> Hi folks. I'm doing reports for my project and I was asking me if
> there are tools in order to help to do that.
> 
> Is it possible to integrate Crystal Reports with Struts?. I heard
> about Business Object... Do u know some documentation about it?
> 
> What other tools are there in order to make reports???
> 
> Thanks for help me.
> 
> 
> --
> 
>  Rafael Taboada
> 
> -
> 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]
> 
> 


-- 
Cheers!!!
Shajee
(New Delhi)
9891245472

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



DB Connection

2005-07-25 Thread Vijay K Anand

hi

How to share the saem db connection across user requests..without 
exhausitn the connection pool.


regards
Vijay

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



Re: Resetting ActionForm properties during validation

2005-07-25 Thread Kjersti Berg
On 25/07/05, Vandenbroucke Gregory <[EMAIL PROTECTED]> wrote:
> My action form fields are Integer or Float objects.
> The thing is, that I would like struts to leave the html fields empty, if
> some user entered alphanumeric text instead of numeric.
> Meaning that my ActionForm properties would be null instead of zero (which
> is semantically more correct). Is there a way to circumvent the auto
> population stuff?
> 
> Thanks,
> gregory
> 
> -Original Message-
> From: Kjersti Berg [mailto:[EMAIL PROTECTED]
> Sent: lundi 25 juillet 2005 11:52
> To: Struts Users Mailing List
> Subject: Re: Resetting ActionForm properties during validation
> 
> On 25/07/05, Vandenbroucke Gregory <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> > I have several forms which contain fields that should only accept numeric
> > data. If the entered data wasn't numeric, then during validation of that
> > field I would like to be able to leave the form field empty. But struts
> will
> > auto populate all fields. Meaning that for numeric fields it will enter
> > zero's if the entered data wasn't numeric.
> > Is there any way to circumvent this, and leave the form fields empty if
> the
> > entered data wasn't correct?

I believe there  was a discussion on this a few weeks ago. It is
generally not advised to use typed fields on the form so that the form
can contain invalid data and display them to the user. If you still
want to use typed fields you should probably do the validation
yourself in. The alternative is to create your own version of the
FieldCheck for numeric values. Search the archives for more specifics.

Kjersti

> 
> Are your your form fields strings? If so the user's input will be kept
> even if validation fails. If they are ints you get a 0 instead,
> because that is that that is the default value of an int.
> 
> Kjersti
> >
> > TIA,
> > Gregory.
> >
> >
> > -
> > 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: Resetting ActionForm properties during validation

2005-07-25 Thread Vandenbroucke Gregory
My action form fields are Integer or Float objects.
The thing is, that I would like struts to leave the html fields empty, if
some user entered alphanumeric text instead of numeric.
Meaning that my ActionForm properties would be null instead of zero (which
is semantically more correct). Is there a way to circumvent the auto
population stuff?

Thanks,
gregory

-Original Message-
From: Kjersti Berg [mailto:[EMAIL PROTECTED] 
Sent: lundi 25 juillet 2005 11:52
To: Struts Users Mailing List
Subject: Re: Resetting ActionForm properties during validation

On 25/07/05, Vandenbroucke Gregory <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I have several forms which contain fields that should only accept numeric
> data. If the entered data wasn't numeric, then during validation of that
> field I would like to be able to leave the form field empty. But struts
will
> auto populate all fields. Meaning that for numeric fields it will enter
> zero's if the entered data wasn't numeric.
> Is there any way to circumvent this, and leave the form fields empty if
the
> entered data wasn't correct?

Are your your form fields strings? If so the user's input will be kept
even if validation fails. If they are ints you get a 0 instead,
because that is that that is the default value of an int.

Kjersti 
> 
> TIA,
> Gregory.
> 
> 
> -
> 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]



[OT] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Stéphane Zuckerman

Craig McClanahan a écrit :

On 7/21/05, Dakota Jack <[EMAIL PROTECTED]> wrote:



This code does not belong to Michael. It is purloined from
www.michaelmcgrady.com and other discussion on this list.



In the midst of chuckling at the assertions made in this thread, a
serious comment for DJ (and others like him) to consider.  Publishing
source code on a public web site, without any associated license, as
was done here, is basically putting that code into the public doman. 
If you want to assert ownership rights, you might think about a

different behavior.


Mmmh. Not always - at least, not in French right, for instance. If there 
is no license tied to code on a web site, but said code is clearly 
defined as Mr X's code, then it is implicit that you don't have the 
right to use it, integrate it, etc. for whatever purpose unless you have 
some written (1) authorization from Mr X.


If you use the code for your personal needs and don't publish the code 
or try to make money with a derivative from it, what I've just said 
doesn't apply, of course.


Now there is always the matter of "common sense", which would have us 
think that since the code is available for free, without anything 
written about using it, then it should be alright to reuse it. Most of 
the time, this assertion is correct. Sometimes it is not (just think of 
the "GIF problem" a few years ago - I know, this isn't the same kind of 
problem, but it is related in some way).


(1) : well, "written", or at least "perfectly non-ambiguous".


--
Stéphane Zuckerman

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



Re: Resetting ActionForm properties during validation

2005-07-25 Thread Kjersti Berg
On 25/07/05, Vandenbroucke Gregory <[EMAIL PROTECTED]> wrote:
> Hi all,
> 
> I have several forms which contain fields that should only accept numeric
> data. If the entered data wasn't numeric, then during validation of that
> field I would like to be able to leave the form field empty. But struts will
> auto populate all fields. Meaning that for numeric fields it will enter
> zero's if the entered data wasn't numeric.
> Is there any way to circumvent this, and leave the form fields empty if the
> entered data wasn't correct?

Are your your form fields strings? If so the user's input will be kept
even if validation fails. If they are ints you get a 0 instead,
because that is that that is the default value of an int.

Kjersti 
> 
> TIA,
> Gregory.
> 
> 
> -
> 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: [FRIDAY] J2EE Web frameworks are in a state of flux

2005-07-25 Thread Dakota Jack
Sure you can.  We do that all the time.  You cannot compare them
fruitfully, but you sure can replace them with one another.

On 7/25/05, Emmanouil Batsis <[EMAIL PROTECTED]> wrote:
> John Henry Xu wrote:
> 
> >OK, spring has a good design and it may replace EJB.
> >
> >
> 
> You cannot replace apples with oranges ;-)
> 
> Manos
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Re: Problem with date

2005-07-25 Thread Michael Meadows
To be less terse:
The Date object is kind of like my wife when I get all excited about 
technology... it only acts like it cares about time zone.
 If you're parsing from text, try feeding the DateFormat object a TimeZone 
before parsing:
 DateFormat formatter = DateFormat.getDateTimeInstance
 (DateFormat.SHORT, DateFormat.MEDIUM);
formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
Date date = formatter.parse(dateString);

 On 7/25/05, Michael Meadows <[EMAIL PROTECTED]> wrote: 
> 
> Feed it to the Calendar (yum). 
> 
> On 25 Jul 2005 03:43:54 -, syed abrar <[EMAIL PROTECTED]> 
> wrote: 
> > 
> > 
> > Hello
> > This problem is more of a core java issue than a struts one.
> > I have a user interface to accept time and another field to enter the 
> > difference of time with GMT (GMT+x or GMT-1) . 
> > I have to accept this time and convert the time exactly into the 
> > timezone in which the server is running and store.
> > Can anyone help me in this(converting into the time zone) and please if 
> > you have any sample code ,send it along. 
> > 
> > Regards
> > Abrar
> > 
> 
>


Re: [FRIDAY] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Dakota Jack
Why are you submitting other people's code and then being a smart ass
about it?  If it were my option, I wouild say "not in a million
years".  I don't think you ever have that authority anyway.  But, ask
McGrady, who already said, if you check the lists, that he doesn't
want the code in Struts, probably for the reasons he stated, which are
very different from yours..  If you continue on this tack, I would
strongly recommend you learn how the code actually works before
claiming it is yours.  I get a huge kick, however, out of the fact
that no one else is calling you out on this, even though the facts are
as clear as they ever will be that you are not the author of spit. 
Why don't you do your own code and then submit that?

On 7/25/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> On 7/23/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> > > Anyway, sorry for being overly excited, I might have said something
> > > wrong. I just wanted Struts to continue to evolve. Seems that I chose
> > > a bad class to submit.
> >
> > I don't think it's a bad class to submit - I'm just not sure how
> > different it is than the other lookup action McGrady submitted?
> 
> I agree, McGrady's approach using suffix instead of prefix is easier,
> works for regular or image buttons. I used his code and submitted it
> to Bugzilla. Jack, is it OK with you that I submitted your code?
> 
> Maybe I should just patch DispatchAction class, keeping the name and
> simply adding functionality?
> 
> Michael.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

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



Resetting ActionForm properties during validation

2005-07-25 Thread Vandenbroucke Gregory
Hi all,

I have several forms which contain fields that should only accept numeric
data. If the entered data wasn't numeric, then during validation of that
field I would like to be able to leave the form field empty. But struts will
auto populate all fields. Meaning that for numeric fields it will enter
zero's if the entered data wasn't numeric.
Is there any way to circumvent this, and leave the form fields empty if the
entered data wasn't correct?

TIA,
Gregory.


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



Re: Problem with date

2005-07-25 Thread Michael Meadows
Feed it to the Calendar (yum).

On 25 Jul 2005 03:43:54 -, syed abrar <[EMAIL PROTECTED]> wrote: 
> 
> 
> Hello
> This problem is more of a core java issue than a struts one.
> I have a user interface to accept time and another field to enter the 
> difference of time with GMT (GMT+x or GMT-1) .
> I have to accept this time and convert the time exactly into the timezone 
> in which the server is running and store.
> Can anyone help me in this(converting into the time zone) and please if 
> you have any sample code ,send it along.
> 
> Regards
> Abrar
>


Re: [FRIDAY] Re: SelectAction - an improved DispatchAction

2005-07-25 Thread Michael Jouravlev
On 7/23/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> > Anyway, sorry for being overly excited, I might have said something
> > wrong. I just wanted Struts to continue to evolve. Seems that I chose
> > a bad class to submit.
> 
> I don't think it's a bad class to submit - I'm just not sure how
> different it is than the other lookup action McGrady submitted?

I agree, McGrady's approach using suffix instead of prefix is easier,
works for regular or image buttons. I used his code and submitted it
to Bugzilla. Jack, is it OK with you that I submitted your code?

Maybe I should just patch DispatchAction class, keeping the name and
simply adding functionality?

Michael.

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



Re: tiles problem

2005-07-25 Thread Dewitte Rémi
Or simply :
 
  
 

Rémi

Le Dimanche 24 Juillet 2005 05:59, Laurie Harper a écrit :
> Your global forward needs to point to an action, not directly to a tiles
> definition. Change your struts-config.xml as follows:
>
>...
>
>  
>
>
>  type="org.apache.struts.actions.ForwardAction"
>parameter="base.definition"/>
>
>...
>
> That should do the trick, roughly.
>
> L.
>
> Werner Punz wrote:
> > Hi I am trying to get tiles up and running and so far
> > I am trying to do a simple tiled forward
> >
> > the problem is, I can call the forwarded page directly and it displays
> > but as soon as I call the tiles definition name I get errors
> >
> > here are my config files:
> > 
> >  > Struts Configuration 1.2//EN"
> >
> > "http://struts.apache.org/dtds/struts-config_1_2.dtd";>
> > 
> >  
> >  
> >  
> >  
> >   
> >  
> >  
> >   > className="org.apache.struts.tiles.TilesRequestProcessor"/>
> >   > parameter="com.sonydadc.claudio.resources.ApplicationResource"/>
> >  
> >> value="/WEB-INF/tiles-defs.xml"/>
> >   
> >   
> >  
> > 
> >
> >
> > for the struts-config
> >
> > 
> >  > Tiles Configuration 1.1//EN"
> >
> > "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd";>
> > 
> >  
> > 
> >
> > for the tiles definition
> >
> > and as soon as I global forward goMain I get following error
> >
> > Exception report
> >
> > message
> >
> > description The server encountered an internal error () that prevented
> > it from fulfilling this request.
> >
> > exception
> >
> > org.apache.jasper.JasperException
> >
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav
> >a:370)
> >
> >
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> >
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> > root cause
> >
> > java.lang.NullPointerException
> >
> > org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.jav
> >a:446)
> >
> >
> > org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.jav
> >a:329)
> >
> >
> > org.apache.struts.taglib.logic.RedirectTag.generateRedirectURL(RedirectTa
> >g.java:296)
> >
> >
> > org.apache.struts.taglib.logic.RedirectTag.doEndTag(RedirectTag.java:270)
> >
> >
> > org.apache.jsp.index_jsp._jspx_meth_logic_redirect_0(org.apache.jsp.index
> >_jsp:85)
> >
> > org.apache.jsp.index_jsp._jspService(org.apache.jsp.index_jsp:59)
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.jav
> >a:322)
> >
> >
> > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
> >
> > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> > note The full stack trace of the root cause is available in the Apache
> > Tomcat/5.5.9 logs.
> >
> >
> > I am sort of stumped on what is going on here
> >
> > Does anyone know the cause?

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



Re: [FRIDAY] J2EE Web frameworks are in a state of flux

2005-07-25 Thread Emmanouil Batsis

John Henry Xu wrote:


OK, spring has a good design and it may replace EJB.
 



You cannot replace apples with oranges ;-)

Manos

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