RE: Tomcat Shutdown Control

2004-01-02 Thread Amanpreet

Hi Gary

Use the Web.xml file Exceptional Handling in tomcat with either
erro-page or error-code


error-page
  error-code500/error-code
  location/error-pages/servererror.jsp/location
/error-page

Cheers
A

-Original Message-
From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 12:27 PM
To: Struts Users Mailing List
Subject: Tomcat Shutdown Control

Hi Guys,

In my application I am generating left and right navigation pages of the
site dynamicaly. Now if my page is under the
processing . that means If tomcat is processing the page and i shutdown
the servcie of Tomcat then half of the page 
display null coz full processing was not done.

Now my concern is to control the Tomcat service.I want to display the
user friendly page whenever my Tomcat server
is going to be shutdown,


I expect to get some helps and sggestions.
Sincers Regards
Gary


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



Re: Tomcat Shutdown Control

2004-01-02 Thread Gurpreet Dhanoa
Hi Aman,

Thanks for the quick answer. But it will get displayed when the Error 500
occurs and tomcat is running
.What i exactly want is some message to the user that Tomcat is going to be
shutdown.

Thanks
Gary

- Original Message -
From: Amanpreet [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, January 02, 2002 12:32 PM
Subject: RE: Tomcat Shutdown Control



 Hi Gary

 Use the Web.xml file Exceptional Handling in tomcat with either
 erro-page or error-code


 error-page
   error-code500/error-code
   location/error-pages/servererror.jsp/location
 /error-page

 Cheers
 A

 -Original Message-
 From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 02, 2004 12:27 PM
 To: Struts Users Mailing List
 Subject: Tomcat Shutdown Control

 Hi Guys,

 In my application I am generating left and right navigation pages of the
 site dynamicaly. Now if my page is under the
 processing . that means If tomcat is processing the page and i shutdown
 the servcie of Tomcat then half of the page
 display null coz full processing was not done.

 Now my concern is to control the Tomcat service.I want to display the
 user friendly page whenever my Tomcat server
 is going to be shutdown,


 I expect to get some helps and sggestions.
 Sincers Regards
 Gary


 -
 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: Tomcat Shutdown Control

2004-01-02 Thread Amanpreet

Hi,
Well.
For that we need to configure Apache, which will delegate the requests
to Tomcat.
Other way round can be to have a fault tolerance Load Balancer.
Thanks
Aman


Hi Aman,

Thanks for the quick answer. But it will get displayed when the Error
500
occurs and tomcat is running
.What i exactly want is some message to the user that Tomcat is going to
be
shutdown.

Thanks
Gary

- Original Message -
From: Amanpreet [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, January 02, 2002 12:32 PM
Subject: RE: Tomcat Shutdown Control



 Hi Gary

 Use the Web.xml file Exceptional Handling in tomcat with either
 erro-page or error-code


 error-page
   error-code500/error-code
   location/error-pages/servererror.jsp/location
 /error-page

 Cheers
 A

 -Original Message-
 From: Gurpreet Dhanoa [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 02, 2004 12:27 PM
 To: Struts Users Mailing List
 Subject: Tomcat Shutdown Control

 Hi Guys,

 In my application I am generating left and right navigation pages of
the
 site dynamicaly. Now if my page is under the
 processing . that means If tomcat is processing the page and i
shutdown
 the servcie of Tomcat then half of the page
 display null coz full processing was not done.

 Now my concern is to control the Tomcat service.I want to display the
 user friendly page whenever my Tomcat server
 is going to be shutdown,


 I expect to get some helps and sggestions.
 Sincers Regards
 Gary


 -
 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: Tomcat Shutdown Control

2004-01-02 Thread Riaan Oberholzer
You cannot display a message, because there is no
service to handle the request


--- Gurpreet Dhanoa [EMAIL PROTECTED]
wrote:
 Hi Aman,
 
 Thanks for the quick answer. But it will get
 displayed when the Error 500
 occurs and tomcat is running
 .What i exactly want is some message to the user
 that Tomcat is going to be
 shutdown.
 
 Thanks
 Gary
 
 - Original Message -
 From: Amanpreet [EMAIL PROTECTED]
 To: 'Struts Users Mailing List'
 [EMAIL PROTECTED]
 Sent: Wednesday, January 02, 2002 12:32 PM
 Subject: RE: Tomcat Shutdown Control
 
 
 
  Hi Gary
 
  Use the Web.xml file Exceptional Handling in
 tomcat with either
  erro-page or error-code
 
 
  error-page
error-code500/error-code
   
 location/error-pages/servererror.jsp/location
  /error-page
 
  Cheers
  A
 
  -Original Message-
  From: Gurpreet Dhanoa
 [mailto:[EMAIL PROTECTED]
  Sent: Friday, January 02, 2004 12:27 PM
  To: Struts Users Mailing List
  Subject: Tomcat Shutdown Control
 
  Hi Guys,
 
  In my application I am generating left and right
 navigation pages of the
  site dynamicaly. Now if my page is under the
  processing . that means If tomcat is processing
 the page and i shutdown
  the servcie of Tomcat then half of the page
  display null coz full processing was not done.
 
  Now my concern is to control the Tomcat service.I
 want to display the
  user friendly page whenever my Tomcat server
  is going to be shutdown,
 
 
  I expect to get some helps and sggestions.
  Sincers Regards
  Gary
 
 
 

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

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


__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



Re: Tomcat Shutdown Control

2004-01-02 Thread Gurpreet Dhanoa
IS there any where through which I cna indicate my problem that service is
going to be shutdown
LIke you generally found the message before you shutdown the windows OS.
AMan can you please put some light on using fault tolerance Load Balancer

Regards
Gary
- Original Message -
From: Riaan Oberholzer [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Friday, January 02, 2004 12:56 PM
Subject: Re: Tomcat Shutdown Control


 You cannot display a message, because there is no
 service to handle the request


 --- Gurpreet Dhanoa [EMAIL PROTECTED]
 wrote:
  Hi Aman,
 
  Thanks for the quick answer. But it will get
  displayed when the Error 500
  occurs and tomcat is running
  .What i exactly want is some message to the user
  that Tomcat is going to be
  shutdown.
 
  Thanks
  Gary
 
  - Original Message -
  From: Amanpreet [EMAIL PROTECTED]
  To: 'Struts Users Mailing List'
  [EMAIL PROTECTED]
  Sent: Wednesday, January 02, 2002 12:32 PM
  Subject: RE: Tomcat Shutdown Control
 
 
  
   Hi Gary
  
   Use the Web.xml file Exceptional Handling in
  tomcat with either
   erro-page or error-code
  
  
   error-page
 error-code500/error-code
  
  location/error-pages/servererror.jsp/location
   /error-page
  
   Cheers
   A
  
   -Original Message-
   From: Gurpreet Dhanoa
  [mailto:[EMAIL PROTECTED]
   Sent: Friday, January 02, 2004 12:27 PM
   To: Struts Users Mailing List
   Subject: Tomcat Shutdown Control
  
   Hi Guys,
  
   In my application I am generating left and right
  navigation pages of the
   site dynamicaly. Now if my page is under the
   processing . that means If tomcat is processing
  the page and i shutdown
   the servcie of Tomcat then half of the page
   display null coz full processing was not done.
  
   Now my concern is to control the Tomcat service.I
  want to display the
   user friendly page whenever my Tomcat server
   is going to be shutdown,
  
  
   I expect to get some helps and sggestions.
   Sincers Regards
   Gary
  
  
  
 
 -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
  
 
 
 
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
  [EMAIL PROTECTED]
 


 __
 Do you Yahoo!?
 Find out what made the Top Yahoo! Searches of 2003
 http://search.yahoo.com/top2003

 -
 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: Tomcat Shutdown Control

2004-01-02 Thread Riaan Oberholzer
Not sure if this will work, but first stop the
application using tomcat manager. Wait a minute or so,
and then stop tomcat. This way tomcat will still be
running, but the application not... and maybe you can
setup tomcat to display custom messages when an
application is not available?


--- Gurpreet Dhanoa [EMAIL PROTECTED]
wrote:
 IS there any where through which I cna indicate my
 problem that service is
 going to be shutdown
 LIke you generally found the message before you
 shutdown the windows OS.
 AMan can you please put some light on using fault
 tolerance Load Balancer
 
 Regards
 Gary
 - Original Message -
 From: Riaan Oberholzer [EMAIL PROTECTED]
 To: Struts Users Mailing List
 [EMAIL PROTECTED]
 Sent: Friday, January 02, 2004 12:56 PM
 Subject: Re: Tomcat Shutdown Control
 
 
  You cannot display a message, because there is no
  service to handle the request
 
 
  --- Gurpreet Dhanoa [EMAIL PROTECTED]
  wrote:
   Hi Aman,
  
   Thanks for the quick answer. But it will get
   displayed when the Error 500
   occurs and tomcat is running
   .What i exactly want is some message to the user
   that Tomcat is going to be
   shutdown.
  
   Thanks
   Gary
  
   - Original Message -
   From: Amanpreet [EMAIL PROTECTED]
   To: 'Struts Users Mailing List'
   [EMAIL PROTECTED]
   Sent: Wednesday, January 02, 2002 12:32 PM
   Subject: RE: Tomcat Shutdown Control
  
  
   
Hi Gary
   
Use the Web.xml file Exceptional Handling in
   tomcat with either
erro-page or error-code
   
   
error-page
  error-code500/error-code
   
  
 location/error-pages/servererror.jsp/location
/error-page
   
Cheers
A
   
-Original Message-
From: Gurpreet Dhanoa
   [mailto:[EMAIL PROTECTED]
Sent: Friday, January 02, 2004 12:27 PM
To: Struts Users Mailing List
Subject: Tomcat Shutdown Control
   
Hi Guys,
   
In my application I am generating left and
 right
   navigation pages of the
site dynamicaly. Now if my page is under the
processing . that means If tomcat is
 processing
   the page and i shutdown
the servcie of Tomcat then half of the page
display null coz full processing was not done.
   
Now my concern is to control the Tomcat
 service.I
   want to display the
user friendly page whenever my Tomcat server
is going to be shutdown,
   
   
I expect to get some helps and sggestions.
Sincers Regards
Gary
   
   
   
  
 

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

-
   To unsubscribe, e-mail:
   [EMAIL PROTECTED]
   For additional commands, e-mail:
   [EMAIL PROTECTED]
  
 
 
  __
  Do you Yahoo!?
  Find out what made the Top Yahoo! Searches of 2003
  http://search.yahoo.com/top2003
 
 

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

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


__
Do you Yahoo!?
Find out what made the Top Yahoo! Searches of 2003
http://search.yahoo.com/top2003

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



ConvertUtils Converters Question

2004-01-02 Thread Patrick Cheng
Hi All,

Is it true that when I submit a form, it will automatically go thru the
ConvertUtils Converters? Is there a way I can bypass that? I know I can
write my own Converters and register it to override the default
behaviour, but is there a way to bypass the whole thing once and for
all? (or is it technically undesirable to bypass it?)

Rgds,
Patrick.

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



how many struts_config.xml

2004-01-02 Thread Kalra, Ashwani
hi,

Is there any drawbacks of having too many struts_config.xml files. Any
guidelines on this ?




Thanks  Regds 
Ashwani Kalra 



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

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



RE: Custom Link Tag

2004-01-02 Thread Duggal, Sanjay
Nico,

Thanks for your response.
However, what will happen to the existing code in the doStartTag of the
org.apache.struts.taglib.html.LinkTag?
Because I will still need the existing functionality of the
org.apache.struts.taglib.html.LinkTag as well !!
Should I make a call to the super.doStartTag()?

Please advise.

Thanks.
Sanjay

-Original Message-
From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 31, 2003 6:25 PM
To: Struts Users Mailing List
Subject: Re: Custom Link Tag


Place your code in doStartTag as it can return SKIP_BODY to exclude body
from resulting HTML.

return EVAL_BODY_INCLUDE if you want the body to be included

Nico.

 Hi,
 
 I am writing a custom tag: MyLinkTag that extends the
 org.apache.struts.taglib.html.LinkTag.
 
 MyLinkTag has two fields. They are 
 showAlways : Boolean  alternateLink : String. 
 
 The functionality of the MyLinkTag is captured in the following code
 snippet:


 ***
 HttpServletRequest request = pageContext.getRequest();
 ActionMappings actionMappings =
 (ActionMappings)request.getAttribute(Action.MAPPINGS_KEY); 
 String path = getHref();
 ActionMapping actionMapping = actionMappings.findMapping(path);
 String[] roleNames = actionMapping.getRoleNames();
 boolean userInRole = false;
 for(int i=0; iroleNames.length(); i++)
 {
 userInRole = request.isUserInRole(roleNames);
 if(!userInRole){
 if((alternateLink != null)  !(.equals(alternateLink))){
 setHref(alternateLink);
 }
 else{
 if(showAlways){
 setDisabled(true);
 }
 else{
 //don't show the link
 return SKIP_BODY;
 }
 }
 }//end if !userInRole
 }//end for loop


 ***
 
 The problem is I don't know where to place this code i.e. in which method:
 doStartTag() or doEndTag() or doAfterBody() or any other?? 
 What method should I override??
 And what should be the return [integer] values?? 
 
 Thanks in advance.
 Sanjay
 
 
 This message contains information that may be privileged or confidential
and
 is the property of the Cap Gemini Ernst  Young Group. It is intended only
 for the person to whom it is addressed. If you are not the intended
 recipient, you are not authorised to read, print, retain, copy,
disseminate,
 distribute, or use this message or any part thereof. If you receive this
 message in error, please notify the sender immediately and delete all
copies
 of this message.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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


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

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



Re: Custom Link Tag

2004-01-02 Thread Nicolas De Loof
public int doStartTag() {

if (skip_condition) {
return SKIP_BODY;
}
return super.doStartTag()
}

Nico.

 Nico,
 
 Thanks for your response.
 However, what will happen to the existing code in the doStartTag of the
 org.apache.struts.taglib.html.LinkTag?
 Because I will still need the existing functionality of the
 org.apache.struts.taglib.html.LinkTag as well !!
 Should I make a call to the super.doStartTag()?
 
 Please advise.
 
 Thanks.
 Sanjay
 
 -Original Message-
 From: Nicolas De Loof [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, December 31, 2003 6:25 PM
 To: Struts Users Mailing List
 Subject: Re: Custom Link Tag
 
 
 Place your code in doStartTag as it can return SKIP_BODY to exclude body
 from resulting HTML.
 
 return EVAL_BODY_INCLUDE if you want the body to be included
 
 Nico.
 
  Hi,
  
  I am writing a custom tag: MyLinkTag that extends the
  org.apache.struts.taglib.html.LinkTag.
  
  MyLinkTag has two fields. They are 
  showAlways : Boolean  alternateLink : String. 
  
  The functionality of the MyLinkTag is captured in the following code
  snippet:
 
 
  ***
  HttpServletRequest request = pageContext.getRequest();
  ActionMappings actionMappings =
  (ActionMappings)request.getAttribute(Action.MAPPINGS_KEY); 
  String path = getHref();
  ActionMapping actionMapping = actionMappings.findMapping(path);
  String[] roleNames = actionMapping.getRoleNames();
  boolean userInRole = false;
  for(int i=0; iroleNames.length(); i++)
  {
  userInRole = request.isUserInRole(roleNames);
  if(!userInRole){
  if((alternateLink != null)  !(.equals(alternateLink))){
  setHref(alternateLink);
  }
  else{
  if(showAlways){
  setDisabled(true);
  }
  else{
  //don't show the link
  return SKIP_BODY;
  }
  }
  }//end if !userInRole
  }//end for loop
 
 
  ***
  
  The problem is I don't know where to place this code i.e. in which method:
  doStartTag() or doEndTag() or doAfterBody() or any other?? 
  What method should I override??
  And what should be the return [integer] values?? 
  
  Thanks in advance.
  Sanjay
  
  
  This message contains information that may be privileged or confidential
 and
  is the property of the Cap Gemini Ernst  Young Group. It is intended only
  for the person to whom it is addressed. If you are not the intended
  recipient, you are not authorised to read, print, retain, copy,
 disseminate,
  distribute, or use this message or any part thereof. If you receive this
  message in error, please notify the sender immediately and delete all
 copies
  of this message.
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 This message contains information that may be privileged or confidential and
 is the property of the Cap Gemini Ernst  Young Group. It is intended only
 for the person to whom it is addressed. If you are not the intended
 recipient, you are not authorised to read, print, retain, copy, disseminate,
 distribute, or use this message or any part thereof. If you receive this
 message in error, please notify the sender immediately and delete all copies
 of this message.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

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



Problem in displaying ValueObject contents using logic tag

2004-01-02 Thread Sudhakar G
Hi All,
My ArrayList holds a set of  ValueObjects.When I try to display the
ArrayList contents using logic tag it is throwing an exception saying can't
find the clientview bean.

In Action class the code is like.

 request.setAttribute(ClientList,clientListVO); 
 return mapping.findForward(success);


In Jsp 

 logic:iterate name=ClientList id=clientview
bean:write name=clientview property=clientID/
/logic:iterate

Value Object has ClientID as attribute with get and set methods.

Can any one help in this problem that will be thankful..


Thanks in advance..

cheers
Sudhakar




DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. 
Before opening attachments please check them for viruses and defects. MindTree 
Consulting Private Limited (MindTree) will not be responsible for any viruses or 
defects or any forwarded attachments emanating either from within MindTree or outside. 
If you have received this message by mistake please notify the sender by return  
e-mail and delete this message from your system. Any unauthorized use or dissemination 
of this message in whole or in part is strictly prohibited.  Please note that e-mails 
are susceptible to change and MindTree shall not be liable for any improper, untimely 
or incomplete transmission.

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



Problem in Displaying ArrayList constents in jsp

2004-01-02 Thread Sudhakar G
Hi All,
My ArrayList holds a set of  ValueObjects.When I try to display the
ArrayList contents using logic tag it is throwing an exception saying can't
find the clientview bean.

In Action class the code is like.

 request.setAttribute(ClientList,clientListVO); 
 return mapping.findForward(success);


In Jsp 

 logic:iterate name=ClientList id=clientview
bean:write name=clientview property=clientID/
/logic:iterate

Value Object has ClientID as attribute with get and set methods.

Can any one help in this problem that will be thankful..


Thanks in advance..

cheers
Sudhakar



DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. 
Before opening attachments please check them for viruses and defects. MindTree 
Consulting Private Limited (MindTree) will not be responsible for any viruses or 
defects or any forwarded attachments emanating either from within MindTree or outside. 
If you have received this message by mistake please notify the sender by return  
e-mail and delete this message from your system. Any unauthorized use or dissemination 
of this message in whole or in part is strictly prohibited.  Please note that e-mails 
are susceptible to change and MindTree shall not be liable for any improper, untimely 
or incomplete transmission.

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



RE: Problem in Displaying ArrayList constents in jsp

2004-01-02 Thread Robert Taylor
Are you redirecting instead of forwarding? If so, your request attributes
will be lost once
the page is rendered.

robert

 -Original Message-
 From: Sudhakar G [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 02, 2004 12:05 AM
 To: [EMAIL PROTECTED]
 Subject: Problem in Displaying ArrayList constents in jsp


 Hi All,
 My ArrayList holds a set of  ValueObjects.When I try to
 display the
 ArrayList contents using logic tag it is throwing an exception
 saying can't
 find the clientview bean.

 In Action class the code is like.

  request.setAttribute(ClientList,clientListVO);
  return mapping.findForward(success);


 In Jsp

  logic:iterate name=ClientList id=clientview
 bean:write name=clientview property=clientID/
 /logic:iterate

 Value Object has ClientID as attribute with get and set methods.

 Can any one help in this problem that will be thankful..


 Thanks in advance..

 cheers
 Sudhakar



 DISCLAIMER:
 This message (including attachment if any) is confidential and
 may be privileged. Before opening attachments please check them
 for viruses and defects. MindTree Consulting Private Limited
 (MindTree) will not be responsible for any viruses or defects or
 any forwarded attachments emanating either from within MindTree
 or outside. If you have received this message by mistake please
 notify the sender by return  e-mail and delete this message from
 your system. Any unauthorized use or dissemination of this
 message in whole or in part is strictly prohibited.  Please note
 that e-mails are susceptible to change and MindTree shall not be
 liable for any improper, untimely or incomplete transmission.

 -
 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: Boolean checkbox in session form

2004-01-02 Thread Guillermo Meyer
In my particular case (not saying its the general case) I was having a
DispatchAction in a wizard navigation, going forwards and backwards, and
a form in session. In one page, I turn the checkbox on, and then, when I
wanted to turn it off (for, example, if turning it on was wrong and in
this wizard you want to correct this) the off was never sent. And if in
the reset y have to turn it off I would set it to false when I shouldnt
(very very complicated).

So that's why I made this tag extension. I map this property to a
boolean one. I'm attaching the code just in case anyone is interested.

Have a nice year!
Guillermo.


-Original Message-
From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] 
Sent: Lunes, 29 de Diciembre de 2003 07:13 p.m.
To: Struts Users Mailing List
Subject: RE: Boolean checkbox in session form


Quoting Tim Lucia [EMAIL PROTECTED]:

 Care to share?  This would be a very, very useful extension.
 
 Is there any plan(s) for future Struts release(s) to support some 
 attribute of this sort?  Something like forceFalse='true' or 
 forceValue='true'.
 
 Tim
 

Guillermo is trying work too hard.

The standard approach to dealing with boolean form bean properties
(presented by a checkbox) is to set the boolean property to false in the
reset method of your form bean, which is called every time the form is
submitted.  If the user checked the box, then the property will be set
to true in processPopulate().

Now, if you want to reset the property again before forwarding back to
the same page again (so that it's always rendered as unchecked when the
page is displayed), just have your Action set the boolean property to
false.  That is what controls how the checkbox is rendered -- in EXACTLY
the same way that an Action can preconfigure any other form field by
setting the corresponding form bean property before fowarding to the
page.

Craig McClanahan


  -Original Message-
  From: Guillermo Meyer [mailto:[EMAIL PROTECTED]
  Sent: Monday, December 29, 2003 4:40 PM
  To: 'Struts Users Mailing List'
  Subject: RE: Boolean checkbox in session form
  
  
  To solve this problem, i created a new taglib for checkbox
  (extending BaseFieldTag), that creates a hidden input with a 
  value of true|false and an auxiliary checkbox (named as 
  propertyName + _chk) with a javascript handler that checks 
  on checkbox value to set true or false to the hidden field, 
  so always is posted a true or a false value from UI and set 
  to the appropiate form attribute, and this way you can avoid 
  reseting value in reset form.
  
  -Original Message-
  From: Franck [mailto:[EMAIL PROTECTED]
  Sent: Lunes, 29 de Diciembre de 2003 06:13 p.m.
  To: 'Struts Users Mailing List'
  Subject: Boolean checkbox in session form
  
  
  Hi,
  
  I'm becoming mad ...
  
  Explain : to handle ActionForm boolean properties with HTML
  checkbox, we need To initialize the property as false in 
  the reset() method of the ActionForm .. Ok
  
  Now, if the Action form is defined in the session scope in
  the struts-config file The first time the action is called, 
  the bean is put in session scope.
  
  The next time (eg submit of another form on the same page),
  the bean is readed from session scope 
  (RequestProcessor.processActionForm) ... ok After that, the 
  reset() method is called
  (RequestProcessor.processPopulate)
  
  So it's impossible to keep the boolean property as true 
  
  How can I store the form bean in the session scope with a
  true boolean property ? Or maybe is there a way to not 
  initialize the boolean properties as false (and update them 
  with checkboxes )
  
  Is my problem understandable ??
  
  Thanks ...
  
  Franck Lefebure
  equipe web http://www.orangecaraibe.com
  collaborateur http://www.synaxis-partner.com
 mailto:[EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 




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



CheckBoxTag.zip
Description: Zip compressed data
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: how many struts_config.xml

2004-01-02 Thread Ted Husted
It's not going to matter much to the framework. The files are read at startup and then 
dismissed. It's mainly a human engineering issue.

If you are using multiple configs in the same module, and can be sure that the none of 
the element names collide across the files, then it's just a matter of personal 
preference.

I often advise teams that are working closely together to use multiple configs rather 
than modules, since the paper wall approach of modules often creates as many 
problems as it solves. It's really not that hard to enforce your own prefixes, so long 
as there is an enforcer to which everyone reports.

-Ted.

On Fri, 02 Jan 2004 17:52:00 +0800, Kalra, Ashwani wrote:
 hi,


 Is there any drawbacks of having too many struts_config.xml files.
 Any guidelines on this ?


 Thanks  Regds
 Ashwani Kalra


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

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




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



Re: Problem with BeanUtils.copyProperties()

2004-01-02 Thread Patrick Scheuerer
Ivan De La Pena wrote:
Hope this helps :
Thanks Ivan, It did help :-).

The problem I had was a bit strange: in my business object a had a method 
setSomeProperty(String[] data) and a method setSomeProperty(Vector data).
copyProperties() called setSomeProperty(Vector data) on my business bean 
although the method signature of the source bean has the first method signature 
(witch a String[]).
If there are multiple methods with the same name, shouldn't copyProperties() 
pick the one with the same method signature as in the source bean??? In my 
opinion this would at least be a desirable default behavior

Has anybody else experienced this problem?

Patrick



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


Re: Problem with BeanUtils.copyProperties()

2004-01-02 Thread Nicolas De Loof
I think the javabean spec doesn't allow multiple setters for a single property.
If I'm right, you cannot have two setXXX method with different parameters types, as 
beanutils just looks for a method
named setXXX without using parameter types.

Nico.


 Ivan De La Pena wrote:
  Hope this helps :
 Thanks Ivan, It did help :-).

 The problem I had was a bit strange: in my business object a had a method
 setSomeProperty(String[] data) and a method setSomeProperty(Vector data).
 copyProperties() called setSomeProperty(Vector data) on my business bean
 although the method signature of the source bean has the first method signature
 (witch a String[]).
 If there are multiple methods with the same name, shouldn't copyProperties()
 pick the one with the same method signature as in the source bean??? In my
 opinion this would at least be a desirable default behavior

 Has anybody else experienced this problem?

 Patrick



 -
 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: Problem with action chaining

2004-01-02 Thread Tim Lucia
Ted,

I'm not sure how scripting will help.  The page designers (or
customizers in some cases) will have to know some scripting language,
and someone (probably me) will have to support some additional
mechanisms for the scripts to do the DAO work (design, develop, test,
...)

I dug out your book, and carefully read section 8.4 Chaining Actions.
It says basically what you've said in this thread (good thing, eh? ;-) )
and in general I agree.  However, I still have a case where I think the
chaining is valid, and that comes when using the validator, and the
input parameter points to an Action.  Suppose I have a list of objects
in the view, and I click the edit button next to one of them.  The
resulting URI becomes something like /EditObject.do?ID=102.  The mapping
for /EditObject.do points to com.mycompany.actions.ObjectAction,
parameter=load, and the forward goes to /ObjectEditor.do, which has
validation=true, forwards to a tile, and has input=/ObjectEditor.do.
This way, the initial load of the object to be edited comes from the
DAO, and if validation fails, the validator points back to the editor
page, leaving the incorrect input in the form to be corrected, rather
then starting with the DAO value of the data (this way, the error
messages make more sense.)

I think my original posting may have been misleading to a degree.  I was
suggesting writing new (additional) ActionMappings to reuse existing
Action classes to create new views. 

Thanks again,
Tim

 -Original Message-
 From: Ted Husted [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, January 01, 2004 2:35 PM
 To: Struts Users Mailing List
 Subject: RE: Problem with action chaining
 
 
 In your case, something to consider might be to use BSF 
 scripts instead of Java Actions. 
 
 http://struts.sourceforge.net/struts-bsf/index.html
 
 Another idea would be to reduce the business classes to 
 Commands (using the Command Chain of Command package) 
 http://jakarta.apache.org/commons/sandbox/chain/. A 
 standard Action could then be used to run one or more 
 business Commands.
 
 Something else that has been mentioned is the idea of using 
 JSPs for Actions, but I don't know that anyone has 
 implemented anything yet. 
 
 -Ted.
 
 
 On Thu, 01 Jan 2004 10:49:46 -0500, Tim Lucia wrote:
  Ted,
 
 
  Thanks for the reply.
 
 
  Putting methods in the base action(s) works (since the actions are 
  related by what attributes they add to the request or session.) The 
  down side is that the page designer who is ignorant of Java (or may 
  not have access to the code) can't make changes this way. 
 If I have an 
  action to retrieve each business object and put it in the request 
  (session) under a known key, then the page designer can chain these 
  together to produce the objects necessary for the view.  I 
 hesitate to 
  say that the actions are doing actual work, other then the bare 
  minimum - access the DAO to get a (list of) object(s) and place it 
  (them) in a request (session) attribute.
 
  (Background note -- I have a requirement where there will be 
  customizations done by field engineers at various customer 
 sites. They 
  need to know how to move tiles around (new layouts), and understand 
  basic struts tag libraries, and HTML [which they already know].  By 
  chaining actions, they can use the existing .class files without us 
  shipping the java sources and having them modified in the field.)
 
  Happy New Year,
  Tim
 
 
  -Original Message-
  From: Ted Husted [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, December 31, 2003 4:10 PM
  To: Struts Users Mailing List
  Subject: RE: Problem with action chaining
 
 
  On Wed, 31 Dec 2003 12:36:33 -0500, Tim Lucia wrote:
 
  So is it a bad design if you have
 
 
  Action1 - add CollectionOfObject1 to request
  Action2 - add Object2 request
 
 
  And then chain them together to produce two request 
 attributes?  I 
  have some pages which display a list of Object1, and other
 
  pages which
  require the Collection to populate a select.  So I define
 
  action path
  1 to be action 1 and forward to the display for the Collection of 
  Object1, and define action path 2 to be action 1 forward to
 
  action 2
  forward to editor page which has a select of collection of
 
  object 1,
  while editing Object2.
 
 
  One common strategy is to use one action as a page 
 controller and 
  another as the business transaction controller.
 
  The business action works as a go between with the 
 business API and 
  DAO objects. The Action class extracts any needed input from the
  ActionForm and
  packages for the API/DAO objects. If appropriate, it also bundles
  any output and
  places it in a servlet context, sometimes by populating an
  ActionForm, other times by creating some other bean.
 
  The page action ensures that whatever assets the page needs are 
  available. These may be lists for drop-down boxes and so 
 forth. This 
  may also mean
  interacting with the API/DAO objects, but the 

Howto please: Validate two input forms (PDA and 1024x768) for same Action

2004-01-02 Thread Iain Sanderson
I'm evolving a large STRUTS medical application to place some of it's 
functionality on 802.11b-enabled Pocket PC devices using Mobile IE, 
reformatting views to the 240x320 pixel resolution for these devices.
My method is to test the request header for this resolution and Forward 
the response on to  smaller (240x320) output JSPs, leaving all the 
underlying Action and  business logic unchanged. It works very well, 
maintaining nice MVC principles.  The challenge is that I would like to do 
the same with input forms, but cut down the input view  for the PDA 
version, maintain validation for the PDA version, and return control to 
the PDA version if a validation error occurs.

This is the Action code that directs the ActionForward to two outputs, one 
regular, one PDA.

public class SchedChoiceActions extends DispatchAction {

// some more ActionForwards here


   /*
 *The liveOff Action is invoked if the liveOff request parameter 
has the value off
 *
 */
public ActionForward liveOff(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

   // more stuff
 
// Forward control to the specified success URI
if(request.getHeader(user-agent).indexOf(240x320)0) {return 
(mapping.findForward(outputPdaVersion)); }
 else{  return (mapping.findForward(output));} 
}
}

Here's the problem on the INPUT side. If a validation error ocurs in the 
PDA version of an input form, I only have one option of returning control 
to the input form, and in my current app, it returns control via 
struts-config to a regularly sized JSP. I can't differentially send a PDA 
validation error back to the PDA input  JSP, sharing the Action with a 
regular set of input forms.

Is there an elegant solution for this?   Areas I'm exploring  1) Chaining 
an action for the PDA version input form to call the 'regular' action, 
which can then test for output resolution as above ( ugh!).2) Can Strut's 
Validator do this? (currently validating only in ActionForms).

Thanks,

Iain Sanderson.



Re: *.do mapping using JRun

2004-01-02 Thread Pedro Salgado

  Maybe the problem isn't web.xml.

  A two months ago, I had to configure a Struts application on a JRun Server
and I had some problems to make it work correctly.

  If your using Tomcat then some of the libs will be in its proper location
/WEB-INF/lib (commons-*, struts-*, and some other) but on Jrun I had to
place 

log4j.properties
commons-beanutils*
commons-collections*
commons-digester*
commons-validator*
commons-upload*
struts*
log4j*

on the ${JRUN_HOME}/servers/lib.

  In your case, maybe this isn't possible.

  For what I unserstood this is a JRun issue... something about loading
classes priority (servers lib, then website lib... ?! and not implementing a
Sun's specification... In conclusion, something that Tomcat does right and
JRun doesn't).

  You can try using Jrun locally also to check this... You can download the
software from Macromedia (the license is free for development anyway) and
check what's happening.

Pedro Salgado

On 02/01/2004 03:11, Mike Steigerwald [EMAIL PROTECTED] wrote:

 Hi, all,
 
 I'm a struts newbie trying to learn with struts-example. I've got it working
 great locally with Tomcat, but I'm struggling to deploy it on my ISP's JRun
 server.
 
 I can't seem to figure out some configuration property to get JRun to
 understand the *.do mapping. All of my .jsp links work great, but I get 404
 errors for any link such as:
 
 editRegistration.do?action=Create
 
 I'm sure the solution is obvious, but I'm going blind scouring the
 documentation. Thanks in advance for any help.
 
 
 -
 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: Problem with BeanUtils.copyProperties()

2004-01-02 Thread Patrick Scheuerer
Argh! I'm about to loose my sanity over this...

The problem with the String[] is now working but there's a new one of course :-(

For some reason BeanUtils.copyProperties() doesn't call a setter method in the 
destination bean.

Here's the definition of the form field in struts-config.xml

form-property name=keywords
   type=java.lang.String/
In the destination bean there's the corresponding setter method:   
 
public void setKeywords(String keywords) {
...
}
For some reason copyProperties() doesn't call my setter method. If I step 
through copyProperties() in the debugger I get until

   for (int i = 0; i  origDescriptors.length; i++) {
..
} else {
--  if (isWriteable(dest, name)) {
Object value = ((DynaBean) orig).get(name);
PropertyUtils.setSimpleProperty(dest, name, value);
}
}
If I step over the if statement the following block of code is not being 
executed. Why is this property not writeable???

At runtime the property in question in origDescriptors has the value:

	DynaProperty[name=keywords,type=class java.lang.String]

Why is the setKeywords(String keywords) method not called on my dest bean???

Can somebody please help me out here? What am I doing wrong?

Thanks a lot,
Patrick
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problem with BeanUtils.copyProperties()

2004-01-02 Thread Patrick Scheuerer
and in contrary to my earlier problem, there's no other method with the same 
method name...

Patrick Scheuerer wrote:

Argh! I'm about to loose my sanity over this...

The problem with the String[] is now working but there's a new one of 
course :-(

For some reason BeanUtils.copyProperties() doesn't call a setter method 
in the destination bean.

Here's the definition of the form field in struts-config.xml

form-property name=keywords
   type=java.lang.String/

In the destination bean there's the corresponding setter 
method:   
public void setKeywords(String keywords) {
...
}

For some reason copyProperties() doesn't call my setter method. If I 
step through copyProperties() in the debugger I get until

   for (int i = 0; i  origDescriptors.length; i++) {
..
} else {
-- if (isWriteable(dest, name)) {
Object value = ((DynaBean) orig).get(name);
PropertyUtils.setSimpleProperty(dest, name, value);
}
}
If I step over the if statement the following block of code is not being 
executed. Why is this property not writeable???

At runtime the property in question in origDescriptors has the value:

DynaProperty[name=keywords,type=class java.lang.String]

Why is the setKeywords(String keywords) method not called on my dest 
bean???

Can somebody please help me out here? What am I doing wrong?

Thanks a lot,
Patrick
-
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]


Nested tags not working with session-scope form

2004-01-02 Thread Joe Porcheddu
Hello,
 
I have a session scope ActionForm. I have a need to use the nested tag
library to iterator over some nested beans in the form. However, any use
of a nested:text, nested:write, nested:iterate, etc., will not
output the properties of the ActionForm. This results in a blank HTML
form in my browser.
 
If I changed the nested prefix to the original html, logic, etc. Then
everything outputs fine in the HTML.  
 
I am wondering if anyone has come across this problem before, and knows
what I might be doing wrong or something I can check.  To check my
sanity, i wrote a simple web app using session-scoped action forms and
nested tags, and it worked fine. I just can't figure out why it works in
one web-app and not the other.
 
Thanks,
Joe


RE: intRange validation

2004-01-02 Thread Shrivastava, Rashmi

Hi,

I am trying to use int range validation 

The entry in validation.xml is as follows:
***


 field property=dateShippedMonth
 depends=integer,intRange
page=2

  arg0 key=prompt.dateShippedMonth/

 arg1 name=intRange key=${var:min}
resource=false/

arg2 name=intRange key=${var:max}
resource=false/
var 
var-namemin/var-name
 var-value1/var-value
 /var 
var 
var-namemax/var-name
 var-value12/var-value /var 
/field
*
The validation is being done correctly but the error message is shown as
Month Shipped is not in the range null through null.

I am unable to understand is the error message not being populated with
the correct min and max values?



Thanks
Rashmi

  

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



FormFile NULL when uploading large file

2004-01-02 Thread Ling Wu
Hi, 
 
I have a problem when uploading large file using
FormFile. It works fine with modest sized file. But
when the file size goes to 1GB, the FormFile returned
from PropertyUtils.getSimpleProperty(...) is null.
Does anyone know the reason behind this? Is there any
file size limit with FormFile?
 
Thanks.
Ling



__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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



Re: Problem with BeanUtils.copyProperties()

2004-01-02 Thread Craig R. McClanahan
Quoting Patrick Scheuerer [EMAIL PROTECTED]:

 If there are multiple methods with the same name, shouldn't copyProperties()
 pick the one with the same method signature as in the source bean??? In my 
 opinion this would at least be a desirable default behavior

No, it shouldn't.

BeanUtils uses the standard JavaBeans introspection logic of the JDK to
determine what the legal property names are, and what the getter and setter
method names are (the default is getFoo and setFoo, but that can be changed). 
If you have two setters with the same name (but a different parameter type),
then -- by definition -- this is not a JavaBeans property so it will be ignored
by BeanUtils.

See the JavaBeans Specification for more information:

http://java.sun.com/products/javabeans/reference/api/index.html


 
 Patrick
 

Craig McClanahan


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



DynaActionForm question

2004-01-02 Thread Sifuentes, Ben
I have been trying to do the following:
form-bean
name=searchForm
type=com.mckesson.eig.actions.search.patient.SearchForm
form-property name=facilities
type=java.util.ArrayList/
form-property name=sexes
type=java.util.ArrayList/
form-property name=age type=java.lang.String/
form-property name=admissionDate
type=java.lang.String/
form-property name=admissionDays
type=java.lang.String/
form-property name=ageRange
type=java.lang.String/
form-property name=dateOfBirth
type=java.lang.String/
form-property name=dischargeDate
type=java.lang.String/
form-property name=dischargeDays
type=java.lang.String/
form-property name=encounterNumber
type=java.lang.String/
form-property name=mrn type=java.lang.String/
form-property name=ssn type=java.lang.String/
form-property name=gpi type=java.lang.String/
form-property name=firstName
type=java.lang.String/
form-property name=lastName
type=java.lang.String/
form-property name=patients
type=java.util.ArrayList
className=com.mckesson.eig.common.struts.NullInitialPropertyConfig/
form-property name=selectedSex
type=java.lang.String/
form-property name=selectedFacilityCode
type=java.lang.String/
form-property name=currentPatientIndex
type=java.lang.Integer/
form-property name=selectedEncounters
type=java.util.ArrayList/
form-property name=selectedEncounter
type=java.lang.String/   
form-property name=chartSelectedEncounters
type=java.lang.String[]/ 
form-property name=chartSelectedMrn
type=java.lang.String/   
form-property name=chartSelectedFacility
type=java.lang.String/
form-property name=popupProperties
type=com.mckesson.eig.common.presentation.properties.WindowPopupProperties
/
/form-bean

action
path=/remoteParam

type=com.mckesson.eig.actions.RemoteParameterAction
attribute=searchForm
scope=session
validate=false
/action


Based on the following struts documentation this should have worked?

action path=/editRegistration

type=org.apache.struts.webapp.example.EditRegistrationAction
 attribute=registrationForm
 scope=request
 validate=false
  forward name=success  path=/registration.jsp/
/action

When the /editRegistration action is invoked, a registrationForm is
created and added to the request, but its validate method is not called. The
default value of the validate attribute is true, so if you do not want an
action to trigger form validation, you need to remember to add this
attribute and set it to false. 

So now when I print off the session values when the action is fired
these attributes are the only ones that exists:

[02 Jan 2004 13:40:58,699] [RemoteParameterAction] Scope: session
[02 Jan 2004 13:40:58,699] [RemoteParameterAction] searchForm must
be null in session
[02 Jan 2004 13:40:58,709] [RemoteParameterAction] name: SWIM_USER
[02 Jan 2004 13:40:58,779] [RemoteParameterAction] name:
SWIM_FACILITY
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] name:
SESSION_MANAGER
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] name: SWIM_MRN
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] name:
org.apache.struts.action.LOCALE
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] Our Form is
null
[02 Jan 2004 13:40:58,789] [RemoteParameterAction] Controller
contains Mrn: [032599]


I was expecting to see a searchForm in the session based on the
documentation also that the form would not be null that was passed to
execute.


-Ben




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



Indexed Property in JSP

2004-01-02 Thread White, Susan
The form is not setting the value that the user inputs.  I used some of
the posts from this list to create this code and everything compiles,
throws no exceptions but does not work, either. The setter(s) is(are)
not being called Any ideas? 
PS The indexed='true' parameter seems to have no effect present or
absent. 
Thanks! Susan

JSP:
logic:iterate id=thisParty name=acctParties indexId=idx
tr valign=bottom
td align=left valign=top class=dkBlue11b
colspan=2
  Please enter the date of birth for
  bean:write name=thisParty
property=firstName/nbsp;
  logic:notEmpty name=thisParty
property=middleName
bean:write name=thisParty
property=middleName/nbsp;
  /logic:notEmpty
  bean:write name=thisParty
property=lastName/nbsp;(MM/DD/)
/td
/tr
tr
td colspan=2
  html:text property='%= dateOfBirth[ + idx +
] %' indexed='true'/
/td
/tr
/logic:iterate

Java:
private String[] dateOfBirth=null;

/**
 * Returns the dateOfBirth by index.
 * @param int index of array
 * @return String date of birth value
 */
public String getDateOfBirth(int idx) {
if (this.dateOfBirth==null) {
return new String();
} 
else {
if (idx  this.dateOfBirth.length) {
return this.dateOfBirth[idx];
} 
else {
return new String();
}
}
}

/**
 * Sets the dateOfBirth.
 * @param dateOfBirth The dateOfBirth to set
 * @param idx The position of dateOfBirth to set
 */
public void setDateOfBirth(String dateOfBirth, int idx) {
this.dateOfBirth[idx] = dateOfBirth;
}

/**
 * Sets the dateOfBirth.
 * @param dateOfBirth The dateOfBirth to set
 * @param idx The position of dateOfBirth to set
 */
public void setDateOfBirth(String[] dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
/**
 * Returns the dateOfBirth array.
 * @return String array
 */
public String[] getDateOfBirth() {
 return dateOfBirth;
}



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



Re: Indexed Property in JSP

2004-01-02 Thread Kris Schneider
One quick comment - the JavaBean spec defines the 2-arg setter as taking 
an int as the first arg:

public void setDateOfBirth(int idx, String dateOfBirth)

White, Susan wrote:
The form is not setting the value that the user inputs.  I used some of
the posts from this list to create this code and everything compiles,
throws no exceptions but does not work, either. The setter(s) is(are)
not being called Any ideas? 
PS The indexed='true' parameter seems to have no effect present or
absent. 
Thanks! Susan

JSP:
logic:iterate id=thisParty name=acctParties indexId=idx
	tr valign=bottom
		td align=left valign=top class=dkBlue11b
colspan=2
		  Please enter the date of birth for
		  bean:write name=thisParty
property=firstName/nbsp;
		  logic:notEmpty name=thisParty
property=middleName
 		bean:write name=thisParty
property=middleName/nbsp;
		  /logic:notEmpty
 		  bean:write name=thisParty
property=lastName/nbsp;(MM/DD/)
		/td
	/tr
	tr
		td colspan=2
		  html:text property='%= dateOfBirth[ + idx +
] %' indexed='true'/			
	   	/td
	/tr
/logic:iterate

Java:
private String[] dateOfBirth=null;
	/**
	 * Returns the dateOfBirth by index.
	 * @param int index of array
	 * @return String date of birth value
	 */
	public String getDateOfBirth(int idx) {
		if (this.dateOfBirth==null) {
		return new String();
 		} 
 		else {
			if (idx  this.dateOfBirth.length) {
			return this.dateOfBirth[idx];
	 		} 
	 		else {
			return new String();
	 		}
 		}
	}

/**
 * Sets the dateOfBirth.
 * @param dateOfBirth The dateOfBirth to set
 * @param idx The position of dateOfBirth to set
 */
public void setDateOfBirth(String dateOfBirth, int idx) {
this.dateOfBirth[idx] = dateOfBirth;
}
/**
 * Sets the dateOfBirth.
 * @param dateOfBirth The dateOfBirth to set
 * @param idx The position of dateOfBirth to set
 */
public void setDateOfBirth(String[] dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
/**
 * Returns the dateOfBirth array.
 * @return String array
 */
public String[] getDateOfBirth() {
 return dateOfBirth;
}
--
Kris Schneider mailto:[EMAIL PROTECTED]
D.O.Tech   http://www.dotech.com/


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


Re: Nested tags not working with session-scope form

2004-01-02 Thread Arron Bates

If you can simply switch nested for html or logic, then the markup isn't
specifically made for the nested tags. ie: you've probably used the name
attribute etc which the nested tags don't need.

If you're able to use html or logic, then you may as well use the original
tags. If you want to take advantage of the nested tags, you'll have to look at
their specific needs in the documentation, or the tutorials at
http://keyboardmonkey.com/next


All the best.

Arron.




 Hello,
  
 I have a session scope ActionForm. I have a need to use the nested 
 tag library to iterator over some nested beans in the form. However, 
 any use of a nested:text, nested:write, nested:iterate, etc.,
  will not output the properties of the ActionForm. This results in a 
 blank HTML form in my browser.
  
 If I changed the nested prefix to the original html, logic, etc. Then
 everything outputs fine in the HTML.  
  
 I am wondering if anyone has come across this problem before, and knows
 what I might be doing wrong or something I can check.  To check my
 sanity, i wrote a simple web app using session-scoped action forms 
 and nested tags, and it worked fine. I just can't figure out why it 
 works in one web-app and not the other.
  
 Thanks,
 Joe




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



RE: Indexed Property in JSP

2004-01-02 Thread Karr, David
Besides the other problem with the order of parameters to the setter,
you also have two setters for the same property.  You'll need to change
the other setter (and the resulting property name) in order for this to
work.

Also, I believe you can remove the 'indexed=true' attribute, as you're
doing your own indexing.

-Original Message-
From: White, Susan [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 12:11 PM
To: [EMAIL PROTECTED]
Subject: Indexed Property in JSP


The form is not setting the value that the user inputs.  I used some of
the posts from this list to create this code and everything compiles,
throws no exceptions but does not work, either. The setter(s) is(are)
not being called Any ideas? 
PS The indexed='true' parameter seems to have no effect present or
absent. 
Thanks! Susan

JSP:
logic:iterate id=thisParty name=acctParties indexId=idx
tr valign=bottom
td align=left valign=top class=dkBlue11b
colspan=2
  Please enter the date of birth for
  bean:write name=thisParty
property=firstName/nbsp;
  logic:notEmpty name=thisParty
property=middleName
bean:write name=thisParty
property=middleName/nbsp;
  /logic:notEmpty
  bean:write name=thisParty
property=lastName/nbsp;(MM/DD/)
/td
/tr
tr
td colspan=2
  html:text property='%= dateOfBirth[ + idx +
] %' indexed='true'/
/td
/tr
/logic:iterate

Java:
private String[] dateOfBirth=null;

/**
 * Returns the dateOfBirth by index.
 * @param int index of array
 * @return String date of birth value
 */
public String getDateOfBirth(int idx) {
if (this.dateOfBirth==null) {
return new String();
} 
else {
if (idx  this.dateOfBirth.length) {
return this.dateOfBirth[idx];
} 
else {
return new String();
}
}
}

/**
 * Sets the dateOfBirth.
 * @param dateOfBirth The dateOfBirth to set
 * @param idx The position of dateOfBirth to set
 */
public void setDateOfBirth(String dateOfBirth, int idx) {
this.dateOfBirth[idx] = dateOfBirth;
}

/**
 * Sets the dateOfBirth.
 * @param dateOfBirth The dateOfBirth to set
 * @param idx The position of dateOfBirth to set
 */
public void setDateOfBirth(String[] dateOfBirth) {
this.dateOfBirth = dateOfBirth;
}
/**
 * Returns the dateOfBirth array.
 * @return String array
 */
public String[] getDateOfBirth() {
 return dateOfBirth;
}



-
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: FormFile NULL when uploading large file

2004-01-02 Thread Matthias Wessendorf
Hi,

the default size in Class
org.apache.struts.config.ControllerConfig

is:
/**
 * The maximum file size to process for file uploads.
 */
protected String maxFileSize = 250M;


perhaps in struts-config
this will help:
controller maxFileSize=2G /
greetings

matthias


-Original Message-
From: Ling Wu [mailto:[EMAIL PROTECTED] 
Sent: Friday, January 02, 2004 7:44 PM
To: [EMAIL PROTECTED]
Subject: FormFile NULL when uploading large file


Hi, 
 
I have a problem when uploading large file using
FormFile. It works fine with modest sized file. But
when the file size goes to 1GB, the FormFile returned
from PropertyUtils.getSimpleProperty(...) is null.
Does anyone know the reason behind this? Is there any
file size limit with FormFile?
 
Thanks.
Ling



__
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

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


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



dynamic input fields

2004-01-02 Thread Otávio Augusto
I need to generate html:text fields on demand. If i have N elements in a certain 
collection, i need one html:text field for every one of the elements in that 
collection. how to perform that? I'm using the code:

bean:define id=meusLotes name=venda property=meusLotes /
logic:iterate id=lotes name=meusLotes 
Value:br
html:text indexed=true styleClass=inputtext property=valor size=5 
maxlength=5/font color=red*/fontbr
/logic:iterate


What is missing?
Thanks in advance

Otávio Augusto

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