AjaxTags v1.0 beta 1 released

2005-05-12 Thread Frank W. Zammetti
Finally got it all set up on http://struts.sf.net.  The first "official" 
release is up!

AjaxTags is a project to add AJAX functionality to the existing Struts 
HTML taglib.  It allows a developer to jump on the AJAX bandwagon 
without actually writing any code.  It's a completely declarative 
approach, but with flexibility beyond that if you need it.  It can be 
added to new or even existing apps without breaking anything, and with 
the ability to selectively add AJAX functions to only those form 
elements you want it added to.  All this with very little changes to 
existing JSPs.

Enjoy!
--
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: [POLL] What do you use action forms for?

2005-05-12 Thread Michael Jouravlev
I updated the online poll with information from the mailing list. I
tried my best to recognize your choices when they were not clear ;)

Anyway, after 53 emails and about 15 direct online votes the grand
total looks like this:
http://jmikus.freepolls.com/cgi-bin/pollresults/001

#1 -- 5
#2 -- 10
#3 -- 0
#4 -- 29
#5 -- 3 

Total: 47 votes so far

Whatever you guys understand by output data, but 62% of you stick it
in the same form, as input data ;-)

Polling location is here:
http://jmikus.freepolls.com/cgi-bin/polls/001/poll_center.htm
Early votes, late votes, provisional votes, multiple candidates, all
are welcome ;-))

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



Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread Frank W. Zammetti
As a general rule you always want to close any stream when done, unless 
you know by design that you need it to remain open, so yes, you probably 
want to close it.

That being said, I've seen *PLENTY* of code that does things like this 
that don't close the stream, and as far as I could tell it was 
well-behaved code otherwise... I suspect the container will close the 
stream at the end of the request processing cycle if it's still open, 
but I always close it to be certain.  Better to be explicit :)

Frank
David Johnson wrote:
Wow, excellent. Thanks! is tehre anything IU need to do to close my 
PrintWriter in the Action class? right now I have

response.setContentType("application/pdf");
response.setHeader("Content-disposition", "inline" );
PrintWriter out = response.getWriter();
socket.write(out); // I get my PDF through thtis socket

do I need to close() it explicitly?
On 5/12/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
Return null. That's it (seriously!) Null effectively means "do not
forward to anything, the response is completely formed".
Frank
David Johnson wrote:
Okay, I've got it opening the second browser (finally got back to it)
using the target="_new" in the form declaration, but here's the real 
problem
I'm in the action class, and I can can work on the response using
response.setContentType("application/pdf");
response.setHeader("Content-disposition", "inline" );
BUT, when I get to the end of my action class, what do I return? I cant
return to a JSP page because I've set the content type to be PDF (or 
excel)
So, instead of
mapping.findForward("success");
what can I do?
On 5/12/05, *Frank W. Zammetti* <[EMAIL PROTECTED]
> wrote:
Ugh, I always forget the simple target attribute! Absolutely agreed,
that's probably the best approach.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Thu, May 12, 2005 11:16 am, David Johnson said:
whoa that's simple. I'm trying that first Thanks
One things though, I'll have to set the "target" conditionally,
only when
the user clicks "PDF" or "EXCEL" since I dont **always** want it
opening a
new window...
function setTarget(target) {
document.forms[0].target=target;
}
On 5/12/05, Aladin Alaily <[EMAIL PROTECTED]
> wrote:
Hi Dave,
This is pretty straightforward. In browser "a", you have a
button that
says:
"Export to PDF"
The code would look like this:



When the user clicks on the button, the action "exportToPdf.do"
opens an
ServletOutputStream and writes whatever you want. The headers
are also
set to the content-type you want and the format you want (inline or
attachment).
Aladin

Hey all
is it possible to forme my struts app to open up a second browser
window
for
the purpose of streaming a different content type (like a pdf
file)
into
it
while maintaining the page in the original browser?
Essentially, I have a nicely rendered HTML report in browser
"a" and
when
the user clicks "export to PDF" or "export to excel" I want a NEW
browser
to
pop up into which I will send the response with the headerType
set to
the
appropriate type.
the generation of the XL and PDF is handled for me, but the
app flow
is
where Im foggy.
anyone done this?
--
-Dave
[EMAIL PROTECTED] 

--
-Dave
[EMAIL PROTECTED] 

--
-Dave
[EMAIL PROTECTED] 
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com



--
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: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread Frank W. Zammetti
Return null.  That's it (seriously!)  Null effectively means "do not 
forward to anything, the response is completely formed".

Frank
David Johnson wrote:
Okay, I've got it opening the second browser (finally got back to it) 
using the target="_new" in the form declaration, but here's the real problem

I'm in the action class, and I can can work on the response using
response.setContentType("application/pdf");
response.setHeader("Content-disposition",  "inline" );
BUT, when I get to the end of my action class, what do I return? I cant 
return to a JSP page because I've set the content type to be PDF (or excel)

So, instead of
mapping.findForward("success");
what can I do?
On 5/12/05, *Frank W. Zammetti* <[EMAIL PROTECTED] 
> wrote:

Ugh, I always forget the simple target attribute!  Absolutely agreed,
that's probably the best approach.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Thu, May 12, 2005 11:16 am, David Johnson said:
 > whoa that's simple. I'm trying that first Thanks
 >
 > One things though, I'll have to set the "target" conditionally,
only when
 > the user clicks "PDF" or "EXCEL" since I dont **always** want it
opening a
 > new window...
 >
 > function setTarget(target) {
 > document.forms[0].target=target;
 > }
 >
 > On 5/12/05, Aladin Alaily <[EMAIL PROTECTED]
> wrote:
 >>
 >> Hi Dave,
 >>
 >> This is pretty straightforward. In browser "a", you have a
button that
 >> says:
 >>
 >> "Export to PDF"
 >>
 >> The code would look like this:
 >>
 >> 
 >> 
 >> 
 >>
 >> When the user clicks on the button, the action "exportToPdf.do"
opens an
 >> ServletOutputStream and writes whatever you want. The headers
are also
 >> set to the content-type you want and the format you want (inline or
 >> attachment).
 >>
 >> Aladin
 >>
 >>
 >> > Hey all
 >> >
 >> > is it possible to forme my struts app to open up a second browser
 >> window
 >> > for
 >> > the purpose of streaming a different content type (like a pdf
file)
 >> into
 >> > it
 >> > while maintaining the page in the original browser?
 >> >
 >> > Essentially, I have a nicely rendered HTML report in browser
"a" and
 >> when
 >> > the user clicks "export to PDF" or "export to excel" I want a NEW
 >> browser
 >> > to
 >> > pop up into which I will send the response with the headerType
set to
 >> the
 >> > appropriate type.
 >> >
 >> > the generation of the XL and PDF is handled for me, but the
app flow
 >> is
 >> > where Im foggy.
 >> >
 >> > anyone done this?
 >> >
 >> > --
 >> > -Dave
 >> > [EMAIL PROTECTED] 
 >> >
 >>
 >>
 >
 >
 > --
 > -Dave
 > [EMAIL PROTECTED] 
 >

--
-Dave
[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: [POLL] What do you use action forms for?

2005-05-12 Thread Michael Jouravlev
On 5/12/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> Maybe I'm repeating myself, but I give myself a last try :-)
> I'm a beliefer of  design by responsibility. When I design an
> application I identify responsibilities to form and define components,
> modules and layers. Therefore I like each class to have a clear contract.

Ok, I will try for the last time too :) You design your app based on
how well the modules designed, how fast is it, how efficient, etc.
Where is the customer in this scheme? What about usability?

I base my design on usability. Then I think about nice and observable
module interaction, and only then I care about memory consumption. As
long as we build webapps based on current HTTP standard, we need to
take the quirks of this standard into consideration. We need to make
user's life easier, and to allow him to make mistakes, to click
"wrong" buttons, to wander around and then return to same page... We
should allow more freedom to a user. In the end, we build applications
for the user.

If splitting one request into two is beneficial for usability, I will
do it. And I will handle the consequences. Because usability first,
simplicity of programming is second.

> Well it maybe get too detailed, but if you keep objects in sessions instead
> of request you are actually working against the garbage collector.

This is a matter of implementation. I don't consider inner workings of
garbage collector as a major factor when I design my application.
Well, HTTP request/response cycle is a matter of implementation too.
But in this case it directly affects usability. HTTP is not going away
tomorrow, so I prefer to work around HTTP instead of caring about
memory usage.

> Other, very powerful anti-session-argument is concurrency. If your session
> object actually represent a business data object, which is
> managed by some business logic components or stored in the db (or both) you
> have to watch for changes done by other users/actors. This mean that you
> actually have to notify the webservers about any changes to the objects

This is not an anti-session argument, this is argument against
optimistic concurrency model and offline editing. This is not really
different, when request is used. Say, you edit an existing object. You
load object from database and show the edit form. A user takes her
time painting the nails, and then in 10 minutes submits the data. The
object was not sitting in the session for 10 minutes, so you saved
here, I agree. But if someone else already have changed it, you won't
be able to save it, just like if it were in session, no difference.

I guess we should stop arguing ;-)

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



Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread David Johnson
Wow, excellent. Thanks! is tehre anything IU need to do to close my 
PrintWriter in the Action class? right now I have

response.setContentType("application/pdf");
response.setHeader("Content-disposition", "inline" );
PrintWriter out = response.getWriter();

socket.write(out); // I get my PDF through thtis socket



do I need to close() it explicitly?

On 5/12/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> 
> Return null. That's it (seriously!) Null effectively means "do not
> forward to anything, the response is completely formed".
> 
> Frank
> 
> David Johnson wrote:
> > Okay, I've got it opening the second browser (finally got back to it)
> > using the target="_new" in the form declaration, but here's the real 
> problem
> >
> > I'm in the action class, and I can can work on the response using
> >
> > response.setContentType("application/pdf");
> > response.setHeader("Content-disposition", "inline" );
> >
> > BUT, when I get to the end of my action class, what do I return? I cant
> > return to a JSP page because I've set the content type to be PDF (or 
> excel)
> >
> > So, instead of
> >
> > mapping.findForward("success");
> >
> > what can I do?
> >
> > On 5/12/05, *Frank W. Zammetti* <[EMAIL PROTECTED]
> > > wrote:
> >
> > Ugh, I always forget the simple target attribute! Absolutely agreed,
> > that's probably the best approach.
> >
> > --
> > Frank W. Zammetti
> > Founder and Chief Software Architect
> > Omnytex Technologies
> > http://www.omnytex.com
> >
> > On Thu, May 12, 2005 11:16 am, David Johnson said:
> > > whoa that's simple. I'm trying that first Thanks
> > >
> > > One things though, I'll have to set the "target" conditionally,
> > only when
> > > the user clicks "PDF" or "EXCEL" since I dont **always** want it
> > opening a
> > > new window...
> > >
> > > function setTarget(target) {
> > > document.forms[0].target=target;
> > > }
> > >
> > > On 5/12/05, Aladin Alaily <[EMAIL PROTECTED]
> > > wrote:
> > >>
> > >> Hi Dave,
> > >>
> > >> This is pretty straightforward. In browser "a", you have a
> > button that
> > >> says:
> > >>
> > >> "Export to PDF"
> > >>
> > >> The code would look like this:
> > >>
> > >> 
> > >> 
> > >> 
> > >>
> > >> When the user clicks on the button, the action "exportToPdf.do"
> > opens an
> > >> ServletOutputStream and writes whatever you want. The headers
> > are also
> > >> set to the content-type you want and the format you want (inline or
> > >> attachment).
> > >>
> > >> Aladin
> > >>
> > >>
> > >> > Hey all
> > >> >
> > >> > is it possible to forme my struts app to open up a second browser
> > >> window
> > >> > for
> > >> > the purpose of streaming a different content type (like a pdf
> > file)
> > >> into
> > >> > it
> > >> > while maintaining the page in the original browser?
> > >> >
> > >> > Essentially, I have a nicely rendered HTML report in browser
> > "a" and
> > >> when
> > >> > the user clicks "export to PDF" or "export to excel" I want a NEW
> > >> browser
> > >> > to
> > >> > pop up into which I will send the response with the headerType
> > set to
> > >> the
> > >> > appropriate type.
> > >> >
> > >> > the generation of the XL and PDF is handled for me, but the
> > app flow
> > >> is
> > >> > where Im foggy.
> > >> >
> > >> > anyone done this?
> > >> >
> > >> > --
> > >> > -Dave
> > >> > [EMAIL PROTECTED] 
> > >> >
> > >>
> > >>
> > >
> > >
> > > --
> > > -Dave
> > > [EMAIL PROTECTED] 
> > >
> >
> >
> >
> >
> > --
> > -Dave
> > [EMAIL PROTECTED] 
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 


-- 
-Dave
[EMAIL PROTECTED]


RE: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread Benedict, Paul C
Return null.

Returning null means you have handled the response and Struts will do no
more.

-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 5:47 PM
To: Frank W. Zammetti; Struts Users Mailing List
Subject: Re: Opening a NEW browser for a 2nd content type from an action


Okay, I've got it opening the second browser (finally got back to it) using 
the target="_new" in the form declaration, but here's the real problem

I'm in the action class, and I can can work on the response using

response.setContentType("application/pdf");
response.setHeader("Content-disposition", "inline" ); 

BUT, when I get to the end of my action class, what do I return? I cant 
return to a JSP page because I've set the content type to be PDF (or excel)

So, instead of 

mapping.findForward("success");

what can I do?

On 5/12/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> 
> Ugh, I always forget the simple target attribute! Absolutely agreed,
> that's probably the best approach.
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> On Thu, May 12, 2005 11:16 am, David Johnson said:
> > whoa that's simple. I'm trying that first Thanks
> >
> > One things though, I'll have to set the "target" conditionally, only 
> when
> > the user clicks "PDF" or "EXCEL" since I dont **always** want it opening

> a
> > new window...
> >
> > function setTarget(target) {
> > document.forms[0].target=target;
> > }
> >
> > On 5/12/05, Aladin Alaily <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi Dave,
> >>
> >> This is pretty straightforward. In browser "a", you have a button that
> >> says:
> >>
> >> "Export to PDF"
> >>
> >> The code would look like this:
> >>
> >> 
> >> 
> >> 
> >>
> >> When the user clicks on the button, the action "exportToPdf.do" opens 
> an
> >> ServletOutputStream and writes whatever you want. The headers are also
> >> set to the content-type you want and the format you want (inline or
> >> attachment).
> >>
> >> Aladin
> >>
> >>
> >> > Hey all
> >> >
> >> > is it possible to forme my struts app to open up a second browser
> >> window
> >> > for
> >> > the purpose of streaming a different content type (like a pdf file)
> >> into
> >> > it
> >> > while maintaining the page in the original browser?
> >> >
> >> > Essentially, I have a nicely rendered HTML report in browser "a" and
> >> when
> >> > the user clicks "export to PDF" or "export to excel" I want a NEW
> >> browser
> >> > to
> >> > pop up into which I will send the response with the headerType set to
> >> the
> >> > appropriate type.
> >> >
> >> > the generation of the XL and PDF is handled for me, but the app flow
> >> is
> >> > where Im foggy.
> >> >
> >> > anyone done this?
> >> >
> >> > --
> >> > -Dave
> >> > [EMAIL PROTECTED]
> >> >
> >>
> >>
> >
> >
> > --
> > -Dave
> > [EMAIL PROTECTED]
> >
> 
> 


-- 
-Dave
[EMAIL PROTECTED]



--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread David Johnson
Okay, I've got it opening the second browser (finally got back to it) using 
the target="_new" in the form declaration, but here's the real problem

I'm in the action class, and I can can work on the response using

response.setContentType("application/pdf");
response.setHeader("Content-disposition", "inline" ); 

BUT, when I get to the end of my action class, what do I return? I cant 
return to a JSP page because I've set the content type to be PDF (or excel)

So, instead of 

mapping.findForward("success");

what can I do?

On 5/12/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> 
> Ugh, I always forget the simple target attribute! Absolutely agreed,
> that's probably the best approach.
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> On Thu, May 12, 2005 11:16 am, David Johnson said:
> > whoa that's simple. I'm trying that first Thanks
> >
> > One things though, I'll have to set the "target" conditionally, only 
> when
> > the user clicks "PDF" or "EXCEL" since I dont **always** want it opening 
> a
> > new window...
> >
> > function setTarget(target) {
> > document.forms[0].target=target;
> > }
> >
> > On 5/12/05, Aladin Alaily <[EMAIL PROTECTED]> wrote:
> >>
> >> Hi Dave,
> >>
> >> This is pretty straightforward. In browser "a", you have a button that
> >> says:
> >>
> >> "Export to PDF"
> >>
> >> The code would look like this:
> >>
> >> 
> >> 
> >> 
> >>
> >> When the user clicks on the button, the action "exportToPdf.do" opens 
> an
> >> ServletOutputStream and writes whatever you want. The headers are also
> >> set to the content-type you want and the format you want (inline or
> >> attachment).
> >>
> >> Aladin
> >>
> >>
> >> > Hey all
> >> >
> >> > is it possible to forme my struts app to open up a second browser
> >> window
> >> > for
> >> > the purpose of streaming a different content type (like a pdf file)
> >> into
> >> > it
> >> > while maintaining the page in the original browser?
> >> >
> >> > Essentially, I have a nicely rendered HTML report in browser "a" and
> >> when
> >> > the user clicks "export to PDF" or "export to excel" I want a NEW
> >> browser
> >> > to
> >> > pop up into which I will send the response with the headerType set to
> >> the
> >> > appropriate type.
> >> >
> >> > the generation of the XL and PDF is handled for me, but the app flow
> >> is
> >> > where Im foggy.
> >> >
> >> > anyone done this?
> >> >
> >> > --
> >> > -Dave
> >> > [EMAIL PROTECTED]
> >> >
> >>
> >>
> >
> >
> > --
> > -Dave
> > [EMAIL PROTECTED]
> >
> 
> 


-- 
-Dave
[EMAIL PROTECTED]


Re: [POLL] What do you use action forms for?

2005-05-12 Thread Leon Rosenberg
Maybe I'm repeating myself, but I give myself a last try :-) 
 

> -Ursprüngliche Nachricht-
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 12. Mai 2005 21:43
> An: Struts Users Mailing List
> Betreff: Re: [POLL] What do you use action forms for?
> 
> On 5/12/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> > Well the question was, why to use ActionForm if a POJO will 
> do it es well?
> 
> Umm... No reason, unless one wants to use same ActionForm for 
> input, edit, view, etc.

Well I'm a beliefer of  design by responsibility. When I design an
application I identify responsibilities to form and define components,
modules and layers. Therefore I like each class to have a clear contract. 
As Frank said it may be a balancing act, but experience teached me, that
it's better to have 50 small classes with clearly defined 
contracts then 10 butterflies. I don't like to create unnecessary
dependencies, if I have to change a page, I change the action
which prepares the page, the bean, which is used in this page and the jsp. I
don't want to care about, where do I use this bean either.


> > And keeping current object in session isn't a solution to 
> all problems...
> > 
> > Just to give you an example, in our current application we 
> have about 
> > 5000-7000 active session on each webserver. We have tons of 
> object, so 
> > if we would keep _EVERYTHING_ in session, what amount of ram the 
> > server would need?
> 
> With 10K per session that would be 70 Megs. Not much. Also, I 
> store only one object per session, this is why it is current. 
> But I do not have to deal with 7000 sessions simultaneously :)
> 
> On the other hand, you need to keep request data somewhere as 
> well. It is the same RAM. Ok, request is cleaned 
> automatically, session is not.
> To help with that, I have certain modes/pages, which 
> invalidate session. Like, if I load item list, I invalidate 
> current item. That is, I remove it from the session. I do not 
> think that all users look at the item, and then leave the 
> site. They might go to the list, and then leave the site ;) 
> Also, session timeout can be adjusted.
> 

Well it maybe get too detailed, but if you keep objects in sessions instead
of request you are actually working against the garbage collector. Objects
in request are freed as soon, as the request is served. Since most
application has less use cases then requests, the 
chances aren't bad, that similar request (request to same action) will come
in shortly. With the modern garbage collector, the vm can
'reuse' the object scheduled to collection without actually manipulating the
heap. At least in theorie you can reduce the effort for 
proper garbage collection run to a minimum.

If objects are stored in sessions on the other hand, this process becomes
more asynchronous, and you can't use natural dynamics of user's behaviour to
your advantage.

Other, very powerful anti-session-argument is concurrency. If your session
object actually represent a business data object, which is 
managed by some business logic components or stored in the db (or both) you
have to watch for changes done by other users/actors. This mean that you
actually have to notify the webservers about any changes to the objects (or
implement very complicated locking mechanism), so they can clean their
session-object-cache. It's just an additional effort, and it's often faster
and easier to get a new copy of the object on request, as to maintain and
synchronize that kind of cache. 

> I am not saying here that my approach is the best. But I do 
> not think that it is a "bad practice" either :)

No we just discussing it, and it is surely suitable for some applications,
but it also brings enough problems to keep it off the "best practices" in my
opinion :-))) 

Regards
Leon

> 
> Michael.
> 
> P.S. If a problem can be solved by adding more RAM, it is not 
> a real problem ;) This is what Microsoft keeps proving with 
> Windows: 640K, 1M, 4M, 16M, 64M... But people still use it, 
> they just put more memory in their machines. Someone can 
> still advertise OS which fits on one floppy and has 
> full-blown GUI, multitasking, etc. But who cares, if 
> polishing assembly code takes so much more than simply using VB?
> 

I'm using a linux software router at home, which fits on a floppy. The
advantage is, that it's booting fast and is copy-protected, 
so noone can modify my configs for longer then reboot time. But it's very
offtopic now :-)




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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Leon Rosenberg
Maybe I'm repeating myself, but I give myself a last try :-) 
 

> -Ursprüngliche Nachricht-
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 12. Mai 2005 21:43
> An: Struts Users Mailing List
> Betreff: Re: [POLL] What do you use action forms for?
> 
> On 5/12/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> > Well the question was, why to use ActionForm if a POJO will 
> do it es well?
> 
> Umm... No reason, unless one wants to use same ActionForm for 
> input, edit, view, etc.

Well I'm a beliefer of  design by responsibility. When I design an
application I identify responsibilities to form and define components,
modules and layers. Therefore I like each class to have a clear contract. 
As Frank said it may be a balancing act, but experience teached me, that
it's better to have 50 small classes with clearly defined 
contracts then 10 butterflies. I don't like to create unnecessary
dependencies, if I have to change a page, I change the action
which prepares the page, the bean, which is used in this page and the jsp. I
don't want to care about, where do I use this bean either.


> > And keeping current object in session isn't a solution to 
> all problems...
> > 
> > Just to give you an example, in our current application we 
> have about 
> > 5000-7000 active session on each webserver. We have tons of 
> object, so 
> > if we would keep _EVERYTHING_ in session, what amount of ram the 
> > server would need?
> 
> With 10K per session that would be 70 Megs. Not much. Also, I 
> store only one object per session, this is why it is current. 
> But I do not have to deal with 7000 sessions simultaneously :)
> 
> On the other hand, you need to keep request data somewhere as 
> well. It is the same RAM. Ok, request is cleaned 
> automatically, session is not.
> To help with that, I have certain modes/pages, which 
> invalidate session. Like, if I load item list, I invalidate 
> current item. That is, I remove it from the session. I do not 
> think that all users look at the item, and then leave the 
> site. They might go to the list, and then leave the site ;) 
> Also, session timeout can be adjusted.
> 

Well it maybe get too detailed, but if you keep objects in sessions instead
of request you are actually working against the garbage collector. Objects
in request are freed as soon, as the request is served. Since most
application has less use cases then requests, the 
chances aren't bad, that similar request (request to same action) will come
in shortly. With the modern garbage collector, the vm can
'reuse' the object scheduled to collection without actually manipulating the
heap. At least in theorie you can reduce the effort for 
proper garbage collection run to a minimum.

If objects are stored in sessions on the other hand, this process becomes
more asynchronous, and you can't use natural dynamics of user's behaviour to
your advantage.

Other, very powerful anti-session-argument is concurrency. If your session
object actually represent a business data object, which is 
managed by some business logic components or stored in the db (or both) you
have to watch for changes done by other users/actors. This mean that you
actually have to notify the webservers about any changes to the objects (or
implement very complicated locking mechanism), so they can clean their
session-object-cache. It's just an additional effort, and it's often faster
and easier to get a new copy of the object on request, as to maintain and
synchronize that kind of cache. 

> I am not saying here that my approach is the best. But I do 
> not think that it is a "bad practice" either :)

No we just discussing it, and it is surely suitable for some applications,
but it also brings enough problems to keep it off the "best practices" in my
opinion :-))) 

Regards
Leon

> 
> Michael.
> 
> P.S. If a problem can be solved by adding more RAM, it is not 
> a real problem ;) This is what Microsoft keeps proving with 
> Windows: 640K, 1M, 4M, 16M, 64M... But people still use it, 
> they just put more memory in their machines. Someone can 
> still advertise OS which fits on one floppy and has 
> full-blown GUI, multitasking, etc. But who cares, if 
> polishing assembly code takes so much more than simply using VB?
> 

I'm using a linux software router at home, which fits on a floppy. The
advantage is, that it's booting fast and is copy-protected, 
so noone can modify my configs for longer then reboot time. But it's very
offtopic now :-)




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



Re: how to validate when the form-property is of type="java.lang.String[]"

2005-05-12 Thread m Komma
My problem is not accessing the values but is with validator.
I have the validation working correctly if within the
struts-config.xml file the form-property type="java.lang.String"

My issue is that I can't validate when the form-property is of
type="java.lang.String[]" (I can't validate the form-property
departments in the example listed below).  Do I need to include
something in the validation.xml that indicates I am working with
type="java.lang.String[]"

struts-config.xml:

 


 

validation.xml:



   

   
   
   


Again, I have the validation working correctly when form-property is
of type="java.lang.String".  I can't however validate when the
form-property is of type="java.lang.String[]".

Mallik

On 5/12/05, David Johnson <[EMAIL PROTECTED]> wrote:
> What exactly is the problem you're having? Normally I'd say you'd loop
> through the array of values passed in thru the form bean
> 
> 
> On 5/12/05, m Komma < [EMAIL PROTECTED]> wrote:
> > 
> > Hi,
> > I have a problem using validatorplugin for multiselection box. 
> > my filed is of type  > type="java.lang.String[]" />
> > 
> > I can't validate when the form-property is of type="java.lang.String[]"
> > 
> > I have the validation working correctly when form-property is of 
> > type="java.lang.String".  I can't however validate when the
> > form-property is of type="java.lang.String[]".
> > 
> > any help is appreciated.
> > 
> > Thanks,
> > Mallik
> > 
> >
> -
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED] 
> > 
> > 
> 
> 
> 
> -- 
> -Dave
> [EMAIL PROTECTED]

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



Re: [OT] Too late to become a rock star?

2005-05-12 Thread Gareth Meyrick
hi,

Dave Newton wrote:
> 
> When we see "Perversion of Control" fronted by "Hot Dependency 
> Injection" THEN I'll be scared.

actually i'm already scared..

imagine the VU reincarnating itself to play something like "I'm waiting for
my IDE"..

'guess i'm _really_ showing my age;)

isn't today thursday?

-gm

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



Re: how to validate when the form-property is of type="java.lang.String[]"

2005-05-12 Thread David Johnson
What exactly is the problem you're having? Normally I'd say you'd loop 
through the array of values passed in thru the form bean

On 5/12/05, m Komma <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> I have a problem using validatorplugin for multiselection box.
> my filed is of type  type="java.lang.String[]" />
> 
> I can't validate when the form-property is of type="java.lang.String[]"
> 
> I have the validation working correctly when form-property is of
> type="java.lang.String". I can't however validate when the
> form-property is of type="java.lang.String[]".
> 
> any help is appreciated.
> 
> Thanks,
> Mallik
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
-Dave
[EMAIL PROTECTED]


Re: [OT] Too late to become a rock star?

2005-05-12 Thread Frank W. Zammetti
With the way my kids manipulate my wife, I'd say it's a great example of 
IoC.

Groan.
Frank
Eric C. Hein wrote:
I guess I'm relieved that Ted doesn't refer to his kids as "POJO's". :)
- Eric
Tour Manager - "No Bean Found"
- Original Message - From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Thursday, May 12, 2005 1:23 PM
Subject: Re: [OT] Too late to become a rock star?
You wouldn't be so much older than a lot of people in the audience
these days. I sometimes take the kids to all-ages shows, and I'm
always happy to find that I'm still neither the oldest nor the
spookiest guy there :)
Tomorrow night, live at the Steel Music Hall: "Midtown", "Plain White
Ts", and my personal favorite, the Struts band of the week ... "Action
Action". (No kidding.)
I'll be the one in the Apache t-shirt. :)
-Ted.
On 5/12/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
Yea, it's not Friday. Just whining (with no cheese)..
Anyone else fed up with trying to keep up with all the stuff coming out
every day in this crazy IT world  ???

I can't play an instrument or sing, but maybe it's not too late to
become a rock star at 35? I want to join a ska band.
--
Rick
-
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]


how to validate when the form-property is of type="java.lang.String[]"

2005-05-12 Thread m Komma
Hi, 
I have a problem using validatorplugin for multiselection box.
my filed is of type 

I can't validate when the form-property is of type="java.lang.String[]" 

I have the validation working correctly when form-property is of
type="java.lang.String".  I can't however validate when the
form-property is of type="java.lang.String[]".

any help is appreciated.

Thanks,
Mallik

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



Re: [OT] Too late to become a rock star?

2005-05-12 Thread Eric C. Hein
I guess I'm relieved that Ted doesn't refer to his kids as "POJO's". :)
- Eric
Tour Manager - "No Bean Found"
- Original Message - 
From: "Ted Husted" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Thursday, May 12, 2005 1:23 PM
Subject: Re: [OT] Too late to become a rock star?

You wouldn't be so much older than a lot of people in the audience
these days. I sometimes take the kids to all-ages shows, and I'm
always happy to find that I'm still neither the oldest nor the
spookiest guy there :)
Tomorrow night, live at the Steel Music Hall: "Midtown", "Plain White
Ts", and my personal favorite, the Struts band of the week ... "Action
Action". (No kidding.)
I'll be the one in the Apache t-shirt. :)
-Ted.
On 5/12/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
Yea, it's not Friday. Just whining (with no cheese)..
Anyone else fed up with trying to keep up with all the stuff coming out
every day in this crazy IT world  
???

I can't play an instrument or sing, but maybe it's not too late to
become a rock star at 35? I want to join a ska band.
--
Rick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
HTH, Ted.
-
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] Too late to become a rock star?

2005-05-12 Thread Vic Cekvenich (netsql)
tonight on mtv:
http://www.afterdawn.com/news/archive/6361.cfm
3 PPC at 3.2 ea.
.V
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Too late to become a rock star?

2005-05-12 Thread Dave Newton
Ted Husted wrote:
Tomorrow night, live at the Steel Music Hall: "Midtown", "Plain White
Ts", and my personal favorite, the Struts band of the week ... "Action
Action". (No kidding.)
 

*lol*
When we see "Perversion of Control" fronted by "Hot Dependency 
Injection" THEN I'll be scared.

Dave

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


Re: [OT] Too late to become a rock star?

2005-05-12 Thread Ted Husted
You wouldn't be so much older than a lot of people in the audience
these days. I sometimes take the kids to all-ages shows, and I'm
always happy to find that I'm still neither the oldest nor the
spookiest guy there :)

Tomorrow night, live at the Steel Music Hall: "Midtown", "Plain White
Ts", and my personal favorite, the Struts band of the week ... "Action
Action". (No kidding.)

I'll be the one in the Apache t-shirt. :)

-Ted.

On 5/12/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> Yea, it's not Friday. Just whining (with no cheese)..
> 
> Anyone else fed up with trying to keep up with all the stuff coming out
> every day in this crazy IT world  ???
> 
> I can't play an instrument or sing, but maybe it's not too late to
> become a rock star at 35? I want to join a ska band.
> 
> --
> Rick
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
HTH, Ted.

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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Frank W. Zammetti
70mb might not be much on a single server, but move to a clustered
environment and you might be in for some rude surprises...

Remember replication across the cluster... while 10k per session might not
be much, 5000-7000 sessions constantly replicating 10k across the cluster
could become an issue in the aggregate.

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

On Thu, May 12, 2005 3:43 pm, Michael Jouravlev said:
> On 5/12/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
>> Well the question was, why to use ActionForm if a POJO will do it es
>> well?
>
> Umm... No reason, unless one wants to use same ActionForm for input,
> edit, view, etc.
>
>> And keeping current object in session isn't a solution to all
>> problems...
>>
>> Just to give you an example, in our current application we have about
>> 5000-7000 active session
>> on each webserver. We have tons of object, so if we would keep
>> _EVERYTHING_
>> in session, what amount of ram the server would need?
>
> With 10K per session that would be 70 Megs. Not much. Also, I store
> only one object per session, this is why it is current. But I do not
> have to deal with 7000 sessions simultaneously :)
>
> On the other hand, you need to keep request data somewhere as well. It
> is the same RAM. Ok, request is cleaned automatically, session is not.
> To help with that, I have certain modes/pages, which invalidate
> session. Like, if I load item list, I invalidate current item. That
> is, I remove it from the session. I do not think that all users look
> at the item, and then leave the site. They might go to the list, and
> then leave the site ;) Also, session timeout can be adjusted.
>
> I am not saying here that my approach is the best. But I do not think
> that it is a "bad practice" either :)
>
> Michael.
>
> P.S. If a problem can be solved by adding more RAM, it is not a real
> problem ;) This is what Microsoft keeps proving with Windows: 640K,
> 1M, 4M, 16M, 64M... But people still use it, they just put more memory
> in their machines. Someone can still advertise OS which fits on one
> floppy and has full-blown GUI, multitasking, etc. But who cares, if
> polishing assembly code takes so much more than simply using VB?
>
> Don't want to start a flame. Just an opinion.
>
> -
> 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: [POLL] What do you use action forms for?

2005-05-12 Thread Dave Newton
Michael Jouravlev wrote:
P.S. If a problem can be solved by adding more RAM, it is not a real
problem ;) This is what Microsoft keeps proving with Windows: 640K,
1M, 4M, 16M, 64M... But people still use it, they just put more memory
in their machines. Someone can still advertise OS which fits on one
floppy and has full-blown GUI, multitasking, etc. But who cares, if
polishing assembly code takes so much more than simply using VB?
 

OS-9, QNX. Not quite a floppy (any more), but pretty small for the power :)
I still remember running OS-9 on a Tandy CoCo and running rings around 
anything else at the time with a substantially lower-power CPU at a 
lower clock rate and having substantially better multitasking.

Of course, rapidly inserting/removing RAM cartridges to implement the 
virtual memory kinda sucked.

Dave

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


Re: [POLL] What do you use action forms for?

2005-05-12 Thread Michael Jouravlev
On 5/12/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> Well the question was, why to use ActionForm if a POJO will do it es well?

Umm... No reason, unless one wants to use same ActionForm for input,
edit, view, etc.

> And keeping current object in session isn't a solution to all problems...
> 
> Just to give you an example, in our current application we have about
> 5000-7000 active session
> on each webserver. We have tons of object, so if we would keep _EVERYTHING_
> in session, what amount of ram the server would need?

With 10K per session that would be 70 Megs. Not much. Also, I store
only one object per session, this is why it is current. But I do not
have to deal with 7000 sessions simultaneously :)

On the other hand, you need to keep request data somewhere as well. It
is the same RAM. Ok, request is cleaned automatically, session is not.
To help with that, I have certain modes/pages, which invalidate
session. Like, if I load item list, I invalidate current item. That
is, I remove it from the session. I do not think that all users look
at the item, and then leave the site. They might go to the list, and
then leave the site ;) Also, session timeout can be adjusted.

I am not saying here that my approach is the best. But I do not think
that it is a "bad practice" either :)

Michael.

P.S. If a problem can be solved by adding more RAM, it is not a real
problem ;) This is what Microsoft keeps proving with Windows: 640K,
1M, 4M, 16M, 64M... But people still use it, they just put more memory
in their machines. Someone can still advertise OS which fits on one
floppy and has full-blown GUI, multitasking, etc. But who cares, if
polishing assembly code takes so much more than simply using VB?

Don't want to start a flame. Just an opinion.

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



RE: [POLL] What do you use action forms for?

2005-05-12 Thread Benedict, Paul C
Rick, what do you mean? It sounds like you have an answer.

-Original Message-
From: Rick Reumann [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 3:38 PM
To: Struts Users Mailing List
Subject: Re: [POLL] What do you use action forms for?


Benedict, Paul C wrote the following on 5/12/2005 3:25 PM:

> My biggest problem with session based forms is that, without a special
> mechanism,  it prevents multiple instances of a form from being edited at
> once within a session. 

Not really, because I can just call form.reset() (or assign the formBean 
instance to brand new ActionForm) in the Action that I go to before I 
forward on to capture the user input.

-- 
Rick





--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Rick Reumann
Benedict, Paul C wrote the following on 5/12/2005 3:25 PM:
My biggest problem with session based forms is that, without a special
mechanism,  it prevents multiple instances of a form from being edited at
once within a session. 
Not really, because I can just call form.reset() (or assign the formBean 
instance to brand new ActionForm) in the Action that I go to before I 
forward on to capture the user input.

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


RE: [POLL] What do you use action forms for?

2005-05-12 Thread Benedict, Paul C
Leon,

My biggest problem with session based forms is that, without a special
mechanism,  it prevents multiple instances of a form from being edited at
once within a session. 

Am I the only one with this concern? ;-)

Paul

-Original Message-
From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 3:20 PM
To: 'Struts Users Mailing List'; 'Michael Jouravlev'
Subject: Re: [POLL] What do you use action forms for?


Well the question was, why to use ActionForm if a POJO will do it es well?

And keeping current object in session isn't a solution to all problems... 

Just to give you an example, in our current application we have about
5000-7000 active session 
on each webserver. We have tons of object, so if we would keep _EVERYTHING_
in session, what amount of ram the server would need?

Regards
Leon

> -Ursprüngliche Nachricht-
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 12. Mai 2005 19:20
> An: Struts Users Mailing List
> Betreff: Re: [POLL] What do you use action forms for?
> 
> Oops, I don't know why did I mention going back again. I 
> guess, I am too fixated on that. I am sorry.
> 
> Anyway, just to reiterate, I have a "current object" in the session.
> "Current" means "currenty being used" whatever that means for you.
> Object has an ID. I pass this ID to any action which uses this object.
> It can be edit action, or view action or delete action or 
> store action.
> 
> Returning to the book example. I don't know what the authors list for
> :) But whatever, I would have two objects: book itself and 
> authors list. For the first page I would have two references 
> in the form bean:
> to book object and to authors collection. When I select 
> author from a collection, its name would go to the book object.
> 
> So, book is a "current object". I can edit it, view it, 
> persist it, delete it. It sits in the session, updated. If I 
> want to display a book on the next page, I just show the 
> book, which already has author in it. If I want to edit it, I 
> show it on edit page, and load the author collection again.
> 
> And, returning to my object of fixation: if I go back to the 
> book edit page, the book will have author preset, simply 
> because I display the object's fields, not because I take 
> efforts to prepopulate form's fields.
> 
> Right, this is another thing that I do not do: I do not 
> prepopulate form bean's fields.
> 
> On 5/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > Summing all up, I can describe the approach I use:
> <...deleted...>
> 
> -
> 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]





--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Leon Rosenberg
Well the question was, why to use ActionForm if a POJO will do it es well?

And keeping current object in session isn't a solution to all problems... 

Just to give you an example, in our current application we have about
5000-7000 active session 
on each webserver. We have tons of object, so if we would keep _EVERYTHING_
in session, what amount of ram the server would need?

Regards
Leon

> -Ursprüngliche Nachricht-
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 12. Mai 2005 19:20
> An: Struts Users Mailing List
> Betreff: Re: [POLL] What do you use action forms for?
> 
> Oops, I don't know why did I mention going back again. I 
> guess, I am too fixated on that. I am sorry.
> 
> Anyway, just to reiterate, I have a "current object" in the session.
> "Current" means "currenty being used" whatever that means for you.
> Object has an ID. I pass this ID to any action which uses this object.
> It can be edit action, or view action or delete action or 
> store action.
> 
> Returning to the book example. I don't know what the authors list for
> :) But whatever, I would have two objects: book itself and 
> authors list. For the first page I would have two references 
> in the form bean:
> to book object and to authors collection. When I select 
> author from a collection, its name would go to the book object.
> 
> So, book is a "current object". I can edit it, view it, 
> persist it, delete it. It sits in the session, updated. If I 
> want to display a book on the next page, I just show the 
> book, which already has author in it. If I want to edit it, I 
> show it on edit page, and load the author collection again.
> 
> And, returning to my object of fixation: if I go back to the 
> book edit page, the book will have author preset, simply 
> because I display the object's fields, not because I take 
> efforts to prepopulate form's fields.
> 
> Right, this is another thing that I do not do: I do not 
> prepopulate form bean's fields.
> 
> On 5/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > Summing all up, I can describe the approach I use:
> <...deleted...>
> 
> -
> 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: [POLL] What do you use action forms for?

2005-05-12 Thread Leon Rosenberg
Well the question was, why to use ActionForm if a POJO will do it es well?

And keeping current object in session isn't a solution to all problems... 

Just to give you an example, in our current application we have about
5000-7000 active session 
on each webserver. We have tons of object, so if we would keep _EVERYTHING_
in session, what amount of ram the server would need?

Regards
Leon

> -Ursprüngliche Nachricht-
> Von: Michael Jouravlev [mailto:[EMAIL PROTECTED] 
> Gesendet: Donnerstag, 12. Mai 2005 19:20
> An: Struts Users Mailing List
> Betreff: Re: [POLL] What do you use action forms for?
> 
> Oops, I don't know why did I mention going back again. I 
> guess, I am too fixated on that. I am sorry.
> 
> Anyway, just to reiterate, I have a "current object" in the session.
> "Current" means "currenty being used" whatever that means for you.
> Object has an ID. I pass this ID to any action which uses this object.
> It can be edit action, or view action or delete action or 
> store action.
> 
> Returning to the book example. I don't know what the authors list for
> :) But whatever, I would have two objects: book itself and 
> authors list. For the first page I would have two references 
> in the form bean:
> to book object and to authors collection. When I select 
> author from a collection, its name would go to the book object.
> 
> So, book is a "current object". I can edit it, view it, 
> persist it, delete it. It sits in the session, updated. If I 
> want to display a book on the next page, I just show the 
> book, which already has author in it. If I want to edit it, I 
> show it on edit page, and load the author collection again.
> 
> And, returning to my object of fixation: if I go back to the 
> book edit page, the book will have author preset, simply 
> because I display the object's fields, not because I take 
> efforts to prepopulate form's fields.
> 
> Right, this is another thing that I do not do: I do not 
> prepopulate form bean's fields.
> 
> On 5/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> > Summing all up, I can describe the approach I use:
> <...deleted...>
> 
> -
> 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]



Verified by Visa, MasterCard Secure Code and Struts

2005-05-12 Thread Andrew Thorell
Greetings all,

Based on the subject line has anyone had any problems implementing
these systems together? Anything I should keep an eye out for?

thanks,

Andrew

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



Re: How to get the ActionErrors object from the request

2005-05-12 Thread Mehmet E.

http://javaboutique.internet.com/tutorials/excep_struts/

A good article 
Handling Messages, Errors and Exceptions in Struts 1.1


> Hi
>  
> Does somebody know how I can get the ActionErrors
> object from the request???
>  
> Regards,
>  
> Néstor Boscán
> 

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

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



RE: How to get the ActionErrors object from the request

2005-05-12 Thread Freddy Villalba A.
Hello,

There is the "nice" way (tags) - which I deduce from a previous posting you
already know - and then there are many "dirty" ways. For instance, you can
access it directly. However, in that case, you have to find out the key
under which Struts stores that object. There is one, that I can assure
you... however, I can't remember what it was. Anyway, it's quite easy to
sort it out (print out all key-value pairs).

There is another shortcut you can take: take a look at the code behind the
tags and "imitate" that code...

I'm sure there must be plenty of other ways to accomplish this... but these
are the 2 I remember at the moment (I'm a bit rusty, I know...)

My 2 cents.

-Mensaje original-
De: Néstor Boscán [mailto:[EMAIL PROTECTED]
Enviado el: jueves, 12 de mayo de 2005 17:28
Para: 'Struts Users Mailing List'
Asunto: How to get the ActionErrors object from the request


Hi

Does somebody know how I can get the ActionErrors object from the request???

Regards,

Néstor Boscán


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



Re: Best practice for redirecting on session timeout?[Scanned]

2005-05-12 Thread Frank W. Zammetti
Sorry, I lost track of the thread (stupid webmail interface!)... can you
outline your method again?

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

On Thu, May 12, 2005 1:39 pm, David Johnson said:
> So, how what would you all say about my method? does this seem to be a
> valid
> method for controlling this?
>
> On 5/12/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>>
>> Good point Aladin...
>>
>> However, I would take this a step further...
>>
>> in pre-1.3 Struts, you might not want to implement your own RP for
>> various
>> reasons, so I would suggest doing this in a filter instead... Same
>> benefit
>> as modifying the RP, but doesn't touch Struts code and is also more
>> portable... should you ever want to not use Struts for some reason, you
>> don't have to worry about re-implementing your auth check.
>>
>> In 1.3, you could probably make a good argument for modifying the RP
>> chain, certainly that's what your meant to be able to do!, but I think
>> the
>> same good reasons for using a filter would still apply there.
>>
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>>
>> On Thu, May 12, 2005 10:57 am, [EMAIL PROTECTED] said:
>> > Hi,
>> >
>> > This approach would work as well. I just think that if you're going to
>> do
>> > this in struts, it's better to do it in the RequestProcessor. Why?
>> > Assume that you are using the forward action defined in struts. If my
>> > session has timedout and I click on a link that uses the forward
>> action,
>> I
>> > will still see the page. This is because your BaseAction is never
>> called.
>> > On the other hand, if you had checked the request in the
>> > RequestProcessor, I would have been blocked. This is because *ALL*
>> > actions pass through the RequestProcessor... even the struts-defined
>> ones.
>> >
>> > That's the approach I would use (RequestProcessor approach) if my
>> > container didn't support filters.
>> >
>> > Aladin
>> >
>> >
>> >
>> >
>> >> I have a method in my BaseAction called "boolean checkAuth(request)".
>> >> then
>> >> in every Action I write I code this at the top
>> >>
>> >> // Check if session is active, if not redirect to login page
>> >> if( !checkAuth( request )){
>> >> log.info("*** Session has timed out ***");
>> >> errors.add( ActionErrors.GLOBAL_ERROR, new ActionError("
>> >> error.expired.session") );
>> >> saveErrors(request, errors);
>> >> return
>> >> (mapping.findForward(ApplicationConstants.APP_FORWARD_INVALID_SESSION
>> ));
>> >>
>> >> }
>> >>
>> >> seems to work fine.
>> >>
>> >> On 5/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> >>>
>> >>> Although this approach might work, I don't like it so much. The
>> >>> reasons:
>> >>>
>> >>> 1) Maintainability: if you want to change the timeout to 30 minutes
>> >>> (and
>> >>> you have 50 jsp pages), then you have to make the change 50 times.
>> >>>
>> >>> 2) Business Logic: This approach will never prevent you Action from
>> >>> executing. Since you have to go through an action to reach the jsp
>> >>> page,
>> >>> when the *page* reloads, you are actually reloading the action
>> first.
>> >>> Having said that, if your action does something that should only be
>> >>> executed if your session has not expired, your approach will not
>> work.
>> >>>
>> >>> A combination of using a filter & session-config (in web.xml) solves
>> >>> both
>> >>> problems above. How?
>> >>>
>> >>> 1) You only have to change the session timeout setting in one place.
>> >>>
>> >>> 2) Your filter is executed before anything else. Hence, you never
>> have
>> >>> to
>> >>> worry about an action being executed unintentionally.
>> >>>
>> >>> Aladin
>> >>>
>> >>>
>> >>> > That's easy, just drop this in all of your JSPs (preferrably via
>> an
>> >>> > include
>> >>> > or let a filter do it for you).
>> >>> >
>> >>> > (assuming your session timeout is 20 minutes)
>> >>> >
>> >>> > 
>> >>> >
>> >>> > You should be handling invalid/expired session state in your
>> >>> application
>> >>> > and
>> >>> > by using the above technique, it will work universally, whether
>> you
>> >>> are
>> >>> > managing sessions from your actions, CMS, or some other service
>> >>> outside
>> >>> of
>> >>> > the conatiner, such as a product like SiteMinder by Netegrity.
>> >>> >
>> >>> > This will _force_ the browser to do a refresh of the page after
>> 1200
>> >>> > seconds
>> >>> > (20 minutes), which will allow your app to handle the request
>> (from
>> a
>> >>> now
>> >>> > expired session) the same as it would if the user had initiated
>> the
>> >>> > request
>> >>> > giving a hint of being on a rich client where such events are
>> easily
>> >>> > handled.
>> >>> >
>> >>> >
>> >>> >
>> >>> >
>> >>> > --
>> >>> > James Mitchell
>> >>> > Software Engineer / Open Source Evangelist
>> >>> > Consulting / Mentoring / Freelance
>> >>> > EdgeTech, Inc.
>> >>> > http://www.edgetechservices.net/
>> >>> 

Re: Best practice for redirecting on session timeout?[Scanned]

2005-05-12 Thread David Johnson
So, how what would you all say about my method? does this seem to be a valid 
method for controlling this?

On 5/12/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> 
> Good point Aladin...
> 
> However, I would take this a step further...
> 
> in pre-1.3 Struts, you might not want to implement your own RP for various
> reasons, so I would suggest doing this in a filter instead... Same benefit
> as modifying the RP, but doesn't touch Struts code and is also more
> portable... should you ever want to not use Struts for some reason, you
> don't have to worry about re-implementing your auth check.
> 
> In 1.3, you could probably make a good argument for modifying the RP
> chain, certainly that's what your meant to be able to do!, but I think the
> same good reasons for using a filter would still apply there.
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> On Thu, May 12, 2005 10:57 am, [EMAIL PROTECTED] said:
> > Hi,
> >
> > This approach would work as well. I just think that if you're going to 
> do
> > this in struts, it's better to do it in the RequestProcessor. Why?
> > Assume that you are using the forward action defined in struts. If my
> > session has timedout and I click on a link that uses the forward action, 
> I
> > will still see the page. This is because your BaseAction is never 
> called.
> > On the other hand, if you had checked the request in the
> > RequestProcessor, I would have been blocked. This is because *ALL*
> > actions pass through the RequestProcessor... even the struts-defined 
> ones.
> >
> > That's the approach I would use (RequestProcessor approach) if my
> > container didn't support filters.
> >
> > Aladin
> >
> >
> >
> >
> >> I have a method in my BaseAction called "boolean checkAuth(request)".
> >> then
> >> in every Action I write I code this at the top
> >>
> >> // Check if session is active, if not redirect to login page
> >> if( !checkAuth( request )){
> >> log.info("*** Session has timed out ***");
> >> errors.add( ActionErrors.GLOBAL_ERROR, new ActionError("
> >> error.expired.session") );
> >> saveErrors(request, errors);
> >> return
> >> (mapping.findForward(ApplicationConstants.APP_FORWARD_INVALID_SESSION
> ));
> >>
> >> }
> >>
> >> seems to work fine.
> >>
> >> On 5/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >>>
> >>> Although this approach might work, I don't like it so much. The
> >>> reasons:
> >>>
> >>> 1) Maintainability: if you want to change the timeout to 30 minutes
> >>> (and
> >>> you have 50 jsp pages), then you have to make the change 50 times.
> >>>
> >>> 2) Business Logic: This approach will never prevent you Action from
> >>> executing. Since you have to go through an action to reach the jsp
> >>> page,
> >>> when the *page* reloads, you are actually reloading the action first.
> >>> Having said that, if your action does something that should only be
> >>> executed if your session has not expired, your approach will not work.
> >>>
> >>> A combination of using a filter & session-config (in web.xml) solves
> >>> both
> >>> problems above. How?
> >>>
> >>> 1) You only have to change the session timeout setting in one place.
> >>>
> >>> 2) Your filter is executed before anything else. Hence, you never have
> >>> to
> >>> worry about an action being executed unintentionally.
> >>>
> >>> Aladin
> >>>
> >>>
> >>> > That's easy, just drop this in all of your JSPs (preferrably via an
> >>> > include
> >>> > or let a filter do it for you).
> >>> >
> >>> > (assuming your session timeout is 20 minutes)
> >>> >
> >>> > 
> >>> >
> >>> > You should be handling invalid/expired session state in your
> >>> application
> >>> > and
> >>> > by using the above technique, it will work universally, whether you
> >>> are
> >>> > managing sessions from your actions, CMS, or some other service
> >>> outside
> >>> of
> >>> > the conatiner, such as a product like SiteMinder by Netegrity.
> >>> >
> >>> > This will _force_ the browser to do a refresh of the page after 1200
> >>> > seconds
> >>> > (20 minutes), which will allow your app to handle the request (from 
> a
> >>> now
> >>> > expired session) the same as it would if the user had initiated the
> >>> > request
> >>> > giving a hint of being on a rich client where such events are easily
> >>> > handled.
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > James Mitchell
> >>> > Software Engineer / Open Source Evangelist
> >>> > Consulting / Mentoring / Freelance
> >>> > EdgeTech, Inc.
> >>> > http://www.edgetechservices.net/
> >>> > 678.910.8017
> >>> > AIM: jmitchtx
> >>> > Yahoo: jmitchtx
> >>> > MSN: [EMAIL PROTECTED]
> >>> >
> >>> >
> >>> >
> >>> >
> >>> > - Original Message -
> >>> > From: "Adam Lipscombe" <[EMAIL PROTECTED]>
> >>> > To: "'Struts Users Mailing List'" 
> >>> > Sent: Thursday, May 12, 2005 6:19 AM
> >>> > Subject: Best practice for redirecting on session timeout?
> >>> >
> >>> >
> >>> >> Folks,
> >>> >>
> >>> >>
> >>

Re: [POLL] What do you use action forms for?

2005-05-12 Thread Michael Jouravlev
Oops, I don't know why did I mention going back again. I guess, I am
too fixated on that. I am sorry.

Anyway, just to reiterate, I have a "current object" in the session.
"Current" means "currenty being used" whatever that means for you.
Object has an ID. I pass this ID to any action which uses this object.
It can be edit action, or view action or delete action or store
action.

Returning to the book example. I don't know what the authors list for
:) But whatever, I would have two objects: book itself and authors
list. For the first page I would have two references in the form bean:
to book object and to authors collection. When I select author from a
collection, its name would go to the book object.

So, book is a "current object". I can edit it, view it, persist it,
delete it. It sits in the session, updated. If I want to display a
book on the next page, I just show the book, which already has author
in it. If I want to edit it, I show it on edit page, and load the
author collection again.

And, returning to my object of fixation: if I go back to the book edit
page, the book will have author preset, simply because I display the
object's fields, not because I take efforts to prepopulate form's
fields.

Right, this is another thing that I do not do: I do not prepopulate
form bean's fields.

On 5/12/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> Summing all up, I can describe the approach I use:
<...deleted...>

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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Michael Jouravlev
But #5 is better in this regard, is not it? ;) Do you think #5 is worse than #2?

On 5/12/05, Leon Rosenberg <[EMAIL PROTECTED]> wrote:
> As you see, you don't need the BookForm to present a Book, since you
> need other properties for presentation, as for editing.
> So if you are working with scenario #4 and reusing BookForm here, you
> are actually _misusing_ the BookForm. Further, it's a bad design
> approach, because, if you need to change the search result page and add
> or remove some properties (a book rating by other users etc), you are
> changing the edit dialog too, without actually knowing it (or exlicitely
> search, aehm, where do i use this form?).
> 
> That's why I think, that scenario #4 is actually a bad choice, because
> it creates dependencies, which are very hard to manage (especially after
> some months).

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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Michael Jouravlev
Whew! Thank you all for responses. I am sorry that I confuse some of
you. Now I kind of got confused myself, because there are some usages
I did not even thought of :)

First, the things that I can state for sure.

* I started to use Struts when I had rather vague knowledge about
servlets/JSPs, so it was easier and simpler for me to understand the
idea, that a form bean belongs to action, and if I want to obtain data
or to dislpay data, I should put it in the bean. It seemed...
observable. Putting it somewhere out of the form bean seemed like
shooting it in the outer space :) Thus, I got used to #4. Then, when I
felt that I had too much different data in one bean, I came up with
#5.

* Reloading a page in case of error by forwarding to "input" location
does not mean that a form bean is used as "output". Error handling is
kind of special case, which allows to retain form values and redisplay
them along with errors. But it is still an "input" form bean for me.

* for me, using form bean as "output" means, that you do not stick
your DTO or business delegate directly to request or session, but
either put a reference to it in the form bean, or copy it field by
field into the form bean. Then you display whatever is accessible from
the form bean.

> For Input, I take the details in via a form, like most
> I assume; For Viewing/Editing or Amending I take a POJO 
> from Hibernate and then using PropertyUtils copy the data
> from the POJO to the Form and then use the form to display
> as either text (for Viewing) or as objects (for Editing).
> This ensures that I do not have to cater for two types 
> of object (POJO and Form) within the JSP;

This is so different from what I do :) I use what is called BTO, I
guess. I do not use plain DTOs, do not see point in them. I need not
just data, but business rules as well available on web layer, so I use
normal business objects to handle my input and output data.

I do not really care is it viewing or editing or creating a new
object. I just create a new business object (or load a copy of it from
database) and stick it in the session. I can update it, no problem.
Even if input data is wrong and object cannot be persisted, I still
update it with input data, because it is a _copy_ or real persistent
object. Then I either discard it or persist it.

Viewing or editing mode is basically limited by JSP.

> I would think the essential question is whether people use ActionForms to
> 
> 1) Harvest or populate only the default values of form controls.
> 2)  Populate other page members, such as the items displayed on
> a drop-down lists.

I used to use it for (2) as well. But now I store all my object data
including lists in a single business object. And I usually have a
reference to this business object from a form bean.

> Some of you needs a struts mentor ;-)
> 
> You use display any bean or collection in struts, if it's RO, 
> you don't use formBeans and you use JSTL/displaytag.
> If you edit, update, insert, etc, you have to use and map 
> a form bean and html tag.

I don't want to use two sets of tags. I know Struts tags and I use
them. I do not use JSTL.

> Michael, is #4 clear?? I think people are misunderstanding it. 
> Developers can use a form for input and output (#4/1), 
> but not put display (pure output) data in there (#4/2). 
> The difference is between an edit and view page.

Um... I personally do not differentiate between edit and view model in
the application. For me, this is just object. Whatever you can do with
it, depends on particular JSP and its tags. So, for me edit and view
is the same ;) Of course, I usually do not use HTML form for viewing,
but I access my object in the same manner as for editing, that is,
through the reference on a form bean. It just seems simple and more
uniform to me.

> It might be helpfult to clarify whether by output we mean 
> output that is being used within the  tags, 
> or any arbitrary dynamic output.

I thought, both. I do not know how to treat the "border" case, when
you have all your data in business object or DTO, but have a reference
to this object on a form bean, thus using nested properties. I
consider this as using form bean for output as well. I usually use
this approach.

> This is my point too. I think the majority of people 
> answered #4 because data within  tags is I/O, 
> but it's not the type of output (i.e., arbitrary display 
> output) I think Michael was trying to convey.

If you can access the object, that you display on the result page,
from the form bean either as a simple property or as a nested
property, this is still "using form bean for output" for me. I do not
care is it in the form or not ;)

> Most people I think agree with the idea of a single object 
> communicating between the control and the model, i.e., 
> I don't see too many people saying we should have one object
> that goes TO a business delegate and one
> that comes FROM that delegate, i.e., two DTOs per model call,
> although I suppose there

RE: [OT] Too late to become a rock star?

2005-05-12 Thread Frank W. Zammetti
On Thu, May 12, 2005 12:35 pm, Pilgrim, Peter said:
> How did the Rolling Stone make over the last decade?
> One billion smackers, reportedly!

Exception to the rule.  There's more of those, but that's what they are. 
For every 10 wastes of airspace on the radio there is 1 good talent.  And
I'm probably being kind.

Actually, no I'm not, I'm starting to sound like Simon Cowell, which is to
say NOT kind, but also right more often than not :)

Oh, and before anyone says it... clearly I was not an exception to the
rule myself, otherwise I'd be making the millions instead of talking about
it on this list :)

> I suppose you can ship tune on-line, rather than be involved
> with a label or publisher until you hit the big time.

That is starting to become an option... maybe not shipping online, but
certainly you can do far more yourself independantly than you ever could
before because of the Internet.  If I was still an active musician I'd
probably be pretty happy with what I could do now without needing a label
so much.

-- 
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: [OT] Too late to become a rock star?

2005-05-12 Thread Dave Newton
Rick Reumann wrote:
Anyone else fed up with trying to keep up with all the stuff coming 
out every day in this crazy IT world  ???
At one company I worked for we kept a list of all the 
technologies/acronyms we were using on a single web project. After we 
ran off the end of a page we gave up. And that was several years ago.

Amongst the biggest issues I have with all the new technologies being 
thrust upon us all the time is that there's very rarely any real chance 
to get to know them, experiment, etc. to the degree necessary to be 
actually able to evaluate, separate the wheat from the chaff, integrate 
them into an existing envronment (when it's even practical to do so), etc.

It seems like given an appropriate amount of time to deal with the AWAH 
(Acronyms We Already Have) that considerably more robust, automagically 
documenting, blah blah blah systems could be built. Instead we have to 
spend all our time putting out fires, using technologies "half-way," 
etc. At least that's what I find _my_self doing more often than I'd prefer.

I can't play an instrument or sing, but maybe it's not too late to 
become a rock star at 35? I want to join a ska band.
Actually, not being able to play an instrument or sing is stands you in 
quite good stead for joining a ska band.

Dave

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


RE: [OT] Too late to become a rock star?

2005-05-12 Thread Pilgrim, Peter

> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
====
> 
> 
> Based on the talent of musicians as a whole over the past few years, I
> would say it's *never* too late to become a rock star.  Even 
> if one is in
> a nursing home, confined to a wheel chair and suffering from 
> any number of
> age-related ailments, one could probably break the top 40 
> these days :)
> 

How did the Rolling Stone make over the last decade? 
One billion smackers, reportedly!

> Speaking as one who was in a band for a lot of years and was actually
> presented with a contract offer (I didn't accept it and the band broke
> up... best decision I ever made!), I can say I'd much rather be in the
> crazy world of IT.  At least I can be reasonably sure I won't 
> have to pay
> back thousands of dollars to my employer when my application 
> doesn't sell
> as well as they expected :)
> 

I suppose you can ship tune on-line, rather than be involved
with a label or publisher until you hit the big time.

====

> 
> On Thu, May 12, 2005 11:55 am, Rick Reumann said:
> > Yea, it's not Friday. Just whining (with no cheese)..
> >
> > Anyone else fed up with trying to keep up with all the 
> stuff coming out
> > every day in this crazy IT world  acronyms here>
> > ???

What gets me now is stuff that just doesne install. I tried
to install ATI Graphics Driver last night. I guess what it didn't
work with the latest kernel 2.6.11.8 that I downloaded the night before.
I find I have less and less time to hang out fixing or debugging
somebody else' malware. Do you know what I mean? 

> >
> > I can't play an instrument or sing, but maybe it's not too late to
> > become a rock star at 35? I want to join a ska band.
> >
> > --
> > Rick


--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497

==
This message is for the sole use of the intended recipient. If you received 
this message in error please delete it and notify us. If this message was 
misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains 
and monitors electronic communications sent through its network. Instructions 
transmitted over this system are not binding on CSFB until they are confirmed 
by us. Message transmission is not guaranteed to be secure.
==


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



Re: [OT] Too late to become a rock star?

2005-05-12 Thread K.C. Baltz
And remember, old ska bands never die, they just can't 
pickitup-pickitup-pickitup anymore. 

(Couldn't resist the chance to use my only ska-related joke).
Rick Reumann wrote:
Yea, it's not Friday. Just whining (with no cheese)..
Anyone else fed up with trying to keep up with all the stuff coming 
out every day in this crazy IT world  ???

I can't play an instrument or sing, but maybe it's not too late to 
become a rock star at 35? I want to join a ska band.

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


Re: [OT] Too late to become a rock star?

2005-05-12 Thread Rick Reumann
I might give potato farming a try.
Frank W. Zammetti wrote the following on 5/12/2005 12:09 PM:
Based on the talent of musicians as a whole over the past few years, I
would say it's *never* too late to become a rock star.  Even if one is in
a nursing home, confined to a wheel chair and suffering from any number of
age-related ailments, one could probably break the top 40 these days :)
Speaking as one who was in a band for a lot of years and was actually
presented with a contract offer (I didn't accept it and the band broke
up... best decision I ever made!), I can say I'd much rather be in the
crazy world of IT.  At least I can be reasonably sure I won't have to pay
back thousands of dollars to my employer when my application doesn't sell
as well as they expected :)

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


Re: Best practice for redirecting on session timeout?

2005-05-12 Thread James Mitchell
It really has nothing to do with caching, that meta refresh tag forces the 
browser to refresh the page from the server (without JavaScript) so (for 
example) the user returns from a long lunch and sees the browser sitting at 
the login screen instead of the last customer search.


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]

- Original Message - 
From: "Aladin Alaily" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Thursday, May 12, 2005 11:12 AM
Subject: Re: Best practice for redirecting on session timeout?


Hi
1) Maintainability: if you want to change the timeout to 30 minutes (and
you have 50 jsp pages), then you have to make the change 50 times.
Umm..ya...that's why I explicity said "preferrably via an include or let 
a
filter do it for you".
Missed the filter part :)
2) Business Logic: This approach will never prevent you Action from
executing.  Since you have to go through an action to reach the jsp
page,
when the *page* reloads, you are actually reloading the action first.
You must be confused here.  The refresh happens ON the client after 20
minutes of inactivity.  "Inactivity" being defined as "the browser has no
interaction with the server".
Confused? Maybe... but what if the page is not cached on the client-side.
Where is the browser going to get it from? ;)
After rereading the original post, it seems that I misunderstood the
original question.  My proposed solution assumes you've already dealt 
with
handling the expired session, so for all intents and purposes, we 
actually
agree (in a 1/42 kind of way ;)
At least we agree on something :)
Aladin

-
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: [POLL] What do you use action forms for?

2005-05-12 Thread Rick Reumann
#2 only.
Michael Jouravlev wrote the following on 5/11/2005 6:02 PM:
What is your preferred way to use action forms?
#1 Prefer not to use action forms at all
#2 For input data only (usually collected from HTML form)
#3 For output only (to be used in JSP)
#4 Same form for input and output
#5 One form for input, another for output
#6 Other
Thanks, 
   Michael.

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

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


Re: StrutsCatalogInputOutputSeparation

2005-05-12 Thread Dave Newton
James Mitchell wrote:
I consider myself a reasonably minded person, yet I tend to disagree 
with such assertions that, in my mind, are unreasonable.
Yeah, but I was being sarcastic.
"Look, an argument isn't simply a contradiction [...]"
"Yes it is."
Dave

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


Re: [OT] Too late to become a rock star?

2005-05-12 Thread Simon Chappell
Ska? Showing your age there Rick. Oops, so am I. :-)

On 5/12/05, Rick Reumann <[EMAIL PROTECTED]> wrote:
> Yea, it's not Friday. Just whining (with no cheese)..
> 
> Anyone else fed up with trying to keep up with all the stuff coming out
> every day in this crazy IT world  ???
> 
> I can't play an instrument or sing, but maybe it's not too late to
> become a rock star at 35? I want to join a ska band.
> 
> --
> 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]



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Frank W. Zammetti
You raise a good point, but I think there is something to be said for
keeping class count down and keeping those UML diagrams less cluttered.

It's a balancing act, that would be my contention.  I never like saying
one approach is "bad" or "improper", because inevitably someone can come
up with an example of a time it was the perfect answer.

Best practices become best practices because they are recognized as being
an optimal solution in *most* cases.  That doesn't make a solution that
isn't considered best practice wrong, it simply makes it not a best
practice :)

But if you are confronted with an application with 10 classes vs. one with
50, which will be more difficult to get your head around?  It's not a
straight-forward answer... those 10 classes might be monsters while the 50
may be 10 lines a piece, but on the other hand, grasping the relationship
between 50 classes can be more difficult than 10, even if the 10 are much
more complex.  And which is easier to maintain?

Balancing act. :)

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

On Thu, May 12, 2005 11:59 am, Leon Rosenberg said:
>
> On Thu, 2005-05-12 at 17:07 +0200, Pedro Salgado wrote:
>> So you mean, on your actionform you use:
>>
>> The html form attributes + (this is what I understand for input)
>> The collections needed to present combo/list boxes (and other options)
>> (this
>> is what I understand for output)
>>
>> I don't think #2 is this one. This is #4.
>
> Maybe we should define exactly what input and output is.
>
> Example: you have objects Book and Author. Each Book has a field author,
> which links to an Author object (Id, Name, FirstName, etc).
> Let us give the Book two properties, so its not that empty: Title and
> ISBN.
>
> Now you have a Book editing dialog, in this dialog you will have
>
> title and isbn rendered as input fields.
> and author rendered as select, with appropriate authorsCollection,
> filled with all available authors.
>
> So the Class BookForm has 4 attributes:
> String title, isbn, author;
> Collection authorsCollection;
>
> All 4 attributes are solely needed for input (as for now at least) and
> therefore the form is used as #2 scenario.
>
> On another page, which has nothing to do with the edit dialog you
> present a book previously searched by some criteria.
>
> If you are using scenario #4 you will reuse the BookForm here. The
> problem with this approach is, that you don't need the half of BookForm
> properties, what you need instead is:
> BookPresentationBean
> with String name, title, authorDescription:
> authorDescription is a field describing the Author object like:
> author.getLastName()+", "+author.getFirstName() (or whatever your html
> demands) and is typically filled by the Action.
>
> As you see, you don't need the BookForm to present a Book, since you
> need other properties for presentation, as for editing.
> So if you are working with scenario #4 and reusing BookForm here, you
> are actually _misusing_ the BookForm. Further, it's a bad design
> approach, because, if you need to change the search result page and add
> or remove some properties (a book rating by other users etc), you are
> changing the edit dialog too, without actually knowing it (or exlicitely
> search, aehm, where do i use this form?).
>
> That's why I think, that scenario #4 is actually a bad choice, because
> it creates dependencies, which are very hard to manage (especially after
> some months).
>
> regards
> Leon
>
>
>
>
>
>
>
>
>
>
>
> -
> 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] Too late to become a rock star?

2005-05-12 Thread Frank W. Zammetti
Based on the talent of musicians as a whole over the past few years, I
would say it's *never* too late to become a rock star.  Even if one is in
a nursing home, confined to a wheel chair and suffering from any number of
age-related ailments, one could probably break the top 40 these days :)

Speaking as one who was in a band for a lot of years and was actually
presented with a contract offer (I didn't accept it and the band broke
up... best decision I ever made!), I can say I'd much rather be in the
crazy world of IT.  At least I can be reasonably sure I won't have to pay
back thousands of dollars to my employer when my application doesn't sell
as well as they expected :)

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

On Thu, May 12, 2005 11:55 am, Rick Reumann said:
> Yea, it's not Friday. Just whining (with no cheese)..
>
> Anyone else fed up with trying to keep up with all the stuff coming out
> every day in this crazy IT world 
> ???
>
> I can't play an instrument or sing, but maybe it's not too late to
> become a rock star at 35? I want to join a ska band.
>
> --
> 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]



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Leon Rosenberg

On Thu, 2005-05-12 at 17:07 +0200, Pedro Salgado wrote:
> So you mean, on your actionform you use:
> 
> The html form attributes + (this is what I understand for input)
> The collections needed to present combo/list boxes (and other options) (this
> is what I understand for output)
> 
> I don't think #2 is this one. This is #4.

Maybe we should define exactly what input and output is.

Example: you have objects Book and Author. Each Book has a field author,
which links to an Author object (Id, Name, FirstName, etc).
Let us give the Book two properties, so its not that empty: Title and
ISBN.

Now you have a Book editing dialog, in this dialog you will have 

title and isbn rendered as input fields.
and author rendered as select, with appropriate authorsCollection,
filled with all available authors.

So the Class BookForm has 4 attributes: 
String title, isbn, author;
Collection authorsCollection;

All 4 attributes are solely needed for input (as for now at least) and
therefore the form is used as #2 scenario. 

On another page, which has nothing to do with the edit dialog you
present a book previously searched by some criteria.

If you are using scenario #4 you will reuse the BookForm here. The
problem with this approach is, that you don't need the half of BookForm
properties, what you need instead is:
BookPresentationBean
with String name, title, authorDescription:
authorDescription is a field describing the Author object like:
author.getLastName()+", "+author.getFirstName() (or whatever your html
demands) and is typically filled by the Action.

As you see, you don't need the BookForm to present a Book, since you
need other properties for presentation, as for editing.
So if you are working with scenario #4 and reusing BookForm here, you
are actually _misusing_ the BookForm. Further, it's a bad design
approach, because, if you need to change the search result page and add
or remove some properties (a book rating by other users etc), you are
changing the edit dialog too, without actually knowing it (or exlicitely
search, aehm, where do i use this form?).

That's why I think, that scenario #4 is actually a bad choice, because
it creates dependencies, which are very hard to manage (especially after
some months).

regards
Leon











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



Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread Frank W. Zammetti
Ugh, I always forget the simple target attribute!  Absolutely agreed,
that's probably the best approach.

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

On Thu, May 12, 2005 11:16 am, David Johnson said:
> whoa that's simple. I'm trying that first Thanks
>
> One things though, I'll have to set the "target" conditionally, only when
> the user clicks "PDF" or "EXCEL" since I dont **always** want it opening a
> new window...
>
> function setTarget(target) {
> document.forms[0].target=target;
> }
>
> On 5/12/05, Aladin Alaily <[EMAIL PROTECTED]> wrote:
>>
>> Hi Dave,
>>
>> This is pretty straightforward. In browser "a", you have a button that
>> says:
>>
>> "Export to PDF"
>>
>> The code would look like this:
>>
>> 
>> 
>> 
>>
>> When the user clicks on the button, the action "exportToPdf.do" opens an
>> ServletOutputStream and writes whatever you want. The headers are also
>> set to the content-type you want and the format you want (inline or
>> attachment).
>>
>> Aladin
>>
>>
>> > Hey all
>> >
>> > is it possible to forme my struts app to open up a second browser
>> window
>> > for
>> > the purpose of streaming a different content type (like a pdf file)
>> into
>> > it
>> > while maintaining the page in the original browser?
>> >
>> > Essentially, I have a nicely rendered HTML report in browser "a" and
>> when
>> > the user clicks "export to PDF" or "export to excel" I want a NEW
>> browser
>> > to
>> > pop up into which I will send the response with the headerType set to
>> the
>> > appropriate type.
>> >
>> > the generation of the XL and PDF is handled for me, but the app flow
>> is
>> > where Im foggy.
>> >
>> > anyone done this?
>> >
>> > --
>> > -Dave
>> > [EMAIL PROTECTED]
>> >
>>
>>
>
>
> --
> -Dave
> [EMAIL PROTECTED]
>


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



[OT] Too late to become a rock star?

2005-05-12 Thread Rick Reumann
Yea, it's not Friday. Just whining (with no cheese)..
Anyone else fed up with trying to keep up with all the stuff coming out 
every day in this crazy IT world  ???

I can't play an instrument or sing, but maybe it's not too late to 
become a rock star at 35? I want to join a ska band.

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


RE: [POLL] What do you use action forms for?

2005-05-12 Thread Pilgrim, Peter
> -Original Message-
> From: Michael Jouravlev [mailto:[EMAIL PROTECTED]
> 
====
> 
> 
> What is your preferred way to use action forms?
> #1 Prefer not to use action forms at all
> #2 For input data only (usually collected from HTML form)
> #3 For output only (to be used in JSP)
> #4 Same form for input and output
> #5 One form for input, another for output
> #6 Other

====

In the past project

[1] In a massive RBS web project I previously 
complex nested ActionForm combined with custom DispatchAction

In the future

[6] I would prefer to write DynaBean action forms, and double them 
up to use a Data Transfer Objects in order to call the Business Layer.
--
Peter Pilgrim
Operations/IT - Credit Suisse First Boston, 
Floor 15, 5 Canada Square, London E14 4QJ, United Kingdom
Tel: +44-(0)207-883-4497

==
This message is for the sole use of the intended recipient. If you received 
this message in error please delete it and notify us. If this message was 
misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains 
and monitors electronic communications sent through its network. Instructions 
transmitted over this system are not binding on CSFB until they are confirmed 
by us. Message transmission is not guaranteed to be secure.
==


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



Re: How to get the ActionErrors object from the request

2005-05-12 Thread Aladin Alaily
Hi Néstor,

You can do that with the following code:

ActionErrors errors = (ActionErrors) request.getAttribute(Globals.ERROR_KEY);

Aladin



> Hi
>
> Does somebody know how I can get the ActionErrors object from the
> request???
>
> Regards,
>
> Néstor Boscán
>


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



RE: How to get the ActionErrors object from the request

2005-05-12 Thread McDonnell, Colm (MLIM)
request.getAttribute(Globals.ERROR_KEY);


-Original Message-
From: Néstor Boscán [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 16:28
To: 'Struts Users Mailing List'
Subject: How to get the ActionErrors object from the request


Hi
 
Does somebody know how I can get the ActionErrors object from the request???
 
Regards,
 
Néstor Boscán


If you are not an intended recipient of this e-mail, please notify the sender, 
delete it and do not read, act upon, print, disclose, copy, retain or 
redistribute it. Click here for important additional terms relating to this 
e-mail. http://www.ml.com/email_terms/


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



Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread David Johnson
Cool. Thank you all. I'll post a wrap up to this thread summarizing what 
I've done when it's working.

Thank you all!!!

On 5/12/05, David Johnson <[EMAIL PROTECTED]> wrote:
> 
> Cool. Thank you all. I'll post a wrap up to this thread summarizing what 
> I've done when it's working.
> 
> Thank you all!!!
> 
> On 5/12/05, Benedict, Paul C <[EMAIL PROTECTED]> wrote:
> > 
> > David,
> > 
> > Aladin has a more straight forward approach. If you can know ahead of 
> > time
> > when you need to open a new window, take his approach; if you have no 
> > prior
> > knowledge, you'll need to send back JavaScript to open a new window. 
> > Either 
> > way should fit the bill.
> > 
> > Thanks,
> > Paul
> > 
> > -Original Message-
> > From: David Johnson [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, May 12, 2005 11:17 AM
> > To: Aladin Alaily; Struts Users Mailing List
> > Subject: Re: Opening a NEW browser for a 2nd content type from an action
> > 
> > whoa that's simple. I'm trying that first Thanks
> > 
> > One things though, I'll have to set the "target" conditionally, only 
> > when 
> > the user clicks "PDF" or "EXCEL" since I dont **always** want it opening 
> > a
> > new window...
> > 
> > function setTarget(target) {
> > document.forms[0].target=target;
> > }
> > 
> > On 5/12/05, Aladin Alaily < [EMAIL PROTECTED]> wrote:
> > >
> > > Hi Dave,
> > >
> > > This is pretty straightforward. In browser "a", you have a button that
> > > says:
> > >
> > > "Export to PDF" 
> > >
> > > The code would look like this:
> > >
> > > 
> > > 
> > > 
> > >
> > > When the user clicks on the button, the action "exportToPdf.do" opens 
> > an
> > > ServletOutputStream and writes whatever you want. The headers are also
> > > set to the content-type you want and the format you want (inline or 
> > > attachment).
> > >
> > > Aladin
> > >
> > >
> > > > Hey all
> > > >
> > > > is it possible to forme my struts app to open up a second browser 
> > window
> > > > for
> > > > the purpose of streaming a different content type (like a pdf file) 
> > into 
> > > > it
> > > > while maintaining the page in the original browser?
> > > >
> > > > Essentially, I have a nicely rendered HTML report in browser "a" and
> > > when
> > > > the user clicks "export to PDF" or "export to excel" I want a NEW 
> > > browser
> > > > to
> > > > pop up into which I will send the response with the headerType set 
> > to
> > > the
> > > > appropriate type.
> > > >
> > > > the generation of the XL and PDF is handled for me, but the app flow 
> > is 
> > > > where Im foggy.
> > > >
> > > > anyone done this?
> > > >
> > > > --
> > > > -Dave
> > > > [EMAIL PROTECTED]
> > > >
> > >
> > > 
> > 
> > --
> > -Dave
> > [EMAIL PROTECTED]
> > 
> > 
> > --
> > Notice: This e-mail message, together with any attachments, contains 
> > information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
> > Jersey, USA 08889), and/or its affiliates (which may be known outside the 
> > United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
> > Banyu) that may be confidential, proprietary copyrighted and/or legally 
> > privileged. It is intended solely for the use of the individual or entity 
> > named on this message. If you are not the intended recipient, and have 
> > received this message in error, please notify us immediately by reply 
> > e-mail 
> > and then delete it from your system.
> > 
> > --
> > 
> 
> 
> 
> -- 
> -Dave
> [EMAIL PROTECTED] 




-- 
-Dave
[EMAIL PROTECTED]


RE: How to get the ActionErrors object from the request

2005-05-12 Thread Allistair Crossley
the correct way is to use struts tag libraries otherwise you can do something 
like

ActionMessages messages = (ActionMessages) 
request.getAttribute("org.apache.struts.action.ERROR");

Allistair.


> -Original Message-
> From: Néstor Boscán [mailto:[EMAIL PROTECTED]
> Sent: 12 May 2005 16:28
> To: 'Struts Users Mailing List'
> Subject: How to get the ActionErrors object from the request
> 
> 
> Hi
>  
> Does somebody know how I can get the ActionErrors object from 
> the request???
>  
> Regards,
>  
> Néstor Boscán
> 


 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



Fwd: RE: [POLL] What do you use action forms for?

2005-05-12 Thread Brian Holzer



**DISCLAIMER**
This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee, please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that using, disclosing, copying or distributing the contents of this information is strictly prohibited.
**DISCLAIMER**

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

Re: StrutsCatalogInputOutputSeparation

2005-05-12 Thread James Mitchell
I consider myself a reasonably minded person, yet I tend to disagree with 
such assertions that, in my mind, are unreasonable.

:P
--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]

- Original Message - 
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Thursday, May 12, 2005 11:16 AM
Subject: Re: StrutsCatalogInputOutputSeparation


James Mitchell wrote:
I disagree.
Wait, trinary logic?
Dave "Is it Friday already?" Newton
Ted Husted wrote:
Reasonable minds can disagree. :)
No they can't.


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


How to get the ActionErrors object from the request

2005-05-12 Thread Néstor Boscán
Hi
 
Does somebody know how I can get the ActionErrors object from the request???
 
Regards,
 
Néstor Boscán


RE: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread Benedict, Paul C
David,

Aladin has a more straight forward approach. If you can know ahead of time
when you need to open a new window, take his approach; if you have no prior
knowledge, you'll need to send back JavaScript to open a new window. Either
way should fit the bill.

Thanks,
Paul

-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 11:17 AM
To: Aladin Alaily; Struts Users Mailing List
Subject: Re: Opening a NEW browser for a 2nd content type from an action


whoa that's simple. I'm trying that first Thanks

One things though, I'll have to set the "target" conditionally, only when 
the user clicks "PDF" or "EXCEL" since I dont **always** want it opening a 
new window... 

function setTarget(target) {
document.forms[0].target=target;
}

On 5/12/05, Aladin Alaily <[EMAIL PROTECTED]> wrote:
> 
> Hi Dave,
> 
> This is pretty straightforward. In browser "a", you have a button that 
> says:
> 
> "Export to PDF"
> 
> The code would look like this:
> 
> 
> 
> 
> 
> When the user clicks on the button, the action "exportToPdf.do" opens an
> ServletOutputStream and writes whatever you want. The headers are also
> set to the content-type you want and the format you want (inline or
> attachment).
> 
> Aladin
> 
> 
> > Hey all
> >
> > is it possible to forme my struts app to open up a second browser window
> > for
> > the purpose of streaming a different content type (like a pdf file) into
> > it
> > while maintaining the page in the original browser?
> >
> > Essentially, I have a nicely rendered HTML report in browser "a" and 
> when
> > the user clicks "export to PDF" or "export to excel" I want a NEW 
> browser
> > to
> > pop up into which I will send the response with the headerType set to 
> the
> > appropriate type.
> >
> > the generation of the XL and PDF is handled for me, but the app flow is
> > where Im foggy.
> >
> > anyone done this?
> >
> > --
> > -Dave
> > [EMAIL PROTECTED]
> >
> 
> 


-- 
-Dave
[EMAIL PROTECTED]



--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Vincent

#4 Same form for input and output
Vincent
--
Plato is my friend, Aristotle is my friend, but my greatest friend is truth.
- Isaac Newton
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread David Johnson
whoa that's simple. I'm trying that first Thanks

One things though, I'll have to set the "target" conditionally, only when 
the user clicks "PDF" or "EXCEL" since I dont **always** want it opening a 
new window... 

function setTarget(target) {
document.forms[0].target=target;
}

On 5/12/05, Aladin Alaily <[EMAIL PROTECTED]> wrote:
> 
> Hi Dave,
> 
> This is pretty straightforward. In browser "a", you have a button that 
> says:
> 
> "Export to PDF"
> 
> The code would look like this:
> 
> 
> 
> 
> 
> When the user clicks on the button, the action "exportToPdf.do" opens an
> ServletOutputStream and writes whatever you want. The headers are also
> set to the content-type you want and the format you want (inline or
> attachment).
> 
> Aladin
> 
> 
> > Hey all
> >
> > is it possible to forme my struts app to open up a second browser window
> > for
> > the purpose of streaming a different content type (like a pdf file) into
> > it
> > while maintaining the page in the original browser?
> >
> > Essentially, I have a nicely rendered HTML report in browser "a" and 
> when
> > the user clicks "export to PDF" or "export to excel" I want a NEW 
> browser
> > to
> > pop up into which I will send the response with the headerType set to 
> the
> > appropriate type.
> >
> > the generation of the XL and PDF is handled for me, but the app flow is
> > where Im foggy.
> >
> > anyone done this?
> >
> > --
> > -Dave
> > [EMAIL PROTECTED]
> >
> 
> 


-- 
-Dave
[EMAIL PROTECTED]


Re: StrutsCatalogInputOutputSeparation

2005-05-12 Thread Dave Newton
James Mitchell wrote:
I disagree.
Wait, trinary logic?
Dave "Is it Friday already?" Newton
Ted Husted wrote:
Reasonable minds can disagree. :) 
No they can't.


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


Re: Best practice for redirecting on session timeout?

2005-05-12 Thread Aladin Alaily
Hi

>> 1) Maintainability: if you want to change the timeout to 30 minutes (and
>> you have 50 jsp pages), then you have to make the change 50 times.
> Umm..ya...that's why I explicity said "preferrably via an include or let a
> filter do it for you".

Missed the filter part :)

>> 2) Business Logic: This approach will never prevent you Action from
>> executing.  Since you have to go through an action to reach the jsp
>> page,
>> when the *page* reloads, you are actually reloading the action first.
> You must be confused here.  The refresh happens ON the client after 20
> minutes of inactivity.  "Inactivity" being defined as "the browser has no
> interaction with the server".

Confused? Maybe... but what if the page is not cached on the client-side. 
Where is the browser going to get it from? ;)

> After rereading the original post, it seems that I misunderstood the
> original question.  My proposed solution assumes you've already dealt with
> handling the expired session, so for all intents and purposes, we actually
> agree (in a 1/42 kind of way ;)

At least we agree on something :)

Aladin



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



Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread David Johnson
A, gotcha. it's an internal app thankfully, and they're fine with 
javascript.

The report itself foesnt exist when the page is sitting there rendered. the 
action is going to render it.. a Call to SAS specifically, --> 
http://support.sas.com/rnd/appdev/V2/webAF/server/examples/streaming3-2.htm(so
the answer is that I'm RECREATING the report with a new outputtype)

so basically but PDF and XLS controls are HTML:BUTTON s that will cann an 
"exportPDF()" and "exportXLS()" javascript function, then do the 

exportWindow.location="PortfolioReportResults.action";

What about form fields though? There are some hidden fields that I need to 
have passed along... will I have to resport to using the queryString? Like 
this

exportWindow.location="PortfolioReportResults.action?dispatch=pdf";

On 5/12/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
> 
> You said:
> 
> "Essentially, I have a nicely rendered HTML report in browser "a" and when
> the user clicks "export to PDF" or "export to excel" I want a NEW browser
> to pop up into which I will send the response with the headerType set to
> the appropriate type."
> 
> Without an applet or ActiveX control or something similar to do it on the
> client, you will have to go back to the server to do the export... so, the
> first question is, does the report still exist on the server at that point
> or is it only in the browser "a" window at that point?
> 
> Either way, what you probably want to do is open a new window via
> Javascript when the user clicks the Export button (let's say the Export To
> PDF button), holding the reference to it in exportWindow, then do the
> following:
> 
> exportWindow.location="myExportPDFAction.do";
> 
> The myExportPDFAction will have to be responsible for returning the report
> in PDF form.
> 
> But, the question of whether the report exists on the server or not is
> important because your either going to be (a) doing a real export of an
> HTML file if it does exist or (b) re-running the report and generating the
> appropriate output type.
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> On Thu, May 12, 2005 10:47 am, David Johnson said:
> > hmm I dont think I understand. so instead of redirecting to an action
> > mapping, just add the HTML myself, like you would if you were writing a
> > servlet (no jsp) application? interesting.
> >
> > you're right, I dont need a nice tiles definition page for my pdf/xls
> > output.. all I really need is to pop up a browser, set the content type,
> > and
> > direct the response into the new browser.
> >
> > is there a way to target a browser like you can in a  but using an
> > ? like a target="pdfOutput" or something? that might work..
> >
> > h
> >
> > On 5/12/05, Benedict, Paul C <[EMAIL PROTECTED]> wrote:
> >>
> >> David,
> >>
> >> You could have your response return HTML with rendered JavaScript; the
> >> script would then automatically pop open a new window with the
> >> destination
> >> link that generates your unstructured content. You could even provide a
> >> link
> >> in the response if the JavaScript doesn't run automatically.
> >>
> >> Thanks,
> >> Paul
> >>
> >> -Original Message-
> >> From: David Johnson [mailto:[EMAIL PROTECTED]
> >> Sent: Thursday, May 12, 2005 10:31 AM
> >> To: Struts Users Mailing List; CCNY
> >> Subject: Opening a NEW browser for a 2nd content type from an action
> >>
> >> Hey all
> >>
> >> is it possible to forme my struts app to open up a second browser 
> window
> >> for
> >>
> >> the purpose of streaming a different content type (like a pdf file) 
> into
> >> it
> >> while maintaining the page in the original browser?
> >>
> >> Essentially, I have a nicely rendered HTML report in browser "a" and
> >> when
> >> the user clicks "export to PDF" or "export to excel" I want a NEW
> >> browser
> >> to
> >>
> >> pop up into which I will send the response with the headerType set to
> >> the
> >> appropriate type.
> >>
> >> the generation of the XL and PDF is handled for me, but the app flow is
> >> where Im foggy.
> >>
> >> anyone done this?
> >>
> >> --
> >> -Dave
> >> [EMAIL PROTECTED]
> >>
> >>
> >> 
> --
> >> Notice: This e-mail message, together with any attachments, contains
> >> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
> >> New
> >> Jersey, USA 08889), and/or its affiliates (which may be known outside
> >> the
> >> United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan,
> >> as
> >> Banyu) that may be confidential, proprietary copyrighted and/or legally
> >> privileged. It is intended solely for the use of the individual or
> >> entity
> >> named on this message. If you are not the intended recipient, and have
> >> received this message in error, please notify us immediately by reply
> >> e-mail
> >> and then delete it from your system.
> >>
> >> 
> ---

Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread Aladin Alaily
Hi Dave,

This is pretty straightforward.  In browser "a", you have a button that says:

"Export to PDF"

The code would look like this:


  


When the user clicks on the button, the action "exportToPdf.do" opens an
ServletOutputStream and writes whatever you want.  The headers are also
set to the content-type you want and the format you want (inline or
attachment).

Aladin



> Hey all
>
> is it possible to forme my struts app to open up a second browser window
> for
> the purpose of streaming a different content type (like a pdf file) into
> it
> while maintaining the page in the original browser?
>
> Essentially, I have a nicely rendered HTML report in browser "a" and when
> the user clicks "export to PDF" or "export to excel" I want a NEW browser
> to
> pop up into which I will send the response with the headerType set to the
> appropriate type.
>
> the generation of the XL and PDF is handled for me, but the app flow is
> where Im foggy.
>
> anyone done this?
>
> --
> -Dave
> [EMAIL PROTECTED]
>


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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Pedro Salgado
On 12/05/2005 16:34, "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:

> I've always felt the ActionForm had become something that wasn't
> originally intended... I personally use it as something that applies to a
> PAGE and not just a form, so it becomes an I/O object for me in the truest
> sense.

So you mean, on your actionform you use:

The html form attributes + (this is what I understand for input)
The collections needed to present combo/list boxes (and other options) (this
is what I understand for output)

I don't think #2 is this one. This is #4.

> 
> I love the idea of something like a Velocity-type context.  Before I came
> to Struts I was using a custom framework that was similar in that fashion,
> and went a step further in that there was a single WorkContext object that
> handled communication between ALL layers.  I don't think that's the
> optimal solution now, but I think it was a step in the right direction...
> 

This seems a little different approach

> I toyed with implementing a true VTO/BTO pattern in Struts a while back,
> that is, a single VTO (View Transfer Object) that handled all values
> passed to and from the view, and the usual BTO or DTO (Business Transfer
> Object when discussed in the context of a VTO, or just the usual Data
> Transfer Object) to communicate between the controllers and the business
> delegates.

I do almost the same thing. (this seems #2)
Use a ActionForms for retrieving only the HTML form data.
The update of some data is a "special" case:
- store the business object (only the bo id will not be enough... someone
can override the form and set the property of the id) on a special attribute
on the ActionForm and put the ActionForm with "session" scope

This way I check for:
- updating a bo with the same type and id?

So I use only the actionform for:

The html form attributes +
(on updates) with one property to store the bo

For the combo/list/etc I use a java bean stored on the request.
So this approach is #2 +1 extra property.


Just to finish I have to agree with Ted that "clarify whether by output we
mean output that is being used within the  tags, or any arbitrary
dynamic output." and maybe this is the source of all problem.


I read Chuck Cavaness book and (correct if I am wrong... it has been 2
years) he usually retrieved the BOs from the model/persistence layer and
then created view objects (POJOs).
I remind him mixing this data on an ActionForm.

Pedro Salgado

> 
> Most people I think agree with the idea of a single object communicating
> between the control and the model, i.e., I don't see too many people
> saying we should have one object that goes TO a business delegate and one
> that comes FROM that delegate, i.e., two DTOs per model call, although I
> suppose there are some valid arguments for that.  The point being, if you
> agree with that approach, I can't see NOT taking the same approach between
> the control and the view, and likewise, if you do see a two-object
> communication between control and model as better than you likely feel the
> same way about between view and control.


> 
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> On Thu, May 12, 2005 10:20 am, Ted Husted said:
>> On 5/12/05, Pedro Salgado <[EMAIL PROTECTED]> wrote:
>>> 
>>> Well, your option 1) matched the #2
>>> and
>>> 2) matched the #4
>>> 
>>> :)
>>> 
>>> Pedro Salgado
>> 
>> It might be helpfult to clarify whether by output we mean output that
>> is being used within the  tags, or any arbitrary dynamic
>> output.
>> 
>> The intended use of the ActionForm is to represent the values of the
>> controls *within* a form. In Struts 1.1, the scope crept so as to
>> include, for example, lists used to populate controls.
>> 
>> The cannonical role of the ActionForm is to represent what the user
>> might input into the form, or to default input on behalf of the user
>> (e.g, to edit values previously input.) I don't know if the latter
>> case, providing default input values, counts as "output" in this
>> thread.
>> 
>> Plunking into an ActionForm something like a result list from a search
>> query is an unintended use. The ActionForm was not designed as a
>> Velocity context, but as a way of vetting input from forms.
>> 
>> If people are putting result lists on ActionForms, that don't
>> represent input values, then I can understand why multiple ActionForms
>> might be an issue. But, personally, I don't see a compelling argument
>> for putting arbitrary dynamic data on an ActionForm. Any POJO would
>> work as well.
>> 
>> I could see a case for a Velocity-type Context that might include an
>> ActionForm as a member, but I would not recommend trying to subvert
>> ActionForms as a Velocity-type Context. If people want a Velocity-type
>> Context, then let's do that, and put the ActionForm inside the page
>> Context.
>> 
>> -Ted.
>> 
>> -
>> To un

Re: StrutsCatalogInputOutputSeparation

2005-05-12 Thread James Mitchell
I disagree.

--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]

- Original Message - 
From: "Dave Newton" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Thursday, May 12, 2005 10:59 AM
Subject: Re: StrutsCatalogInputOutputSeparation


Ted Husted wrote:
Reasonable minds can disagree. :)
 

No they can't.
Dave

-
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: Best practice for redirecting on session timeout?

2005-05-12 Thread Frank W. Zammetti
Good point Aladin...

However, I would take this a step further...

in pre-1.3 Struts, you might not want to implement your own RP for various
reasons, so I would suggest doing this in a filter instead... Same benefit
as modifying the RP, but doesn't touch Struts code and is also more
portable... should you ever want to not use Struts for some reason, you
don't have to worry about re-implementing your auth check.

In 1.3, you could probably make a good argument for modifying the RP
chain, certainly that's what your meant to be able to do!, but I think the
same good reasons for using a filter would still apply there.

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

On Thu, May 12, 2005 10:57 am, [EMAIL PROTECTED] said:
> Hi,
>
> This approach would work as well.  I just think that if you're going to do
> this in struts, it's better to do it in the RequestProcessor.  Why?
> Assume that you are using the forward action defined in struts.  If my
> session has timedout and I click on a link that uses the forward action, I
> will still see the page.  This is because your BaseAction is never called.
>  On the other hand, if you had checked the request in the
> RequestProcessor, I would have been blocked.  This is because *ALL*
> actions pass through the RequestProcessor... even the struts-defined ones.
>
> That's the approach I would use (RequestProcessor approach) if my
> container didn't support filters.
>
> Aladin
>
>
>
>
>> I have a method in my BaseAction called "boolean checkAuth(request)".
>> then
>> in every Action I write I code this at the top
>>
>> // Check if session is active, if not redirect to login page
>> if( !checkAuth( request )){
>> log.info("*** Session has timed out ***");
>> errors.add( ActionErrors.GLOBAL_ERROR, new ActionError("
>> error.expired.session") );
>> saveErrors(request, errors);
>> return
>> (mapping.findForward(ApplicationConstants.APP_FORWARD_INVALID_SESSION));
>>
>> }
>>
>> seems to work fine.
>>
>> On 5/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>>
>>> Although this approach might work, I don't like it so much. The
>>> reasons:
>>>
>>> 1) Maintainability: if you want to change the timeout to 30 minutes
>>> (and
>>> you have 50 jsp pages), then you have to make the change 50 times.
>>>
>>> 2) Business Logic: This approach will never prevent you Action from
>>> executing. Since you have to go through an action to reach the jsp
>>> page,
>>> when the *page* reloads, you are actually reloading the action first.
>>> Having said that, if your action does something that should only be
>>> executed if your session has not expired, your approach will not work.
>>>
>>> A combination of using a filter & session-config (in web.xml) solves
>>> both
>>> problems above. How?
>>>
>>> 1) You only have to change the session timeout setting in one place.
>>>
>>> 2) Your filter is executed before anything else. Hence, you never have
>>> to
>>> worry about an action being executed unintentionally.
>>>
>>> Aladin
>>>
>>>
>>> > That's easy, just drop this in all of your JSPs (preferrably via an
>>> > include
>>> > or let a filter do it for you).
>>> >
>>> > (assuming your session timeout is 20 minutes)
>>> >
>>> > 
>>> >
>>> > You should be handling invalid/expired session state in your
>>> application
>>> > and
>>> > by using the above technique, it will work universally, whether you
>>> are
>>> > managing sessions from your actions, CMS, or some other service
>>> outside
>>> of
>>> > the conatiner, such as a product like SiteMinder by Netegrity.
>>> >
>>> > This will _force_ the browser to do a refresh of the page after 1200
>>> > seconds
>>> > (20 minutes), which will allow your app to handle the request (from a
>>> now
>>> > expired session) the same as it would if the user had initiated the
>>> > request
>>> > giving a hint of being on a rich client where such events are easily
>>> > handled.
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > James Mitchell
>>> > Software Engineer / Open Source Evangelist
>>> > Consulting / Mentoring / Freelance
>>> > EdgeTech, Inc.
>>> > http://www.edgetechservices.net/
>>> > 678.910.8017
>>> > AIM: jmitchtx
>>> > Yahoo: jmitchtx
>>> > MSN: [EMAIL PROTECTED]
>>> >
>>> >
>>> >
>>> >
>>> > - Original Message -
>>> > From: "Adam Lipscombe" <[EMAIL PROTECTED]>
>>> > To: "'Struts Users Mailing List'" 
>>> > Sent: Thursday, May 12, 2005 6:19 AM
>>> > Subject: Best practice for redirecting on session timeout?
>>> >
>>> >
>>> >> Folks,
>>> >>
>>> >>
>>> >> I there a standard way of handling session timeouts. If a user has
>>> been
>>> >> inactive for longer than N minutes I want to redirect them to the
>>> login
>>> >> page.
>>> >>
>>> >> It occurs to me that this could be done in a) the RequestProcessor
>>> or
>>> b)
>>> >> in
>>> >> an JSP include.
>>> >>
>>> >>
>>> >> Is there another way?
>>> >> What is best practice?
>>> >>
>>> >>
>>> >> TIA - Adam
>>> >>
>>> >>
>>> >> --

Re: DynaValidatorForm not validating ?

2005-05-12 Thread Dave Newton
Michael Klaene wrote:

name="loginForm" input="login.page" scope="request">



 

Woudln't you need a validate="true" attribute?
Dave

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


Re: Best practice for redirecting on session timeout?

2005-05-12 Thread James Mitchell
- Original Message - 
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Thursday, May 12, 2005 10:34 AM
Subject: Re: Best practice for redirecting on session timeout?


Although this approach might work, I don't like it so much.  The reasons:
1) Maintainability: if you want to change the timeout to 30 minutes (and
you have 50 jsp pages), then you have to make the change 50 times.

Umm..ya...that's why I explicity said "preferrably via an include or let a 
filter do it for you".


2) Business Logic: This approach will never prevent you Action from
executing.  Since you have to go through an action to reach the jsp page,
when the *page* reloads, you are actually reloading the action first.
Actually, no, that's not at all what I said.
Having said that, if your action does something that should only be
executed if your session has not expired, your approach will not work.
You must be confused here.  The refresh happens ON the client after 20 
minutes of inactivity.  "Inactivity" being defined as "the browser has no 
interaction with the server".

The solution I offer is a way to "force" the browser to hit the server 
(after the specified time has passed), which the server can then deal with 
(the expired session).

A combination of using a filter & session-config (in web.xml) solves both
problems above.  How?
1) You only have to change the session timeout setting in one place.
2) Your filter is executed before anything else.  Hence, you never have to
worry about an action being executed unintentionally.
Aladin
That's correct, (sort of) but that's really only 1 of 42 ways to solve this 
problem.  What you presume by your above statements is that someone has 
coded their app with a flat implementation of actions (e.g. no base 
actions).  This is considered to be a bad practice.  You will always want a 
single point of entry into your peice of the controller.  You do this easily 
with BaseActions.  Besides reuse, you can solve the above situation quite 
easily.

After rereading the original post, it seems that I misunderstood the 
original question.  My proposed solution assumes you've already dealt with 
handling the expired session, so for all intents and purposes, we actually 
agree (in a 1/42 kind of way ;)

--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]


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


Re: StrutsCatalogInputOutputSeparation

2005-05-12 Thread Dave Newton
Ted Husted wrote:
Reasonable minds can disagree. :)
 

No they can't.
Dave

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


Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread Frank W. Zammetti
You said:

"Essentially, I have a nicely rendered HTML report in browser "a" and when
the user clicks "export to PDF" or "export to excel" I want a NEW browser
to pop up into which I will send the response with the headerType set to
the appropriate type."

Without an applet or ActiveX control or something similar to do it on the
client, you will have to go back to the server to do the export... so, the
first question is, does the report still exist on the server at that point
or is it only in the browser "a" window at that point?

Either way, what you probably want to do is open a new window via
Javascript when the user clicks the Export button (let's say the Export To
PDF button), holding the reference to it in exportWindow, then do the
following:

exportWindow.location="myExportPDFAction.do";

The myExportPDFAction will have to be responsible for returning the report
in PDF form.

But, the question of whether the report exists on the server or not is
important because your either going to be (a) doing a real export of an
HTML file if it does exist or (b) re-running the report and generating the
appropriate output type.

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

On Thu, May 12, 2005 10:47 am, David Johnson said:
> hmm I dont think I understand. so instead of redirecting to an action
> mapping, just add the HTML myself, like you would if you were writing a
> servlet (no jsp) application? interesting.
>
> you're right, I dont need a nice tiles definition page for my pdf/xls
> output.. all I really need is to pop up a browser, set the content type,
> and
> direct the response into the new browser.
>
> is there a way to target a browser like you can in a  but using an
> ? like a target="pdfOutput" or something? that might work..
>
> h
>
> On 5/12/05, Benedict, Paul C <[EMAIL PROTECTED]> wrote:
>>
>> David,
>>
>> You could have your response return HTML with rendered JavaScript; the
>> script would then automatically pop open a new window with the
>> destination
>> link that generates your unstructured content. You could even provide a
>> link
>> in the response if the JavaScript doesn't run automatically.
>>
>> Thanks,
>> Paul
>>
>> -Original Message-
>> From: David Johnson [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, May 12, 2005 10:31 AM
>> To: Struts Users Mailing List; CCNY
>> Subject: Opening a NEW browser for a 2nd content type from an action
>>
>> Hey all
>>
>> is it possible to forme my struts app to open up a second browser window
>> for
>>
>> the purpose of streaming a different content type (like a pdf file) into
>> it
>> while maintaining the page in the original browser?
>>
>> Essentially, I have a nicely rendered HTML report in browser "a" and
>> when
>> the user clicks "export to PDF" or "export to excel" I want a NEW
>> browser
>> to
>>
>> pop up into which I will send the response with the headerType set to
>> the
>> appropriate type.
>>
>> the generation of the XL and PDF is handled for me, but the app flow is
>> where Im foggy.
>>
>> anyone done this?
>>
>> --
>> -Dave
>> [EMAIL PROTECTED]
>>
>>
>> --
>> Notice: This e-mail message, together with any attachments, contains
>> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
>> New
>> Jersey, USA 08889), and/or its affiliates (which may be known outside
>> the
>> United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan,
>> as
>> Banyu) that may be confidential, proprietary copyrighted and/or legally
>> privileged. It is intended solely for the use of the individual or
>> entity
>> named on this message. If you are not the intended recipient, and have
>> received this message in error, please notify us immediately by reply
>> e-mail
>> and then delete it from your system.
>>
>> --
>>
>
>
>
> --
> -Dave
> [EMAIL PROTECTED]
>


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



Re: Best practice for redirecting on session timeout?

2005-05-12 Thread struts
Hi,

This approach would work as well.  I just think that if you're going to do
this in struts, it's better to do it in the RequestProcessor.  Why? 
Assume that you are using the forward action defined in struts.  If my
session has timedout and I click on a link that uses the forward action, I
will still see the page.  This is because your BaseAction is never called.
 On the other hand, if you had checked the request in the
RequestProcessor, I would have been blocked.  This is because *ALL*
actions pass through the RequestProcessor... even the struts-defined ones.

That's the approach I would use (RequestProcessor approach) if my
container didn't support filters.

Aladin




> I have a method in my BaseAction called "boolean checkAuth(request)". then
> in every Action I write I code this at the top
>
> // Check if session is active, if not redirect to login page
> if( !checkAuth( request )){
> log.info("*** Session has timed out ***");
> errors.add( ActionErrors.GLOBAL_ERROR, new ActionError("
> error.expired.session") );
> saveErrors(request, errors);
> return
> (mapping.findForward(ApplicationConstants.APP_FORWARD_INVALID_SESSION));
>
> }
>
> seems to work fine.
>
> On 5/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>> Although this approach might work, I don't like it so much. The reasons:
>>
>> 1) Maintainability: if you want to change the timeout to 30 minutes (and
>> you have 50 jsp pages), then you have to make the change 50 times.
>>
>> 2) Business Logic: This approach will never prevent you Action from
>> executing. Since you have to go through an action to reach the jsp page,
>> when the *page* reloads, you are actually reloading the action first.
>> Having said that, if your action does something that should only be
>> executed if your session has not expired, your approach will not work.
>>
>> A combination of using a filter & session-config (in web.xml) solves
>> both
>> problems above. How?
>>
>> 1) You only have to change the session timeout setting in one place.
>>
>> 2) Your filter is executed before anything else. Hence, you never have
>> to
>> worry about an action being executed unintentionally.
>>
>> Aladin
>>
>>
>> > That's easy, just drop this in all of your JSPs (preferrably via an
>> > include
>> > or let a filter do it for you).
>> >
>> > (assuming your session timeout is 20 minutes)
>> >
>> > 
>> >
>> > You should be handling invalid/expired session state in your
>> application
>> > and
>> > by using the above technique, it will work universally, whether you
>> are
>> > managing sessions from your actions, CMS, or some other service
>> outside
>> of
>> > the conatiner, such as a product like SiteMinder by Netegrity.
>> >
>> > This will _force_ the browser to do a refresh of the page after 1200
>> > seconds
>> > (20 minutes), which will allow your app to handle the request (from a
>> now
>> > expired session) the same as it would if the user had initiated the
>> > request
>> > giving a hint of being on a rich client where such events are easily
>> > handled.
>> >
>> >
>> >
>> >
>> > --
>> > James Mitchell
>> > Software Engineer / Open Source Evangelist
>> > Consulting / Mentoring / Freelance
>> > EdgeTech, Inc.
>> > http://www.edgetechservices.net/
>> > 678.910.8017
>> > AIM: jmitchtx
>> > Yahoo: jmitchtx
>> > MSN: [EMAIL PROTECTED]
>> >
>> >
>> >
>> >
>> > - Original Message -
>> > From: "Adam Lipscombe" <[EMAIL PROTECTED]>
>> > To: "'Struts Users Mailing List'" 
>> > Sent: Thursday, May 12, 2005 6:19 AM
>> > Subject: Best practice for redirecting on session timeout?
>> >
>> >
>> >> Folks,
>> >>
>> >>
>> >> I there a standard way of handling session timeouts. If a user has
>> been
>> >> inactive for longer than N minutes I want to redirect them to the
>> login
>> >> page.
>> >>
>> >> It occurs to me that this could be done in a) the RequestProcessor or
>> b)
>> >> in
>> >> an JSP include.
>> >>
>> >>
>> >> Is there another way?
>> >> What is best practice?
>> >>
>> >>
>> >> TIA - Adam
>> >>
>> >>
>> >> -
>> >> 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]
>>
>>
>
>
> --
> -Dave
> [EMAIL PROTECTED]
>


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



RE: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread Benedict, Paul C
David,
 
You cannot control opening a new client window from a server response. This
is all client-side control -- javascript for the user explicitly opens a
link in a new window. Because of this limitation, you need to work with the
client-side support that you may have control over: JavaScript. 
 
You said you need to open a 2nd window. The only way to do that yourself is
to force it with JavaScript; this implies your response must contain
JavaScript. But, if the user has his scripting disabled, you also need to
provide an alternative which is a clickable link (with the Click here if a second browser
does not open).
 
Thanks,
Paul
 
-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 10:48 AM
To: Benedict, Paul C; Struts Users Mailing List
Subject: Re: Opening a NEW browser for a 2nd content type from an action



hmm I dont think I understand. so instead of redirecting to an action
mapping, just add the HTML myself, like you would if you were writing a
servlet (no jsp) application? interesting.

you're right, I dont need a nice tiles definition page for my pdf/xls
output.. all I really need is to pop up a browser, set the content type, and
direct the response into the new browser.

is there a way to target a browser like you can in a  but using an
? like a target="pdfOutput" or something? that might work..

h


On 5/12/05, Benedict, Paul C <[EMAIL PROTECTED]
 > wrote: 

David,

You could have your response return HTML with rendered JavaScript; the
script would then automatically pop open a new window with the destination
link that generates your unstructured content. You could even provide a link

in the response if the JavaScript doesn't run automatically.

Thanks,
Paul

-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED]  ]
Sent: Thursday, May 12, 2005 10:31 AM 
To: Struts Users Mailing List; CCNY
Subject: Opening a NEW browser for a 2nd content type from an action

Hey all

is it possible to forme my struts app to open up a second browser window for

the purpose of streaming a different content type (like a pdf file) into it 
while maintaining the page in the original browser?

Essentially, I have a nicely rendered HTML report in browser "a" and when
the user clicks "export to PDF" or "export to excel" I want a NEW browser to


pop up into which I will send the response with the headerType set to the
appropriate type.

the generation of the XL and PDF is handled for me, but the app flow is
where Im foggy.

anyone done this? 

--
-Dave
[EMAIL PROTECTED]  


--
Notice:  This e-mail message, together with any attachments, contains
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New
Jersey, USA 08889), and/or its affiliates (which may be known outside the
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as
Banyu) that may be confidential, proprietary copyrighted and/or legally
privileged. It is intended solely for the use of the individual or entity
named on this message.  If you are not the intended recipient, and have
received this message in error, please notify us immediately by reply e-mail
and then delete it from your system.

--





-- 
-Dave
[EMAIL PROTECTED]   


--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

RE: Best practice for redirecting on session timeout?

2005-05-12 Thread struts
Hi,

That's scary :).  I would never trust javascript for session management. 
What happens if javascript is turned off?  The user is not allowed to use
your app?

Your requirement can definetly be met on the server-side.  Here's a
possible scenario.  You can create you a timer class (running in a
seperate thread) which iterates through your active sessions.  Each
session would be wrapped in an object stored in a session manager.  Each
wrapped object contains the *last activity time* and is used to compare
with the current system time.  If the time elapsed is greater than what
you allow for an inactive session, then you can set a flag in the session
to redirect to an action which alerts the user to click on *X* to
continue.  If the user clicks on *X* then the session is reset.  Otherwise
the session is explicitly timedout in the session manager.  Of course, the
timer would be the main player here.  It would be dispatched on every
second (or whatever time interval you choose). This is just one
"off-the-cuff" approach, but it should work... even when javascript is
turned off.  It also give you much more power than the javascript
approach.  For one, you can track where your users are spending most of
their time.  In addition, you can also manipulate the alert page and pass
more information to the user.

Hope this helps.

Aladin


> In our application we handle user inactivity using a javascript timer on
> the
> client side.
> The requirement we had was to issue a warning message if the user has not
> typed
> or clicked anything for some period of time. What we do is once the
> javascript timer expires we post a message which the user can click on to
> reactivate the timer. Otherwise the user's session is invalidated by
> sending
> a request to some
> action class on the server.
>
> I was wondering if such a requirement can be handled on the server side?
>
>
> -Original Message-
> From: Aladin Alaily [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 12, 2005 8:32 AM
> To: Struts Users Mailing List
> Subject: Re: Best practice for redirecting on session timeout?
>
>
> Hi Adam,
>
> One possibility is to have the timing out of the session be managed by
> your container and have the redirection issued by a filter.
>
> If you are using Tomcat 4+ this is very straightforward to implement.
> In the web.xml, you declare your session-timeout value and your filter
> class.  After having declared your filter, you need to map it to a uri
> for which it will be applied.
>
> Aladin
>
>
>
> Adam Lipscombe wrote:
>> Folks,
>>
>>
>> I there a standard way of handling session timeouts. If a user has been
>> inactive for longer than N minutes I want to redirect them to the login
>> page.
>>
>> It occurs to me that this could be done in a) the RequestProcessor or b)
> in
>> an JSP include.
>>
>>
>> Is there another way?
>> What is best practice?
>>
>>
>> TIA - Adam
>>
>>
>> -
>> 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: Best practice for redirecting on session timeout?

2005-05-12 Thread David Johnson
I have a method in my BaseAction called "boolean checkAuth(request)". then 
in every Action I write I code this at the top

// Check if session is active, if not redirect to login page
if( !checkAuth( request )){
log.info("*** Session has timed out ***");
errors.add( ActionErrors.GLOBAL_ERROR, new ActionError("
error.expired.session") );
saveErrors(request, errors);
return (mapping.findForward(ApplicationConstants.APP_FORWARD_INVALID_SESSION)); 

}

seems to work fine.

On 5/12/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> 
> Although this approach might work, I don't like it so much. The reasons:
> 
> 1) Maintainability: if you want to change the timeout to 30 minutes (and
> you have 50 jsp pages), then you have to make the change 50 times.
> 
> 2) Business Logic: This approach will never prevent you Action from
> executing. Since you have to go through an action to reach the jsp page,
> when the *page* reloads, you are actually reloading the action first.
> Having said that, if your action does something that should only be
> executed if your session has not expired, your approach will not work.
> 
> A combination of using a filter & session-config (in web.xml) solves both
> problems above. How?
> 
> 1) You only have to change the session timeout setting in one place.
> 
> 2) Your filter is executed before anything else. Hence, you never have to
> worry about an action being executed unintentionally.
> 
> Aladin
> 
> 
> > That's easy, just drop this in all of your JSPs (preferrably via an
> > include
> > or let a filter do it for you).
> >
> > (assuming your session timeout is 20 minutes)
> >
> > 
> >
> > You should be handling invalid/expired session state in your application
> > and
> > by using the above technique, it will work universally, whether you are
> > managing sessions from your actions, CMS, or some other service outside 
> of
> > the conatiner, such as a product like SiteMinder by Netegrity.
> >
> > This will _force_ the browser to do a refresh of the page after 1200
> > seconds
> > (20 minutes), which will allow your app to handle the request (from a 
> now
> > expired session) the same as it would if the user had initiated the
> > request
> > giving a hint of being on a rich client where such events are easily
> > handled.
> >
> >
> >
> >
> > --
> > James Mitchell
> > Software Engineer / Open Source Evangelist
> > Consulting / Mentoring / Freelance
> > EdgeTech, Inc.
> > http://www.edgetechservices.net/
> > 678.910.8017
> > AIM: jmitchtx
> > Yahoo: jmitchtx
> > MSN: [EMAIL PROTECTED]
> >
> >
> >
> >
> > - Original Message -
> > From: "Adam Lipscombe" <[EMAIL PROTECTED]>
> > To: "'Struts Users Mailing List'" 
> > Sent: Thursday, May 12, 2005 6:19 AM
> > Subject: Best practice for redirecting on session timeout?
> >
> >
> >> Folks,
> >>
> >>
> >> I there a standard way of handling session timeouts. If a user has been
> >> inactive for longer than N minutes I want to redirect them to the login
> >> page.
> >>
> >> It occurs to me that this could be done in a) the RequestProcessor or 
> b)
> >> in
> >> an JSP include.
> >>
> >>
> >> Is there another way?
> >> What is best practice?
> >>
> >>
> >> TIA - Adam
> >>
> >>
> >> -
> >> 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]
> 
> 


-- 
-Dave
[EMAIL PROTECTED]


Re: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread David Johnson
hmm I dont think I understand. so instead of redirecting to an action 
mapping, just add the HTML myself, like you would if you were writing a 
servlet (no jsp) application? interesting.

you're right, I dont need a nice tiles definition page for my pdf/xls 
output.. all I really need is to pop up a browser, set the content type, and 
direct the response into the new browser.

is there a way to target a browser like you can in a  but using an 
? like a target="pdfOutput" or something? that might work..

h

On 5/12/05, Benedict, Paul C <[EMAIL PROTECTED]> wrote:
> 
> David,
> 
> You could have your response return HTML with rendered JavaScript; the
> script would then automatically pop open a new window with the destination
> link that generates your unstructured content. You could even provide a 
> link
> in the response if the JavaScript doesn't run automatically.
> 
> Thanks,
> Paul
> 
> -Original Message-
> From: David Johnson [mailto:[EMAIL PROTECTED]
> Sent: Thursday, May 12, 2005 10:31 AM
> To: Struts Users Mailing List; CCNY
> Subject: Opening a NEW browser for a 2nd content type from an action
> 
> Hey all
> 
> is it possible to forme my struts app to open up a second browser window 
> for
> 
> the purpose of streaming a different content type (like a pdf file) into 
> it
> while maintaining the page in the original browser?
> 
> Essentially, I have a nicely rendered HTML report in browser "a" and when
> the user clicks "export to PDF" or "export to excel" I want a NEW browser 
> to
> 
> pop up into which I will send the response with the headerType set to the
> appropriate type.
> 
> the generation of the XL and PDF is handled for me, but the app flow is
> where Im foggy.
> 
> anyone done this?
> 
> --
> -Dave
> [EMAIL PROTECTED]
> 
> 
> --
> Notice: This e-mail message, together with any attachments, contains 
> information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
> Jersey, USA 08889), and/or its affiliates (which may be known outside the 
> United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
> Banyu) that may be confidential, proprietary copyrighted and/or legally 
> privileged. It is intended solely for the use of the individual or entity 
> named on this message. If you are not the intended recipient, and have 
> received this message in error, please notify us immediately by reply e-mail 
> and then delete it from your system.
> 
> --
> 



-- 
-Dave
[EMAIL PROTECTED]


RE: [POLL] What do you use action forms for?

2005-05-12 Thread Allistair Crossley
I've been starting to read up on Spring and I am sure it handles the same BOs 
in the view/model/dao tiers.

> -Original Message-
> From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
> Sent: 12 May 2005 15:34
> To: Struts Users Mailing List
> Subject: Re: [POLL] What do you use action forms for?
> 
> 
> I've always felt the ActionForm had become something that wasn't
> originally intended... I personally use it as something that 
> applies to a
> PAGE and not just a form, so it becomes an I/O object for me 
> in the truest
> sense.
> 
> I love the idea of something like a Velocity-type context.  
> Before I came
> to Struts I was using a custom framework that was similar in 
> that fashion,
> and went a step further in that there was a single 
> WorkContext object that
> handled communication between ALL layers.  I don't think that's the
> optimal solution now, but I think it was a step in the right 
> direction...
> 
> I toyed with implementing a true VTO/BTO pattern in Struts a 
> while back,
> that is, a single VTO (View Transfer Object) that handled all values
> passed to and from the view, and the usual BTO or DTO 
> (Business Transfer
> Object when discussed in the context of a VTO, or just the usual Data
> Transfer Object) to communicate between the controllers and 
> the business
> delegates.
> 
> Most people I think agree with the idea of a single object 
> communicating
> between the control and the model, i.e., I don't see too many people
> saying we should have one object that goes TO a business 
> delegate and one
> that comes FROM that delegate, i.e., two DTOs per model call, 
> although I
> suppose there are some valid arguments for that.  The point 
> being, if you
> agree with that approach, I can't see NOT taking the same 
> approach between
> the control and the view, and likewise, if you do see a two-object
> communication between control and model as better than you 
> likely feel the
> same way about between view and control.
> 
> -- 
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> On Thu, May 12, 2005 10:20 am, Ted Husted said:
> > On 5/12/05, Pedro Salgado <[EMAIL PROTECTED]> wrote:
> >>
> >> Well, your option 1) matched the #2
> >> and
> >> 2) matched the #4
> >>
> >> :)
> >>
> >> Pedro Salgado
> >
> > It might be helpfult to clarify whether by output we mean 
> output that
> > is being used within the  tags, or any arbitrary dynamic
> > output.
> >
> > The intended use of the ActionForm is to represent the values of the
> > controls *within* a form. In Struts 1.1, the scope crept so as to
> > include, for example, lists used to populate controls.
> >
> > The cannonical role of the ActionForm is to represent what the user
> > might input into the form, or to default input on behalf of the user
> > (e.g, to edit values previously input.) I don't know if the latter
> > case, providing default input values, counts as "output" in this
> > thread.
> >
> > Plunking into an ActionForm something like a result list 
> from a search
> > query is an unintended use. The ActionForm was not designed as a
> > Velocity context, but as a way of vetting input from forms.
> >
> > If people are putting result lists on ActionForms, that don't
> > represent input values, then I can understand why multiple 
> ActionForms
> > might be an issue. But, personally, I don't see a 
> compelling argument
> > for putting arbitrary dynamic data on an ActionForm. Any POJO would
> > work as well.
> >
> > I could see a case for a Velocity-type Context that might include an
> > ActionForm as a member, but I would not recommend trying to subvert
> > ActionForms as a Velocity-type Context. If people want a 
> Velocity-type
> > Context, then let's do that, and put the ActionForm inside the page
> > Context.
> >
> > -Ted.
> >
> > 
> -
> > 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]
> 
> 


 
---
QAS Ltd.
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



RE: Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread Benedict, Paul C
David,

You could have your response return HTML with rendered JavaScript; the
script would then automatically pop open a new window with the destination
link that generates your unstructured content. You could even provide a link
in the response if the JavaScript doesn't run automatically.

Thanks,
Paul

-Original Message-
From: David Johnson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 10:31 AM
To: Struts Users Mailing List; CCNY
Subject: Opening a NEW browser for a 2nd content type from an action


Hey all

is it possible to forme my struts app to open up a second browser window for

the purpose of streaming a different content type (like a pdf file) into it 
while maintaining the page in the original browser?

Essentially, I have a nicely rendered HTML report in browser "a" and when 
the user clicks "export to PDF" or "export to excel" I want a NEW browser to

pop up into which I will send the response with the headerType set to the 
appropriate type.

the generation of the XL and PDF is handled for me, but the app flow is 
where Im foggy.

anyone done this?

-- 
-Dave
[EMAIL PROTECTED]



--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Re: Best practice for redirecting on session timeout?

2005-05-12 Thread struts
Although this approach might work, I don't like it so much.  The reasons:

1) Maintainability: if you want to change the timeout to 30 minutes (and
you have 50 jsp pages), then you have to make the change 50 times.

2) Business Logic: This approach will never prevent you Action from
executing.  Since you have to go through an action to reach the jsp page,
when the *page* reloads, you are actually reloading the action first. 
Having said that, if your action does something that should only be
executed if your session has not expired, your approach will not work.

A combination of using a filter & session-config (in web.xml) solves both
problems above.  How?

1) You only have to change the session timeout setting in one place.

2) Your filter is executed before anything else.  Hence, you never have to
worry about an action being executed unintentionally.

Aladin



> That's easy, just drop this in all of your JSPs (preferrably via an
> include
> or let a filter do it for you).
>
> (assuming your session timeout is 20 minutes)
>
> 
>
> You should be handling invalid/expired session state in your application
> and
> by using the above technique, it will work universally, whether you are
> managing sessions from your actions, CMS, or some other service outside of
> the conatiner, such as a product like SiteMinder by Netegrity.
>
> This will _force_ the browser to do a refresh of the page after 1200
> seconds
> (20 minutes), which will allow your app to handle the request (from a now
> expired session) the same as it would if the user had initiated the
> request
> giving a hint of being on a rich client where such events are easily
> handled.
>
>
>
>
> --
> James Mitchell
> Software Engineer / Open Source Evangelist
> Consulting / Mentoring / Freelance
> EdgeTech, Inc.
> http://www.edgetechservices.net/
> 678.910.8017
> AIM:   jmitchtx
> Yahoo: jmitchtx
> MSN:   [EMAIL PROTECTED]
>
>
>
>
> - Original Message -
> From: "Adam Lipscombe" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" 
> Sent: Thursday, May 12, 2005 6:19 AM
> Subject: Best practice for redirecting on session timeout?
>
>
>> Folks,
>>
>>
>> I there a standard way of handling session timeouts. If a user has been
>> inactive for longer than N minutes I want to redirect them to the login
>> page.
>>
>> It occurs to me that this could be done in a) the RequestProcessor or b)
>> in
>> an JSP include.
>>
>>
>> Is there another way?
>> What is best practice?
>>
>>
>> TIA - Adam
>>
>>
>> -
>> 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: [POLL] What do you use action forms for?

2005-05-12 Thread Frank W. Zammetti
I've always felt the ActionForm had become something that wasn't
originally intended... I personally use it as something that applies to a
PAGE and not just a form, so it becomes an I/O object for me in the truest
sense.

I love the idea of something like a Velocity-type context.  Before I came
to Struts I was using a custom framework that was similar in that fashion,
and went a step further in that there was a single WorkContext object that
handled communication between ALL layers.  I don't think that's the
optimal solution now, but I think it was a step in the right direction...

I toyed with implementing a true VTO/BTO pattern in Struts a while back,
that is, a single VTO (View Transfer Object) that handled all values
passed to and from the view, and the usual BTO or DTO (Business Transfer
Object when discussed in the context of a VTO, or just the usual Data
Transfer Object) to communicate between the controllers and the business
delegates.

Most people I think agree with the idea of a single object communicating
between the control and the model, i.e., I don't see too many people
saying we should have one object that goes TO a business delegate and one
that comes FROM that delegate, i.e., two DTOs per model call, although I
suppose there are some valid arguments for that.  The point being, if you
agree with that approach, I can't see NOT taking the same approach between
the control and the view, and likewise, if you do see a two-object
communication between control and model as better than you likely feel the
same way about between view and control.

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

On Thu, May 12, 2005 10:20 am, Ted Husted said:
> On 5/12/05, Pedro Salgado <[EMAIL PROTECTED]> wrote:
>>
>> Well, your option 1) matched the #2
>> and
>> 2) matched the #4
>>
>> :)
>>
>> Pedro Salgado
>
> It might be helpfult to clarify whether by output we mean output that
> is being used within the  tags, or any arbitrary dynamic
> output.
>
> The intended use of the ActionForm is to represent the values of the
> controls *within* a form. In Struts 1.1, the scope crept so as to
> include, for example, lists used to populate controls.
>
> The cannonical role of the ActionForm is to represent what the user
> might input into the form, or to default input on behalf of the user
> (e.g, to edit values previously input.) I don't know if the latter
> case, providing default input values, counts as "output" in this
> thread.
>
> Plunking into an ActionForm something like a result list from a search
> query is an unintended use. The ActionForm was not designed as a
> Velocity context, but as a way of vetting input from forms.
>
> If people are putting result lists on ActionForms, that don't
> represent input values, then I can understand why multiple ActionForms
> might be an issue. But, personally, I don't see a compelling argument
> for putting arbitrary dynamic data on an ActionForm. Any POJO would
> work as well.
>
> I could see a case for a Velocity-type Context that might include an
> ActionForm as a member, but I would not recommend trying to subvert
> ActionForms as a Velocity-type Context. If people want a Velocity-type
> Context, then let's do that, and put the ActionForm inside the page
> Context.
>
> -Ted.
>
> -
> 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]



Opening a NEW browser for a 2nd content type from an action

2005-05-12 Thread David Johnson
Hey all

is it possible to forme my struts app to open up a second browser window for 
the purpose of streaming a different content type (like a pdf file) into it 
while maintaining the page in the original browser?

Essentially, I have a nicely rendered HTML report in browser "a" and when 
the user clicks "export to PDF" or "export to excel" I want a NEW browser to 
pop up into which I will send the response with the headerType set to the 
appropriate type.

the generation of the XL and PDF is handled for me, but the app flow is 
where Im foggy.

anyone done this?

-- 
-Dave
[EMAIL PROTECTED]


RE: [POLL] What do you use action forms for?

2005-05-12 Thread Benedict, Paul C
Ted,

This is my point too. I think the majority of people answered #4 because
data within  tags is I/O, but it's not the type of output (i.e.,
arbitrary display output) I think Michael was trying to convey.

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 10:21 AM
To: Struts Users Mailing List
Subject: Re: [POLL] What do you use action forms for?


On 5/12/05, Pedro Salgado <[EMAIL PROTECTED]> wrote:
> 
> Well, your option 1) matched the #2
> and
> 2) matched the #4
> 
> :)
> 
> Pedro Salgado

It might be helpfult to clarify whether by output we mean output that
is being used within the  tags, or any arbitrary dynamic
output.

The intended use of the ActionForm is to represent the values of the
controls *within* a form. In Struts 1.1, the scope crept so as to
include, for example, lists used to populate controls.

The cannonical role of the ActionForm is to represent what the user
might input into the form, or to default input on behalf of the user
(e.g, to edit values previously input.) I don't know if the latter
case, providing default input values, counts as "output" in this
thread.

Plunking into an ActionForm something like a result list from a search
query is an unintended use. The ActionForm was not designed as a
Velocity context, but as a way of vetting input from forms.

If people are putting result lists on ActionForms, that don't
represent input values, then I can understand why multiple ActionForms
might be an issue. But, personally, I don't see a compelling argument
for putting arbitrary dynamic data on an ActionForm. Any POJO would
work as well.

I could see a case for a Velocity-type Context that might include an
ActionForm as a member, but I would not recommend trying to subvert
ActionForms as a Velocity-type Context. If people want a Velocity-type
Context, then let's do that, and put the ActionForm inside the page
Context.

-Ted.

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





--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Ted Husted
On 5/12/05, Pedro Salgado <[EMAIL PROTECTED]> wrote:
> 
> Well, your option 1) matched the #2
> and
> 2) matched the #4
> 
> :)
> 
> Pedro Salgado

It might be helpfult to clarify whether by output we mean output that
is being used within the  tags, or any arbitrary dynamic
output.

The intended use of the ActionForm is to represent the values of the
controls *within* a form. In Struts 1.1, the scope crept so as to
include, for example, lists used to populate controls.

The cannonical role of the ActionForm is to represent what the user
might input into the form, or to default input on behalf of the user
(e.g, to edit values previously input.) I don't know if the latter
case, providing default input values, counts as "output" in this
thread.

Plunking into an ActionForm something like a result list from a search
query is an unintended use. The ActionForm was not designed as a
Velocity context, but as a way of vetting input from forms.

If people are putting result lists on ActionForms, that don't
represent input values, then I can understand why multiple ActionForms
might be an issue. But, personally, I don't see a compelling argument
for putting arbitrary dynamic data on an ActionForm. Any POJO would
work as well.

I could see a case for a Velocity-type Context that might include an
ActionForm as a member, but I would not recommend trying to subvert
ActionForms as a Velocity-type Context. If people want a Velocity-type
Context, then let's do that, and put the ActionForm inside the page
Context.

-Ted.

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



RE: Best practice for redirecting on session timeout?

2005-05-12 Thread Narayan, Anand
In our application we handle user inactivity using a javascript timer on the
client side.
The requirement we had was to issue a warning message if the user has not
typed 
or clicked anything for some period of time. What we do is once the
javascript timer expires we post a message which the user can click on to
reactivate the timer. Otherwise the user's session is invalidated by sending
a request to some
action class on the server.

I was wondering if such a requirement can be handled on the server side? 


-Original Message-
From: Aladin Alaily [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 12, 2005 8:32 AM
To: Struts Users Mailing List
Subject: Re: Best practice for redirecting on session timeout?


Hi Adam,

One possibility is to have the timing out of the session be managed by 
your container and have the redirection issued by a filter.

If you are using Tomcat 4+ this is very straightforward to implement. 
In the web.xml, you declare your session-timeout value and your filter 
class.  After having declared your filter, you need to map it to a uri 
for which it will be applied.

Aladin



Adam Lipscombe wrote:
> Folks,
> 
> 
> I there a standard way of handling session timeouts. If a user has been
> inactive for longer than N minutes I want to redirect them to the login
> page.
> 
> It occurs to me that this could be done in a) the RequestProcessor or b)
in
> an JSP include.
> 
> 
> Is there another way? 
> What is best practice?
> 
> 
> TIA - Adam
> 
> 
> -
> 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: [POLL] What do you use action forms for?

2005-05-12 Thread Benedict, Paul C
Michael, is #4 clear?? I think people are misunderstanding it. Developers
can use a form for input and output (#4/1), but not put display (pure
output) data in there (#4/2). The difference is between an edit and view
page.

-Original Message-
From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 12, 2005 4:05 AM
To: 'Struts Users Mailing List'
Subject: RE: [POLL] What do you use action forms for?


#4 ..

> #1 - so I generate them from my POJOs using XDoclet.  All the other 
> frameworks I use (JSF, Spring, Tapestry and WebWork) allow me to use
my 
> POJOs directly.
> 
> Matt
> 
> On May 11, 2005, at 4:02 PM, Michael Jouravlev wrote:
> 
> > Turns out, that my way of using action forms differs from many other
> > Struts users' habits. So, I am wondering how do you use action
forms.
> > I could not find the same poll in mailing list archives, so I am
> > starting this one.
> >
> > You can answer here in the thread, or in the poll form, which I
> > created on my site: http://www.superinterface.com/projects.htm But
> > don't answer in both places ;) I wish wiki had a way to do polls.
> >
> > What is your preferred way to use action forms?
> > #1 Prefer not to use action forms at all
> > #2 For input data only (usually collected from HTML form)
> > #3 For output only (to be used in JSP)
> > #4 Same form for input and output
> > #5 One form for input, another for output
> > #6 Other
> >
> > Thanks,
> >Michael.
> >
> >
-
> > 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]





--
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
--

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



Re: Best practice for redirecting on session timeout?

2005-05-12 Thread James Mitchell
That's easy, just drop this in all of your JSPs (preferrably via an include 
or let a filter do it for you).

(assuming your session timeout is 20 minutes)

You should be handling invalid/expired session state in your application and 
by using the above technique, it will work universally, whether you are 
managing sessions from your actions, CMS, or some other service outside of 
the conatiner, such as a product like SiteMinder by Netegrity.

This will _force_ the browser to do a refresh of the page after 1200 seconds 
(20 minutes), which will allow your app to handle the request (from a now 
expired session) the same as it would if the user had initiated the request 
giving a hint of being on a rich client where such events are easily 
handled.


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
Yahoo: jmitchtx
MSN:   [EMAIL PROTECTED]

- Original Message - 
From: "Adam Lipscombe" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" 
Sent: Thursday, May 12, 2005 6:19 AM
Subject: Best practice for redirecting on session timeout?


Folks,
I there a standard way of handling session timeouts. If a user has been
inactive for longer than N minutes I want to redirect them to the login
page.
It occurs to me that this could be done in a) the RequestProcessor or b) 
in
an JSP include.

Is there another way?
What is best practice?
TIA - Adam
-
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: Is struts more performant than JSF

2005-05-12 Thread Frank W. Zammetti
On Thu, May 12, 2005 6:46 am, Ted Husted said:
> If the decision between approaches is not obvious, then do the first
> interation of your application using both, and compare the results for
> yourself.

I don't know what kind of environment you work in, but if I suggested
writing an application twice just to determine which way we should have
done it in the first place, I'd get laughed all the way back to my office
:) LOL

That being said, I don't at all disagree with your underlying point...
Benchmarks you don't do yourself aren't useless, but your results could
vary so widely from them depending on what your doing that you can't make
a decision based soley on such benchmarks.

> If  the decision is not important enough to justify doing one
> interation twice, then you might as well flip a coin and move on :)

Interestingly, we had a rather good debate around here recently about
whether to use JSF or Struts for a new application... we ultimtely decided
to not use JSF at this time (while keeping an eye on it for the future),
but one of the issues that came up was CPU utilization...

The hosting environment we use here charges us back based on CPU
utilization, so this thread struck a chord with me.  We ultimately didn't
use that factor in our decision-making process, but if we had some
existing benchmarks comparing the two it would have been helpful anyway.

I don't know how common CPU utilization chargeback is, but it's a concern
for us here.

Frank

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



Re: [POLL] What do you use action forms for?

2005-05-12 Thread Pedro Salgado

Well, your option 1) matched the #2
and
2) matched the #4

:)

Pedro Salgado

> #1 Prefer not to use action forms at all
> #2 For input data only (usually collected from HTML form)
> #3 For output only (to be used in JSP)
> #4 Same form for input and output
> #5 One form for input, another for output
> #6 Other

On 12/05/2005 14:04, "Ted Husted" <[EMAIL PROTECTED]> wrote:

> My question would be:
> 
> * Under this poll how does the Struts MailReader application use ActionForms?
> 
> I would think the essential question is whether people use ActionForms to
> 
> 1) Harvest or populate only the default values of form controls.
> 2)  Populate other page members, such as the items displayed on a
> drop-down lists.
> 
> In Struts 1.0, the design of the taglib implied (1). In Struts 1.1, we
> extended the tags to make (2) more convenient.
> 
> I tried (2) for a while, but went back to (1).
> 
> I would say that (1) is the "cannonical" approach, and (2) is a
> standard deviation.
> 
> -Ted.
> 
> On 5/11/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
>> By the way, hopefully by input and output data we understand the same
>> information. For example, this wiki page
>> http://wiki.apache.org/struts/StrutsMultipleActionForms treats data
>> from a page point of view: "Most pages have both input data (setup)
>> and output data (request name/value pairs)." That means, that input
>> (setup) data is used to build the page, and output data is sent from
>> the page. I just noticed that ;)
>> 
>> I treat data from action's point of view. Thus, input data is sent
>> from the browser to the action, and output data generated by action
>> and sent to the page.
> 
> -
> 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: My OWN VALIDATOR

2005-05-12 Thread Metal KoRn
OK but I really dont know when to use all of them or some of them can
u explain me
thnx

On 5/12/05, Niall Pemberton <[EMAIL PROTECTED]> wrote:
> This is the same problem you had with your other custom validation method -
> the parameters you've defined in the validation configuration file don't
> match your method signature.
> 
> http://www.mail-archive.com/user@struts.apache.org/msg26221.html
> http://www.mail-archive.com/user@struts.apache.org/msg26175.html
> 
> Niall
> 
> - Original Message -
> From: "Metal KoRn" <[EMAIL PROTECTED]>
> Sent: Thursday, May 12, 2005 5:42 AM
> 
> VALIDATION FAILED
> May 11, 2005 11:29:09 PM org.apache.struts.validator.ValidatorForm validate
> SEVERE: validator.FMValidator.validateList(java.lang.Object,
> org.apache.commons.
> validator.ValidatorAction, org.apache.commons.validator.Field,
> org.apache.struts
> .action.ActionMessages, javax.servlet.http.HttpServletRequest)
> org.apache.commons.validator.ValidatorException:
> validator.FMValidator.validateL
> ist(java.lang.Object, org.apache.commons.validator.ValidatorAction,
> org.apache.c
> ommons.validator.Field, org.apache.struts.action.ActionMessages,
> javax.servlet.h
> ttp.HttpServletRequest)
> at
> org.apache.commons.validator.ValidatorAction.loadValidationMethod(Val
> idatorAction.java:627)
> at
> org.apache.commons.validator.ValidatorAction.executeValidationMethod(
> ValidatorAction.java:557)
> at
> org.apache.commons.validator.Field.validateForRule(Field.java:811)
> at org.apache.commons.validator.Field.validate(Field.java:890)
> at org.apache.commons.validator.Form.validate(Form.java:174)
> at
> org.apache.commons.validator.Validator.validate(Validator.java:367)
> at
> org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java
> :112)
> 
> I want to validate that the lists value of my form arent 0
> 
> this is the validation method in my  FMValidation class
> 
> public static boolean validateList(
> Object bean,
> ValidatorAction va,
> Field field,
> ActionErrors errors,
> HttpServletRequest request) {
> 
> the validation rules is this
>   
> classname="validator.FMValidator"
>method="validateList"
>  methodParams="java.lang.Object,
>org.apache.commons.validator.ValidatorAction,
>org.apache.commons.validator.Field,
>org.apache.struts.action.ActionMessages,
>org.apache.commons.validator.Validator,
>javax.servlet.http.HttpServletRequest"
>   depends=""
>msg="errors.list"/>
> 
> and my validation  is the following (NOTE: the list name Im validating
> is escuela)
> 
> 
> 
> 
> 
> -
> 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: [POLL] What do you use action forms for?

2005-05-12 Thread Pedro Salgado

So you use #2? :)

Pedro Salgado

On 12/05/2005 14:40, "Vic Cekvenich (netsql)" <[EMAIL PROTECTED]> wrote:

> Some of you needs a struts mentor ;-)
> 
> You use display any bean or collection in struts, if it's RO, you don't
> use formBeans and you use JSTL/displaytag.
> If you edit, update, insert, etc, you have to use and map a form bean
> and html tag.
> 
> Often do I see a formBean mapped on a page that only outputs
> Or a new Formbean() in action (when struts gives you the handle)
> 
> 
> .V
> 
> Michael Jouravlev wrote:
>> Turns out, that my way of using action forms differs from many other
>> Struts users' habits. So, I am wondering how do you use action forms.
>> I could not find the same poll in mailing list archives, so I am
>> starting this one.
>> 
>> You can answer here in the thread, or in the poll form, which I
>> created on my site: http://www.superinterface.com/projects.htm But
>> don't answer in both places ;) I wish wiki had a way to do polls.
>> 
>> What is your preferred way to use action forms?
>> #1 Prefer not to use action forms at all
>> #2 For input data only (usually collected from HTML form)
>> #3 For output only (to be used in JSP)
>> #4 Same form for input and output
>> #5 One form for input, another for output
>> #6 Other
>> 
>> Thanks, 
>>Michael.
> 
> 
> -
> 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: [POLL] What do you use action forms for?

2005-05-12 Thread Vic Cekvenich (netsql)
Some of you needs a struts mentor ;-)
You use display any bean or collection in struts, if it's RO, you don't 
use formBeans and you use JSTL/displaytag.
If you edit, update, insert, etc, you have to use and map a form bean 
and html tag.

Often do I see a formBean mapped on a page that only outputs
Or a new Formbean() in action (when struts gives you the handle)
.V
Michael Jouravlev wrote:
Turns out, that my way of using action forms differs from many other
Struts users' habits. So, I am wondering how do you use action forms.
I could not find the same poll in mailing list archives, so I am
starting this one.
You can answer here in the thread, or in the poll form, which I
created on my site: http://www.superinterface.com/projects.htm But
don't answer in both places ;) I wish wiki had a way to do polls.
What is your preferred way to use action forms?
#1 Prefer not to use action forms at all
#2 For input data only (usually collected from HTML form)
#3 For output only (to be used in JSP)
#4 Same form for input and output
#5 One form for input, another for output
#6 Other
Thanks, 
   Michael.

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


Re: Best practice for redirecting on session timeout?

2005-05-12 Thread Aladin Alaily
Hi Adam,
One possibility is to have the timing out of the session be managed by 
your container and have the redirection issued by a filter.

If you are using Tomcat 4+ this is very straightforward to implement. 
In the web.xml, you declare your session-timeout value and your filter 
class.  After having declared your filter, you need to map it to a uri 
for which it will be applied.

Aladin

Adam Lipscombe wrote:
Folks,
I there a standard way of handling session timeouts. If a user has been
inactive for longer than N minutes I want to redirect them to the login
page.
It occurs to me that this could be done in a) the RequestProcessor or b) in
an JSP include.
Is there another way? 
What is best practice?

TIA - Adam
-
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: [POLL] What do you use action forms for?

2005-05-12 Thread Ted Husted
My question would be: 

* Under this poll how does the Struts MailReader application use ActionForms?

I would think the essential question is whether people use ActionForms to 

1) Harvest or populate only the default values of form controls. 
2)  Populate other page members, such as the items displayed on a
drop-down lists.

In Struts 1.0, the design of the taglib implied (1). In Struts 1.1, we
extended the tags to make (2) more convenient.

I tried (2) for a while, but went back to (1). 

I would say that (1) is the "cannonical" approach, and (2) is a
standard deviation.

-Ted.

On 5/11/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote:
> By the way, hopefully by input and output data we understand the same
> information. For example, this wiki page
> http://wiki.apache.org/struts/StrutsMultipleActionForms treats data
> from a page point of view: "Most pages have both input data (setup)
> and output data (request name/value pairs)." That means, that input
> (setup) data is used to build the page, and output data is sent from
> the page. I just noticed that ;)
> 
> I treat data from action's point of view. Thus, input data is sent
> from the browser to the action, and output data generated by action
> and sent to the page.

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



RE: Best practice for redirecting on session timeout?

2005-05-12 Thread Paul McCulloch
How does your system know to send the user to the login page in the first
place?

Typically an application (or the container if you are letting it manage
authentication) detectes that a request is made with no session/an invalid
session/a new session. It then sends the user to the login page.

Assuming your security is managed in such a way then you will just need to
set the session timeout in web.xml to make this happen. This will inavlidate
the session after a specified period of inactivity, so the next request that
is made will be with an invalid session id/new session - so the login page
will be displayed.

Paul


> -Original Message-
> From: Adam Lipscombe [mailto:[EMAIL PROTECTED]
> Sent: 2005/12/05 11:19
> To: 'Struts Users Mailing List'
> Subject: Best practice for redirecting on session timeout?
> 
> 
> Folks,
> 
> 
> I there a standard way of handling session timeouts. If a 
> user has been
> inactive for longer than N minutes I want to redirect them to 
> the login
> page.
> 
> It occurs to me that this could be done in a) the 
> RequestProcessor or b) in
> an JSP include.
> 
> 
> Is there another way? 
> What is best practice?
> 
> 
> TIA - Adam
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message, and notify us 
immediately. If you or your employer does not consent to Internet email 
messages of this kind, please advise us immediately. Opinions, conclusions and 
other information expressed in this message are not given or endorsed by my 
Company or employer unless otherwise indicated by an authorised representative 
independent of this message.
 
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being 
transmitted via electronic mail attachments we cannot guarantee that 
attachments do not contain computer virus code.  You are therefore strongly 
advised to undertake anti virus checks prior to accessing the attachment to 
this electronic mail.  Axios Systems Ltd grants no warranties regarding 
performance use or quality of any attachment and undertakes no liability for 
loss or damage howsoever caused.


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



RE: [POLL] What do you use action forms for?

2005-05-12 Thread Allistair Crossley
;)

> -Original Message-
> From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
> Sent: 12 May 2005 10:16
> To: Struts Users Mailing List
> Subject: RE: [POLL] What do you use action forms for?
> 
> 
> Sorry, but you described #2 and not #4.
> 
> On Thu, 2005-05-12 at 09:49 +0100, Allistair Crossley wrote:
> > #4 is pretty much the standard.
> > 
> > your bean declares fields, you use the struts-html tags to 
> draw your form and link it to the action mapping. also use 
> struts tags to render a block of error messages in a list, or 
> next to each form input. the action mapping declares it uses 
> the form bean. turn validate="true" on. declare your 
> validation rules in validation.xml for your bean. execute the 
> jsp with the form, fill it out, if it fails, your form 
> reloads and struts-html auto-populates the form again for you.
> > 
> > you can also use validate="false" on teh action mapping, 
> which means you get to one of your custom actions and get 
> passed the form in the execute method. you then need to 
> obtain the validation yourself using form.validate() and 
> saveErrors if any are present. you can forward to your form 
> again if you wish and it will still be populated.
> > 
> > that is I believe why #4 is most peoples' answer as it's 
> the most useful.
> > 
> > Allistair.
> > 
> > > -Original Message-
> > > From: Leon Rosenberg [mailto:[EMAIL PROTECTED]
> > > Sent: 12 May 2005 09:42
> > > To: Struts Users Mailing List
> > > Subject: RE: [POLL] What do you use action forms for?
> > > 
> > > 
> > > To all of the #4 voter.
> > > 
> > > Can you bring in an example? 
> > > I mean what exactly do you show on the output page?
> > > 
> > > thanx
> > > Leon
> > > 
> > > > 
> > > > -Original Message-
> > > > From: Marco Mistroni [mailto:[EMAIL PROTECTED] 
> > > > Sent: 12 May 2005 09:05
> > > > To: 'Struts Users Mailing List'
> > > > Subject: RE: [POLL] What do you use action forms for?
> > > > 
> > > > 
> > > > #4 ..
> > > > 
> > > > > #1 - so I generate them from my POJOs using XDoclet.  All 
> > > the other 
> > > > > frameworks I use (JSF, Spring, Tapestry and WebWork) 
> > > allow me to use
> > > > my 
> > > > > POJOs directly.
> > > > > 
> > > > > Matt
> > > > > 
> > > > > On May 11, 2005, at 4:02 PM, Michael Jouravlev wrote:
> > > > > 
> > > > > > Turns out, that my way of using action forms differs 
> > > from many other
> > > > > > Struts users' habits. So, I am wondering how do you 
> use action
> > > > forms.
> > > > > > I could not find the same poll in mailing list 
> archives, so I am
> > > > > > starting this one.
> > > > > >
> > > > > > You can answer here in the thread, or in the poll 
> form, which I
> > > > > > created on my site: 
> > > http://www.superinterface.com/projects.htm But
> > > > > > don't answer in both places ;) I wish wiki had a way to 
> > > do polls.
> > > > > >
> > > > > > What is your preferred way to use action forms?
> > > > > > #1 Prefer not to use action forms at all
> > > > > > #2 For input data only (usually collected from HTML form)
> > > > > > #3 For output only (to be used in JSP)
> > > > > > #4 Same form for input and output
> > > > > > #5 One form for input, another for output
> > > > > > #6 Other
> > > > > >
> > > > > > Thanks,
> > > > > >Michael.
> > > > > >
> > > > > >
> > > > 
> > > 
> -
> > > > > > 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]
> > > > 
> > > > 
> > > > 
> > > --
> > > --
> > > > The information contained herein is confidential and is 
> > > intended solely for the
> > > > addressee. Access by any other party is unauthorised 
> > > without the express
> > > > written permission of the sender. If you are not the 
> > > intended recipient, please
> > > > contact the sender either via the company switchboard on 
> > > +44 (0)20 7623 8000, or
> > > > via e-mail return. If you have received this e-mail in 
> > > error or wish to read our
> > > > e-mail disclaimer statement and monitoring policy, 
> please refer to 
> > > > http://www.drkw.com/disc/email/ or contact the sender. 3167
> > > > 
> > > 

Re: Is struts more performant than JSF

2005-05-12 Thread Ted Husted
On 5/10/05, Yan Hu <[EMAIL PROTECTED]> wrote:
> Hi:
> I have been playing with JSF lately.  I really like it since it is very 
> intuitive.  But as I
> understand it, JSF keeps a component tree for each page with JSF widgets in 
> it on the server. So
> it is heavy weight compared with struts. Could I safely say that struts-based 
> apps are a bit more
> performant than JSF ones? someone please shed some light on it...

It wasn't long ago that we were having *exactly* the same conversation
regarding Struts versus scriptlet-based applications. The more things
change the more they stay the same :)

If performance is a primary concern, then the best advice is to run
your own benchmarks. When it comes to performance, it's not a good
idea to trust anyone else's tests, because your mileage can, and
probably will, vary. Often, we may not ever be talking about a
difference that makes a difference.

It's especially hard to compare performance between applications
written by different people at different times, perhaps for different
reasons. The Petstore debacle taught us that.

If the decision between approaches is not obvious, then do the first
interation of your application using both, and compare the results for
yourself.

If  the decision is not important enough to justify doing one
interation twice, then you might as well flip a coin and move on :)

-Ted.

PS - If you are coming from a  Struts background, a very good JSF
primer is "Mastering JavaServer Faces" by Dudney at all.

* 
http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId=139

Commissions for books purchased through this link go directly to the ASF.

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



RE: using html link to submit form and params

2005-05-12 Thread Marsh-Bourdon, Christopher
Set a hidden field within the form, which you could dynamically set using
JavaScript, and example would be:







I roughly grafted this from my JavaScript methods, but it should work!

Christopher Marsh-Bourdon
www.marsh-bourdon.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 11:28
To: user@struts.apache.org
Subject: RE: using html link to submit form and params


The href="javascript:document.{Form Name}.submit();" will allow me to submit
the form but how would I send the request parameter through which the
forward
allows me to send.

Eg:






for this particular link I am also sending action=edit as a request param

Thanks



-Original Message-
From: Marsh-Bourdon, Christopher [mailto:[EMAIL PROTECTED]

Sent: 12 May 2005 11:23
To: 'Struts Users Mailing List'
Subject: RE: using html link to submit form and params

Get rid of the forward, I tend to use just HTML tags for this, but it should
work if you lop off the forward, as the form handles the POST.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 11:21
To: user@struts.apache.org
Subject: RE: using html link to submit form and params


Would I use the href tag in addition to using the forward tag within the
link?




-Original Message-
From: Marsh-Bourdon, Christopher [mailto:[EMAIL PROTECTED]

Sent: 12 May 2005 11:16
To: 'Struts Users Mailing List'
Subject: RE: using html link to submit form and params

If set your href of the link to be something like this:

href="javascript:document.{Form Name}.submit();" 

Then the form will be submitted and your form values will not be set to
null.

Christopher Marsh-Bourdon
www.marsh-bourdon.com



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 11:12
To: user@struts.apache.org
Subject: using html link to submit form and params



I have a search page which allows the user to perform multiple actions. i.e
The user can select a returned row and then he can edit or delete via a
link.

However if I use the following link tag in my jsp:



This is encompassed within a form tag.

The struts config has the following:







and:





If I do it this way the actionform values are null when retrieved from the
action class.

What is the best way to submit a form using a link and at the same time pass
a request parameter through to identify which link has been clicked so that
the appropriate action can be carried out in the action class. 




This email may contain information which is privileged or confidential. If
you are not the intended recipient of this email, please notify the sender
immediately and delete it without reading, copying, storing, forwarding or
disclosing its contents to any other person
Thank you

Check us out at http://www.bt.com/consulting




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



-
---
The information contained herein is confidential and is intended solely for
the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient,
please
contact the sender either via the company switchboard on +44 (0)20 7623
8000,
or
via e-mail return. If you have received this e-mail in error or wish to read
our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3167

-
---


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





This email may contain information which is privileged or confidential. If
you are not the intended recipient of this email, please notify the sender
immediately and delete it without reading, copying, storing, forwarding or
disclosing its contents to any other person
Thank you

Check us out at http://www.bt.com/consulting




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



-
---
The information contained herein is confidential and is intended solely for
the
addressee. Access by any other party is unauthorised without the express 
written permission of the sender. If you are not the intended recipient,
pl

RE: using html link to submit form and params

2005-05-12 Thread Faisal.Shoukat
The href="javascript:document.{Form Name}.submit();" will allow me to submit
the form but how would I send the request parameter through which the forward
allows me to send.

Eg:






for this particular link I am also sending action=edit as a request param

Thanks



-Original Message-
From: Marsh-Bourdon, Christopher [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 11:23
To: 'Struts Users Mailing List'
Subject: RE: using html link to submit form and params

Get rid of the forward, I tend to use just HTML tags for this, but it should
work if you lop off the forward, as the form handles the POST.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 11:21
To: user@struts.apache.org
Subject: RE: using html link to submit form and params


Would I use the href tag in addition to using the forward tag within the
link?




-Original Message-
From: Marsh-Bourdon, Christopher [mailto:[EMAIL PROTECTED]

Sent: 12 May 2005 11:16
To: 'Struts Users Mailing List'
Subject: RE: using html link to submit form and params

If set your href of the link to be something like this:

href="javascript:document.{Form Name}.submit();" 

Then the form will be submitted and your form values will not be set to
null.

Christopher Marsh-Bourdon
www.marsh-bourdon.com



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 11:12
To: user@struts.apache.org
Subject: using html link to submit form and params



I have a search page which allows the user to perform multiple actions. i.e
The user can select a returned row and then he can edit or delete via a
link.

However if I use the following link tag in my jsp:



This is encompassed within a form tag.

The struts config has the following:







and:





If I do it this way the actionform values are null when retrieved from the
action class.

What is the best way to submit a form using a link and at the same time pass
a request parameter through to identify which link has been clicked so that
the appropriate action can be carried out in the action class. 




This email may contain information which is privileged or confidential. If
you are not the intended recipient of this email, please notify the sender
immediately and delete it without reading, copying, storing, forwarding or
disclosing its contents to any other person
Thank you

Check us out at http://www.bt.com/consulting




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



-
---
The information contained herein is confidential and is intended solely for
the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient,
please
contact the sender either via the company switchboard on +44 (0)20 7623
8000,
or
via e-mail return. If you have received this e-mail in error or wish to read
our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3167

-
---


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





This email may contain information which is privileged or confidential. If
you are not the intended recipient of this email, please notify the sender
immediately and delete it without reading, copying, storing, forwarding or
disclosing its contents to any other person
Thank you

Check us out at http://www.bt.com/consulting




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


-
---
The information contained herein is confidential and is intended solely for
the
addressee. Access by any other party is unauthorised without the express 
written permission of the sender. If you are not the intended recipient,
please 
contact the sender either via the company switchboard on +44 (0)20 7623 8000,
or
via e-mail return. If you have received this e-mail in error or wish to read
our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3166
-
---



Re: Best practice for redirecting on session timeout?

2005-05-12 Thread Shailender Jain
Hello,

It should be done in the RequestProcessor.
If none of your JSP is doing a forward to other JSP directly.

Shailender Jain

Adam Lipscombe wrote:

> Folks,
>
> I there a standard way of handling session timeouts. If a user has been
> inactive for longer than N minutes I want to redirect them to the login
> page.
>
> It occurs to me that this could be done in a) the RequestProcessor or b) in
> an JSP include.
>
> Is there another way?
> What is best practice?
>
> TIA - Adam
>
> -
> 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: using html link to submit form and params

2005-05-12 Thread Marsh-Bourdon, Christopher
Get rid of the forward, I tend to use just HTML tags for this, but it should
work if you lop off the forward, as the form handles the POST.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 11:21
To: user@struts.apache.org
Subject: RE: using html link to submit form and params


Would I use the href tag in addition to using the forward tag within the
link?




-Original Message-
From: Marsh-Bourdon, Christopher [mailto:[EMAIL PROTECTED]

Sent: 12 May 2005 11:16
To: 'Struts Users Mailing List'
Subject: RE: using html link to submit form and params

If set your href of the link to be something like this:

href="javascript:document.{Form Name}.submit();" 

Then the form will be submitted and your form values will not be set to
null.

Christopher Marsh-Bourdon
www.marsh-bourdon.com



-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 12 May 2005 11:12
To: user@struts.apache.org
Subject: using html link to submit form and params



I have a search page which allows the user to perform multiple actions. i.e
The user can select a returned row and then he can edit or delete via a
link.

However if I use the following link tag in my jsp:



This is encompassed within a form tag.

The struts config has the following:







and:





If I do it this way the actionform values are null when retrieved from the
action class.

What is the best way to submit a form using a link and at the same time pass
a request parameter through to identify which link has been clicked so that
the appropriate action can be carried out in the action class. 




This email may contain information which is privileged or confidential. If
you are not the intended recipient of this email, please notify the sender
immediately and delete it without reading, copying, storing, forwarding or
disclosing its contents to any other person
Thank you

Check us out at http://www.bt.com/consulting




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



-
---
The information contained herein is confidential and is intended solely for
the
addressee. Access by any other party is unauthorised without the express
written permission of the sender. If you are not the intended recipient,
please
contact the sender either via the company switchboard on +44 (0)20 7623
8000,
or
via e-mail return. If you have received this e-mail in error or wish to read
our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3167

-
---


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





This email may contain information which is privileged or confidential. If
you are not the intended recipient of this email, please notify the sender
immediately and delete it without reading, copying, storing, forwarding or
disclosing its contents to any other person
Thank you

Check us out at http://www.bt.com/consulting




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



The information contained herein is confidential and is intended solely for the
addressee. Access by any other party is unauthorised without the express 
written permission of the sender. If you are not the intended recipient, please 
contact the sender either via the company switchboard on +44 (0)20 7623 8000, or
via e-mail return. If you have received this e-mail in error or wish to read our
e-mail disclaimer statement and monitoring policy, please refer to 
http://www.drkw.com/disc/email/ or contact the sender. 3166



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



  1   2   >