request attributes and failed validation

2004-01-31 Thread Ian Joyce
In my Action I am populating an ActionForm with data from a database.  I am also 
setting some additional request attributes with Lists of beans.  The purpose of these 
Lists are to create various drop down boxes in the form.  This works well, however 
when the form is submitted and validation fails these attributes are no longer in the 
request and the drop down boxes aren't created.

What is the best way to have these Lists avaiable when the validation fails?


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



Re: request attributes and failed validation

2004-01-31 Thread Michael McGrady
One way is to put them temporarily in the session.  But, why not just do it 
again?  Is it too slow?

At 11:28 PM 1/30/2004, you wrote:
In my Action I am populating an ActionForm with data from a database.  I 
am also setting some additional request attributes with Lists of 
beans.  The purpose of these Lists are to create various drop down boxes 
in the form.  This works well, however when the form is submitted and 
validation fails these attributes are no longer in the request and the 
drop down boxes aren't created.

What is the best way to have these Lists avaiable when the validation fails?

-
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: request attributes and failed validation

2004-01-31 Thread Ian Joyce
It's not slow, the lists are created from data from a database.  I am assuming when 
you say 'do it again' you mean add these Lists to the request.  Where should this be 
done at?

>>> [EMAIL PROTECTED] 01/31/04 01:48 AM >>>
One way is to put them temporarily in the session.  But, why not just do it 
again?  Is it too slow?

At 11:28 PM 1/30/2004, you wrote:
>In my Action I am populating an ActionForm with data from a database.  I 
>am also setting some additional request attributes with Lists of 
>beans.  The purpose of these Lists are to create various drop down boxes 
>in the form.  This works well, however when the form is submitted and 
>validation fails these attributes are no longer in the request and the 
>drop down boxes aren't created.
>
>What is the best way to have these Lists avaiable when the validation fails?


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



RE: What does "do" stand for in .do files

2004-01-31 Thread Craig R. McClanahan
Quoting "Gopalakrishnan, Jayesh" <[EMAIL PROTECTED]>:

> The "do" is insignificant, its just what all the sample applications use and
> has somehow stayed on.

In the technical sense ("could I use "foo" instead of "do") you are absolutely
right ... there is no intrinsic meaning to "do".  However, for native speakers
of English, "do" has a natural connotation of 'go DO something" that I wanted
to pick up on, so that was my choice for the "example" mappings for the Struts
controller servlet.

Craig McClanahan

PS:  Being constructively lazy, it's also very easy to type :-).


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



Re: request attributes and failed validation

2004-01-31 Thread Michael McGrady
I assume you want to do this after the validation fails, i.e. that timing 
(when) not placement (where) is the issue.  Exactly how you want to do this 
depends on the details of your application.  Not knowing these details 
makes it difficult, but just guessing would lead me to think that having 
something like a Composite Pattern in the session would make sense, to 
borrow some good ideas from the J2EE boys.  There are just so many ways you 
could do this.  The tracking and performance of the "cursor," as it were, 
is completely up to you.  That is one of the nice things about Struts: with 
few exceptions, you have enough control at every stage to do whatever you 
want to do.  You can, for example, make validation "fail" in numerous 
ways.  You are not stuck with any particular paradigm.  You can do it the 
usual way usually, but in your case, maybe you need to have it "fail" with 
a little more controller designed activity.  Does this make sense to you 
when put this way?

Michael McGrady



At 12:01 AM 1/31/2004, you wrote:
It's not slow, the lists are created from data from a database.  I am 
assuming when you say 'do it again' you mean add these Lists to the 
request.  Where should this be done at?

>>> [EMAIL PROTECTED] 01/31/04 01:48 AM >>>
One way is to put them temporarily in the session.  But, why not just do it
again?  Is it too slow?
At 11:28 PM 1/30/2004, you wrote:
>In my Action I am populating an ActionForm with data from a database.  I
>am also setting some additional request attributes with Lists of
>beans.  The purpose of these Lists are to create various drop down boxes
>in the form.  This works well, however when the form is submitted and
>validation fails these attributes are no longer in the request and the
>drop down boxes aren't created.
>
>What is the best way to have these Lists avaiable when the validation fails?
-
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: request attributes and failed validation

2004-01-31 Thread Hubert Rabago
This is the reasons I sometimes have an action in my "input" action
attribute.  What I mean is:






...


I sometimes (often?) use the Action that generated the form as my input
because my form has controls that need to be initialized (like your drop
downs).
Using an Action as "input" sometimes takes more work.  Your action should
know that it's only redisplaying a form and not reset all form values (or
else the user will have to reinput everything instead of just correct the
validation error).  
You *can* avoid this by placing your list in session scope, like Mike
suggested.  If it's used often enough, you can put it in application scope,
though you'd have to define when "often enough" is justified.  
Try the session scope approach first.

hth,
Hubert

--- Ian Joyce <[EMAIL PROTECTED]> wrote:
> It's not slow, the lists are created from data from a database.  I am
> assuming when you say 'do it again' you mean add these Lists to the
> request.  Where should this be done at?
> 
> >>> [EMAIL PROTECTED] 01/31/04 01:48 AM >>>
> One way is to put them temporarily in the session.  But, why not just do it
> 
> again?  Is it too slow?
> 
> At 11:28 PM 1/30/2004, you wrote:
> >In my Action I am populating an ActionForm with data from a database.  I 
> >am also setting some additional request attributes with Lists of 
> >beans.  The purpose of these Lists are to create various drop down boxes 
> >in the form.  This works well, however when the form is submitted and 
> >validation fails these attributes are no longer in the request and the 
> >drop down boxes aren't created.
> >
> >What is the best way to have these Lists avaiable when the validation
> fails?
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

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



Populating a DynaActionForm with a complex object graph

2004-01-31 Thread Doug Dixon
Hi

I'm trying to populate a DynaActionForm dynamically, using this how-to as a
starting point: http://www.developer.com/java/other/article.php/2233591

Because the number of elements in my form can vary at runtime, I take the
advice near the bottom of the article:

""" You can even dynamically specify the size of the form (and 
prepopulate it) at run time [...] by using an Action instead of a 
forward to precreate the form-property value, and leaving the size 
parameter out.  The actual can then create an array of the appropriate 
size and prepopulate values.."""

So my Action instantiates the right number of beans in the form and then
hands off to the JSP, no problem. 

However, my model isn't a simple array (as in all the examples I can find) -
it's a complex object graph: I have one or more Flights, each of which can
contain one or more Passengers, each of which has multiple properties (name,
etc.)

This means I need another level of iteration, a bit like this (if it
worked!):



Flight

   Passenger
   Name: 




This doesn't work - I just get HTML like this:

Flight

Passenger
Name: 


Flight


Passenger
Name: 


Which obviously won't work I need to end up with something like

Flight

Passenger
Name: 


Flight


Passenger
Name: 



Does anyone know if there is some way of doing this with DynaActionForms? Or
am I going to have to do nasty manual indexing with Map or List backed
ActionForms?

Thanks for any help


This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk


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



Business Exception and JSP

2004-01-31 Thread Namasivayam, Sudhakar (Cognizant)
Title: Business Exception  and JSP






Hi all,

  I would want to display the business exception that are thrown to a separate jsp page.  

Please suggest some way in which i can approach this 



Thanks in advance,

Sudhakar




This e-mail and any files transmitted with it are for the sole use of the intended 
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or 
copying of this email or any action taken in reliance on this e-mail is strictly 
prohibited and may be unlawful.

Visit us at http://www.cognizant.com

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

AW: SecurityFilter with Struts

2004-01-31 Thread Dirk Manske (Service Respond)
thanks max. Now I have done it this way: I have a struts login form which
submits to a LoginAction. There I check the user from a db and store the
data in a session. The LoginAction forwards to the main page which is
secured. SecurityFilter looks now for a file which I titled
j_security_check.jsp. This file is an ordinary html form which submits
automatically using javascript. the input types are therefore hidden. This
works like a charm. 

However, I have a second application which uses frames. I tried to apply the
above pattern the same way and surprisingly it only works the first time a
user logs in. after that, if a user logs in (it does not matter if it is the
same user or not) I get a NullPointerException caused by the RealmClass
(which is extended from SimpleRealmBase...) in method isUserInRole. I traced
it and found out that the username is null. But if you reload the page
everything works... it is strange. I guess this has something to do with the
second isUserInRole method were the principal is checked against null, and
if it is not, the username gets populated. 

any idea max?

thx,
Dirk

-Ursprüngliche Nachricht-
Von: Max Cooper [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 30. Januar 2004 22:24
An: Struts Users Mailing List
Betreff: Re: SecurityFilter with Struts

Oops, this isn't entirely true: "There is no way to call an Action during
the authentication process."

You can have your login page be an action (/login.do) -- I just meant that
you can't execute an action when that page is submitted. In other words, you
can't process the login request with an Action, or have an Action do
additional authentication-time processing when the login page is submitted.

-Max

- Original Message -
From: "Max Cooper" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Friday, January 30, 2004 1:19 PM
Subject: Re: SecurityFilter with Struts


> Use a regular form tag for the login page. The form will not be submitted
to
> a Struts action but rather it will be processed by the filter. There is no
> way to call an Action during the authentication process. This is very
> similar to how container-managed security works.
>
> One difference between container security and SecurityFilter is that you
can
> specify a "default" page to send the user to after they login, if they
> arrive at the login page on their own. Normally, users are automatically
> sent to the login page by the filter (just like container security) when
> they try to access a page they need to be authenticated for. If that is
the
> case, SecurityFilter will redirect them to the page they were going to
after
> they are authenticated:
>
> SCENARIO 1: User goes directly to login page:
>
> GET /login.jsp
> POST /j_security_check
> (server redirects user to the configured "default" page -- /defaultPage.do
> in this example)
> GET /defaultPage.do
>
> SCENARIO 2: Filter sends user to login page
>
> GET /mustBeLoggedInToSeeThisPage.do
> (server redirects to /login.jsp)
> GET /login.jsp
> POST /j_security_check
> (server redirects to /mustBeLoggedInToSeeThisPage.do)
> GET /mustBeLoggedInToSeeThisPage.do
>
> -Max
>
> - Original Message - 
> From: "Dirk Manske (Service Respond)" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, January 30, 2004 6:00 AM
> Subject: SecurityFilter with Struts
>
>
> > Hi,
> >
> > I try to integrate SecurityFilter 1.1 in my struts app. I understand
that
> I
> > have to use "j_security_check" in my form action to setup
SecurityFilter.
> > But how does it work within a ? Because "j_security_check"
> always
> > gets populated to "j_security_check.do" the SecurityFilter will never be
> > called!? So how should my login.jsp be designed to pass
"j_security_check"
> > and after this forward to an struts action class?
> >
> > any idea?
> >
> >  thanks,
> >
> > Dirk
> >
>
>
> -
> 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: Using "bean:write" as a tag's value atrribute

2004-01-31 Thread Mailing List


Thank you very much 
Bean:define solved the problem



-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 29, 2004 3:45 PM
To: Struts Users Mailing List
Subject: Re: Using "bean:write" as a tag's value atrribute





Nico.



> 
> Dear All;
> 
> Using  works
properly
> in my jsp page body. But when I want to use it in a tag to fill its
> attribute, it fails.
>  Actually I don't know the syntax of using bean:write, obviously the below
> way is wrong:
> 
> ">
> 
> Using expression is wrong, too:
> 
>   value="<%=%>">
> 
> So how could I use bean:write in my tags?!
> 
> Any help would be greatly appreciated
> Nafise
> 
> 
> -
> 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]



list tag validation

2004-01-31 Thread Mailing List
Dear All;
 
I wanna to validate a list box if it's empty or not. Obviously using
javascript will solve the problem, but I want to do it via Validation
Framework.
 
Is there any way to validate a select box if it has any options or not in
validation.xml?
 
Thank you
Nafise


Re: Response not XHTML-comliant when using

2004-01-31 Thread Andreas Amstutz
Thanks for the anwers so far.
But it is not working for me, because I still have this extra  
tags included.
I have done the following xperiments:



<%@ include file="../includes/navigation.jsp" %>


All of them included extra 

I simply do not get it! 
Maybe some of you can put some light on this mystery :-)

Here is my code:
---
main.jsp
---

<%@ taglib uri="struts-html"prefix="html" %>
<%@ taglib uri="struts-tiles"   prefix="tiles" %>
<%@ taglib uri="sitemesh-page"  prefix="page" %>
<%@ taglib uri="sitemesh-decorator" prefix="decorator" %>
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>



  
  SomeName - 
  
  


  

  
  
  <%@ include file="../includes/navigation.jsp" %>
  

  


   
   (printable version)
   

  




includes/navigation.jsp

<%@ taglib uri="struts-html"  prefix="html" %>



  


   Search

 


  

  



---
And this is the output:
---

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>


  

SomeName - JSP counter

  
  



  

Search

  
 
 
  

  



  
 The current count is... 2
 
   
(printable version)
   
 
  
  



---
validation results:
---
Document type does not permit element ââ
in content of element ââ.
Document type does not permit element ââ
in content of element ââ.
Value of attribute âmethodâ for element ââ is invalid; 
Value must be one of {"get","post"}.
Document type does not permit element ââ 
in content of element ââ.
Close tag for element ââ omitted 
but document type doesn't permit it.


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



indexed checkbox and set method

2004-01-31 Thread Emmanuel
I want to use a form that looks like this :







..


I made my form bean with this get :
public class AddRACIForm extends ActionForm {
private List prop = new ArrayList();
..
public void setIndexProp(int key, Object myobject) {
this.prop.set(key, myobject);
}
}

But if I check both boxes "value1" and "value2" for, say, indexProp[1], the Object 
myobject I get in setIndexProp() is the String "value1" only (and never "value2").

How can I do to get an array of string[] in my action form, instead of a string ?


Thanks in advance,
Emmanuel



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.560 / Virus Database: 352 - Release Date: 08/01/2004

Detect messages with Jstl

2004-01-31 Thread Axel Wilhelm Berle
Hi everybody!

I am experimenting with the  tags of
Struts 1.1. My problem is that I need to discover if
there are any messages. Of course, there is the
 tag, but I am trying to avoid
the logic tag library. So my question is: What would
be the elegant way to discover the presence of
messages using the jstl core taglib?

Thanks in advance!

Axel



=
Axel Wilhelm Berle

e-mail: [EMAIL PROTECTED]
Tel: (office) +55 16 618.0090
 (mobile) +55 16 9964.6343




Mit schönen Grüßen von Yahoo! Mail - http://mail.yahoo.de

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



Re: request attributes and failed validation

2004-01-31 Thread Michael McGrady
Egg-zackly, Hubert.  Nice work!  Also, in an action we can go anywhere 
programmatically that we want, so there is no restriction by the input 
attribute, only a possibility.  Wherever the "cursor" is in the course of 
the request's way to a response, we can go wherever we like and have 
whatever we want there.  This is, for me, the beauty of MVC-like pattern in 
Struts and similar frameworks.  No matter what the framework, we always 
have controls, but these make a lot more sense than fluffing up JSP pages, 
etc.  Lord, this is WAY to philosophical, but hopefully it is helpful to 
the "question askeree".

At 01:58 AM 1/31/2004, Hubert Rabago wrote:
This is the reasons I sometimes have an action in my "input" action
attribute.  What I mean is:




...

I sometimes (often?) use the Action that generated the form as my input
because my form has controls that need to be initialized (like your drop
downs).
Using an Action as "input" sometimes takes more work.  Your action should
know that it's only redisplaying a form and not reset all form values (or
else the user will have to reinput everything instead of just correct the
validation error).
You *can* avoid this by placing your list in session scope, like Mike
suggested.  If it's used often enough, you can put it in application scope,
though you'd have to define when "often enough" is justified.
Try the session scope approach first.
hth,
Hubert
--- Ian Joyce <[EMAIL PROTECTED]> wrote:
> It's not slow, the lists are created from data from a database.  I am
> assuming when you say 'do it again' you mean add these Lists to the
> request.  Where should this be done at?
>
> >>> [EMAIL PROTECTED] 01/31/04 01:48 AM >>>
> One way is to put them temporarily in the session.  But, why not just do it
>
> again?  Is it too slow?
>
> At 11:28 PM 1/30/2004, you wrote:
> >In my Action I am populating an ActionForm with data from a database.  I
> >am also setting some additional request attributes with Lists of
> >beans.  The purpose of these Lists are to create various drop down boxes
> >in the form.  This works well, however when the form is submitted and
> >validation fails these attributes are no longer in the request and the
> >drop down boxes aren't created.
> >
> >What is the best way to have these Lists avaiable when the validation
> fails?
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
__
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/
-
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: Response not XHTML-comliant when using

2004-01-31 Thread Michael McGrady
I have run into similar difficulties with Tiles and have just made do.  I 
welcome all insights in this area.  Glad this issue is getting air.

At 07:59 AM 1/31/2004, you wrote:
Thanks for the anwers so far.

But it is not working for me, because I still have this extra 

tags included.

I have done the following xperiments:







<%@ include file="../includes/navigation.jsp" %>



page="/WEB-INF/jsp/includes/navigation.jsp"  />



All of them included extra 



I simply do not get it!

Maybe some of you can put some light on this mystery :-)



Here is my code:

---

main.jsp

---



<%@ taglib uri="struts-html"prefix="html" %>

<%@ taglib uri="struts-tiles"   prefix="tiles" %>

<%@ taglib uri="sitemesh-page"  prefix="page" %>

<%@ taglib uri="sitemesh-decorator" prefix="decorator" %>



"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>



<%@ include file="../includes/navigation.jsp" %>

(printable version)
 includes/navigation.jsp  <%@ 
taglib uri="struts-html" prefix="html" %>
[]
 Search
--- And this is the output: 
---
Search



  

 The current count is... 2

 

   

(printable version)

   

 

  

  







---

validation results:

---

Document type does not permit element “”

in content of element “”.

Document type does not permit element “”

in content of element “”.

Value of attribute “method” for element “” is invalid;

Value must be one of {"get","post"}.

Document type does not permit element “”

in content of element “”.

Close tag for element “” omitted

but document type doesn't permit it.

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


Processing a large number of records

2004-01-31 Thread Zoran Avtarovski
I am building a feature into my app that will allow users to generate
printable results from data. The number of results is in the thousands and
the problem I'm having is that the http request timeouts before the data
processing is complete.

The method I've adopted is to take a arrayList of data objects and then
iterate through the list and generate an arrayList of result objects which I
can either pass to a jsp page for rendering or convert to a pdf document.

The problem I have is that when the list of data objects is small (a couple
of hundred) it works fine, but when the list is large (3 or 4  thousand) the
data processing isn't complete when the request times out. Is there a way to
flush the response after each loop and keep the connection alive.

Any suggestions would be greatly appreciated.

Zoran


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



Re: bug in latest validator-rules.xml ?

2004-01-31 Thread Joe Germuska
At 11:54 AM -0600 1/30/04, Matt Bathje wrote:
Joe - this is working fine for me with the 1/13/2004 nightly build. I have
tried with commons-validator-1.1.1.jar and with whatever version the
commons-validator.jar in the 1/13 nightly build of struts is.
Validation worked right out of the box - all I did to "install" the nightly
build was copy over the jar, tld and xml files from the zip file.
Based on that it seems like if there is a bug, it is in struts and probably
in the newer nightly builds. (Doesn't seem like it would be in
validator-rules.xml itself though, that hasn't been updated since december)
Nah, the bug was in my commons-validator-1.1.1.jar  Somehow I got a 
version which didn't have the javascript in it.

Thanks for providing a "worksforme" though; it helped me look harder 
at my own install.

Joe

--
Joe Germuska
[EMAIL PROTECTED]  
http://blog.germuska.com
  "Imagine if every Thursday your shoes exploded if you tied them 
the usual way.  This happens to us all the time with computers, and 
nobody thinks of complaining."
-- Jef Raskin

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


Re: request attributes and failed validation

2004-01-31 Thread Ian Joyce
This was exactly what I was looking for. Thanks.  

If anyone is interested in details I'd be happy to share...

>>> [EMAIL PROTECTED] 01/31/04 03:59 AM >>>
This is the reasons I sometimes have an action in my "input" action
attribute.  What I mean is:






...


I sometimes (often?) use the Action that generated the form as my input
because my form has controls that need to be initialized (like your drop
downs).
Using an Action as "input" sometimes takes more work.  Your action should
know that it's only redisplaying a form and not reset all form values (or
else the user will have to reinput everything instead of just correct the
validation error).  
You *can* avoid this by placing your list in session scope, like Mike
suggested.  If it's used often enough, you can put it in application scope,
though you'd have to define when "often enough" is justified.  
Try the session scope approach first.

hth,
Hubert

--- Ian Joyce <[EMAIL PROTECTED]> wrote:
> It's not slow, the lists are created from data from a database.  I am
> assuming when you say 'do it again' you mean add these Lists to the
> request.  Where should this be done at?
> 
> >>> [EMAIL PROTECTED] 01/31/04 01:48 AM >>>
> One way is to put them temporarily in the session.  But, why not just do it
> 
> again?  Is it too slow?
> 
> At 11:28 PM 1/30/2004, you wrote:
> >In my Action I am populating an ActionForm with data from a database.  I 
> >am also setting some additional request attributes with Lists of 
> >beans.  The purpose of these Lists are to create various drop down boxes 
> >in the form.  This works well, however when the form is submitted and 
> >validation fails these attributes are no longer in the request and the 
> >drop down boxes aren't created.
> >
> >What is the best way to have these Lists avaiable when the validation
> fails?


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



Re: Parameter ???

2004-01-31 Thread Otávio Augusto
Don't use the "ção" expression. Is that possible?

HTH
Otávio Augusto

On Thu, 29 Jan 2004 19:42:51 -0200
"Mauricio T. Ferraz" <[EMAIL PROTECTED]> wrote:

> How can I compare a parameter in my URL (someAction.do?type=Alteração) with
> the tag  do something
> 
> 
> The problem is the "ção" . How can I sove this ???
> 
> thanks
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

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



Re: What does "do" stand for in .do files

2004-01-31 Thread Otávio Augusto
So, just to complement the discussion, is it possible to use any other extension 
rather than .do? Changing it in the web.xml file makes that possible?

Thanks

Otávio Augusto

On Sat, 31 Jan 2004 00:38:03 -0800
"Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:

> Quoting "Gopalakrishnan, Jayesh" <[EMAIL PROTECTED]>:
> 
> > The "do" is insignificant, its just what all the sample applications use and
> > has somehow stayed on.
> 
> In the technical sense ("could I use "foo" instead of "do") you are absolutely
> right ... there is no intrinsic meaning to "do".  However, for native speakers
> of English, "do" has a natural connotation of 'go DO something" that I wanted
> to pick up on, so that was my choice for the "example" mappings for the Struts
> controller servlet.
> 
> Craig McClanahan
> 
> PS:  Being constructively lazy, it's also very easy to type :-).
> 
> 
> -
> 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: What does "do" stand for in .do files

2004-01-31 Thread Matt Raible
Yes, you can use any extension you like.  I'm currently using .cfm to 
integrate a Struts app into a Cold Fusion website.

Matt

On Jan 31, 2004, at 6:15 PM, Otávio Augusto wrote:

So, just to complement the discussion, is it possible to use any other 
extension rather than .do? Changing it in the web.xml file makes that 
possible?

Thanks

Otávio Augusto

On Sat, 31 Jan 2004 00:38:03 -0800
"Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
Quoting "Gopalakrishnan, Jayesh" <[EMAIL PROTECTED]>:

The "do" is insignificant, its just what all the sample applications 
use and
has somehow stayed on.
In the technical sense ("could I use "foo" instead of "do") you are 
absolutely
right ... there is no intrinsic meaning to "do".  However, for native 
speakers
of English, "do" has a natural connotation of 'go DO something" that 
I wanted
to pick up on, so that was my choice for the "example" mappings for 
the Struts
controller servlet.

Craig McClanahan

PS:  Being constructively lazy, it's also very easy to type :-).

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


Multiple Action invokations in a single JSP / request via *include*?

2004-01-31 Thread Timo --Blazko-- Boewing
Hello all,

For long time now i am trying to make several invokations of
Struts Actions whose outputs are to be rendered into one single
JSP using JSTL's c:import or jsp:import.
However, when the first Action called reaches a larger response length
(bytes); the request gets cut; thus the page is not fully loaded.

I think it has to do that a Action is intended to do a flush after
the ActionForward has been returned to the master Struts servlet (i
could not measure it, but i would not wonder if the request gets cut at
exactly 8192 bytes). I think even for my problem there is a bugzilla
entry, but i cannot find it again.

But i wonder if one JSP called by an Action cannot call a subsequent
Action of Struts as an imported page fragment.

FYI i am using up to date JSTL, struts and Tomcat 5.0.18; same results
w/ J2 SDKs 1.4.1_02 and 1.5 beta.
I think i know that Tiles is intended for similar things, but porting to
it is not an option in my current project.
Is there any chance of doing that; meaning having several Actions making
up one single request?

Any help is very appreciated!

Thanks you!

-- 
greetings,   |  /"\ 
 |  \ /  ASCII-Ribbon-Campaign
Timo |   X Against HTML Mail
 |  / \ 
--
PUBLIC KEY:
52F3311A Timo Boewing  <[EMAIL PROTECTED]> 2003/10/30
Fingerprint = F743 E0AA A2F0 1B33 F6FA 417B 72BE 740D 52F3 311A


signature.asc
Description: This is a digitally signed message part


Re: What does "do" stand for in .do files

2004-01-31 Thread Otávio Augusto
Would you show a very simple description on how to do it? I thought I'd have problems 
with the ActionServlet...but if you say it works fine, great!

Thanks ;)

Otávio Augusto

On Sat, 31 Jan 2004 19:04:58 -0700
Matt Raible <[EMAIL PROTECTED]> wrote:

> Yes, you can use any extension you like.  I'm currently using .cfm to 
> integrate a Struts app into a Cold Fusion website.
> 
> Matt
> 
> On Jan 31, 2004, at 6:15 PM, Otávio Augusto wrote:
> 
> > So, just to complement the discussion, is it possible to use any other 
> > extension rather than .do? Changing it in the web.xml file makes that 
> > possible?
> >
> > Thanks
> >
> > Otávio Augusto
> >
> > On Sat, 31 Jan 2004 00:38:03 -0800
> > "Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
> >
> >> Quoting "Gopalakrishnan, Jayesh" <[EMAIL PROTECTED]>:
> >>
> >>> The "do" is insignificant, its just what all the sample applications 
> >>> use and
> >>> has somehow stayed on.
> >>
> >> In the technical sense ("could I use "foo" instead of "do") you are 
> >> absolutely
> >> right ... there is no intrinsic meaning to "do".  However, for native 
> >> speakers
> >> of English, "do" has a natural connotation of 'go DO something" that 
> >> I wanted
> >> to pick up on, so that was my choice for the "example" mappings for 
> >> the Struts
> >> controller servlet.
> >>
> >> Craig McClanahan
> >>
> >> PS:  Being constructively lazy, it's also very easy to type :-).
> >>
> >>
> >> -
> >> 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]



Date comparison

2004-01-31 Thread jeichels

To start off, thank you who can help.  I have looked through examples, docs, etc.  The 
forum "almost" helped.

The end problem is that I am doing a addLessThan on a datetime db field using the PB 
and it is failing likely because of a type casting problem.

I am using Timestamp in my java code.

Using this for my mapping into a DATETIME field in MySql.



Data gets inserted correctly into MySQL or seems to, but when I do 

crit.addLessThan("offerends", new Timestamp(System.currentTimeMillis());


When I print out the query, I get:

Query from class com.model.offer.OfferVO where [offerprice
> 0.0, isdisabled = false, offerends < 2004-01-31 21:59:07.89, 
> offeredProducts.productid = 1000]

It is the time aspect on this which is failing.

The row should return back data, but is failing to do so.


Thank you again for your help.

John





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



Checkbox problem

2004-01-31 Thread Janarthan Sathiamurthy
Hi Group,
 
I am using Struts 1.1 version. I have a page in which i display a set of checkboxes(10 
checkboxes to be specific). All the checkboxes have the same name and have different 
values. I have an ActionForm for this. In the ActionForm, i have a String[] 
checkBoxArr  to represent these checkboxes.
 
I have a condition that i have to check one particular checkbox out of the ten. Some 
said to set this in the constructor. Please suggest a way for doing this. 
 
Many Thanks,
Janarthan S


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!