taglib nested-el

2006-07-11 Thread Laurent Duparchy

Hi,

(Sorry if you already get this message, I'm sure if it had been sent.)

is there a taglib "nested-el" ?

If not, what is the turnarround to evaluate an expression within a 
 tag ?




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



bean access in tile def?

2006-07-11 Thread Justin Chin
Folks,

 

I have a message in a jsp which require a dynamic attribute that I set
on a bean from an action class.  I want to use that bean within the
tiles definition file.  Is that possible?  So for example, this is what
I would do in my jsp to get the dynamic attribute:

 

 

<%

int requiredNum =
((com.my.bean.TestBean)session.getAttribute("testbean")).getRequiredcoun
t();

%>

 



 

 

My tile def looks like this:

 

  

  

 

 

 

 

 

  

 

 

I want to set "directions" dynamically from a bean which I stuff into
the session.  Is that possible, or am I totally off here?

 

Thanks,

Justin



Re: Using properties files other than ApplicationProperties

2006-07-11 Thread Monkeyden

Assuming you meant that you want to add errors in the Action, rather than
the ActionForm, in your Action...

  1. Create an empty ActionErrors object.  Let's call it "errors".
  2. Add messages to it as necessary (e.g. errors.add("propertyName"
  ,new ActionMessage("msg.key"));)
  3. Then call the base class method saveErrors(request, errors);


On 7/11/06, Laurie Harper <[EMAIL PROTECTED]> wrote:


chamal desilva wrote:
> Hi,
>
> I want store all messages in a properties file called
> MessageProperties.
>
> I added this line to struts config file.
>  parameter="arweb.resources.MessageResources">
>
> How can I retireve values in properties file from my
> action classes in order to display them using
>  tag.

Use getResources(request, key), where 'key' is "messages", to match your
struts-config entry.


http://struts.apache.org/1.2.9/api/org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest,%20java.lang.String)

L.


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




Re: Using properties files other than ApplicationProperties

2006-07-11 Thread Laurie Harper

chamal desilva wrote:

Hi,

I want store all messages in a properties file called
MessageProperties.

I added this line to struts config file.


How can I retireve values in properties file from my
action classes in order to display them using
 tag.


Use getResources(request, key), where 'key' is "messages", to match your 
struts-config entry.


http://struts.apache.org/1.2.9/api/org/apache/struts/action/Action.html#getResources(javax.servlet.http.HttpServletRequest,%20java.lang.String)

L.


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



Re: FW: html:text

2006-07-11 Thread Laurie Harper

>  type="org.apache.struts.validator.DynaValidatorForm" dynamic="true">
>

So your form bean defines only one property, named AdHrs, which is a 
list of values.


> 
>  requestURI="PrepareAction.do" >
> 
>   
>  errorStyleClass="errormsg"/>
>   
> 
>   
> 

You're using display:table to expose each entry in the list as a 
scripting variable rows, so rows is a bean of whatever type is stored in 
the AdHrs property, and you're binding the html:text element to the Hrs 
property of that bean.


Note that you have, at this point, broken the link between the form bean 
and the property; Struts has no way to know that the thing referenced by 
the html:text tag is a property on the form once the request is submitted.


What you probably want here is something like property="AdHrs[${rownum}].Hrs" value="${rows.Hrs}"/> -- the property 
name needs to name a property on the form bean. You'll have to consult 
display:table's documentation to figure out how to get rownum.


>
>

This applies a validation rule to the property 'hrs' on the form bean 
Form. As noted above, the only property you've defined is AdHrs. 
According to your code, that property holds a list of beans which have a 
property named Hrs (not hrs).


I'm not sure off hand how to specify validation rules for indexed 
properties, but at the very least you'll need to reference the nested 
property correctly.


L.

fea jabi wrote:


Thanks for your response.
have a table

in one of the columns have . not all rows have the .

need to validate the user entered values in the  using 
validator.xml.


Created an object.java file which holds the row data of the table.  
Created a list of these row objects and stored as a form property.


Not sure how to proceed now. should I put the List as a property in the 
form-bean?? if I did so how will the user edited  updated to 
the list so that I can do validations?


Using the below the table is filled with the right values but when the 
user entered values i nthe input fields the form property hrs has 
previous values itself and does not validate right as it doesn't have 
the user entered values.


need help with this.

Struts Config:
type="org.apache.struts.validator.DynaValidatorForm" dynamic="true">

   
..
...



   redirect="false"/>

   

   
   redirect="false"/>
   redirect="false"/>
   redirect="false"/>
   redirect="false"/>

   

JSP:

.

.
..

   
  





Validation.xml


   
   
   
   
   
   test
   (*this* >= 0)
   
   
   
   






From: Laurie Harper <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: Re: FW: html:text
Date: Thu, 06 Jul 2006 14:36:27 -0400

Does the 'Form' form bean have a property 'hrs'? How is it declared? 
What is the type and base type (parent class) of the form bean? We 
really need to see the relevant parts of your struts-config.xml (form 
bean declaration and action mappings) to tell what's happening.


L.

fea jabi wrote:

can somene help me with this please?

how to do validation in validator.xml


   
   
   
   
   
   test
   (*this* >= 0)
   
   
   
   

Where hrs is the attribute in the row object of the table. Even when 
I enter string value in the text field I see no error messages.




From: "fea jabi" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" 
To: user@struts.apache.org
Subject: html:text
Date: Wed, 05 Jul 2006 15:36:47 -0400

In a table in one of the columns there are 

is it required that each input item has a corresponding form-bean 
property?



by using the below does it take all the user entered values in the 
column??


Each row is an object and sessionScope.Form.hrs is the list of these 
objects.


requestURI="PrepareAction.do" >


.

   
  errorStyleClass="errormsg"/>





Thanks.

_
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/



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



_
Express yourself instantly with MSN Messenger! Download today - it's 
FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/




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

Re: How to get the action name (in addition to the context path name)?

2006-07-11 Thread Bryce Nesbitt
Thanks! Now what might be better?  I have a legacy
application that has a "member" side and an "admin" side,
each with their own actions.

But many of the view pages are nearly identical.  The only
difference in most of the view pages is the form submit, e.g.:




 




 

It makes for a lot of duplicated view code, and messy
out-of-sync updates.


> Samere, Adam J" <[EMAIL PROTECTED]>
> The org.apache.struts.action.ActionMapping class provides access to this
> information. It is provided as the first parameter to the Action.execute
> method, and is also stored as a request attribute under the
> org.apache.struts.Globals.MAPPING_KEY key
> ("org.apache.struts.action.mapping.instance").
> 
> There may be a better way to do what you are attempting though...


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



RE: How to get the action name (in addition to the context path name)?

2006-07-11 Thread Samere, Adam J
The org.apache.struts.action.ActionMapping class provides access to this
information. It is provided as the first parameter to the Action.execute
method, and is also stored as a request attribute under the
org.apache.struts.Globals.MAPPING_KEY key
("org.apache.struts.action.mapping.instance").

There may be a better way to do what you are attempting though...


-Original Message-
From: Bryce Nesbitt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 2:05 PM
To: user@struts.apache.org
Subject: How to get the action name (in addition to the context path
name)?

From within a struts 1.0 jsp, how can I find the name of the action that
invoked me?
I can find the context path easy enough:
 <%= request.getContextPath().toString() %> And the name of the
..jsp that I'm in:
  <%= request.getRequestURL() %> But where is the action name
hidden?
   

I'm trying to recycle code from two actions:
 :



So I'd like to have them share the same code, and just insert the
invoking action name.
Can this be done?

--

Visit http://www.obviously.com/


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


-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


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



RE: how do I use a LazyDynaBean as an ActionForm?

2006-07-11 Thread Yanroy

It's exactly the "lazy" part of the functionality that I need.  I have a
large and arbitrary (because they can be defined by the user) set of classes
that need fields populated inside them to configure them.  I'm assembling
the forms to get the user input based on the heirarchy of the class - they
all extend StatisticalAnalysis, so I include the .jsp fragment that presents
form fields for configuring that class's members, and then many of them also
extend FilteredAnalysis, so I intelligiently include or don't include the
jsp fragment for that, etc.  There's no way I can hope to keep the
struts-config.xml up to date with all the fields and potentially massive
number of different forms (also, by assembling the forms from fragments,
it's helpful for them to all use the same form name/type).

During the interim between my last post and your reply, I found a
LazyDynaActionForm implementation at
http://wiki.apache.org/struts/StrutsCatalogLazyList, which I came across
while searching for an answer to the exception I mentioned in my last post. 
Unfortunately, when using that, I get a "javax.servlet.jsp.JspException: No
getter method available for property filterField for bean under name
org.apache.struts.taglib.html.BEAN".  I'll ask around the lab about the
commons-validator thing... I'm not in charge of the libraries that get
distributed to the developers; if I can get that resolved, maybe I won't
have to deal with this new class.

Thanks very much for your help,
Ryan
-- 
View this message in context: 
http://www.nabble.com/how-do-I-use-a-LazyDynaBean-as-an-ActionForm--tf1925661.html#a5275174
Sent from the Struts - User forum at Nabble.com.


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



RE: how do I use a LazyDynaBean as an ActionForm?

2006-07-11 Thread Samere, Adam J
The class you are missing is part of the commons validator framework.
http://jakarta.apache.org/commons/validator/

commons-validator.jar is certainly a part of the core struts
distribution though. Make sure you include all the struts dependencies
for your version.

If all you need is to define ActionForms without writing concrete
ActionForm subclasses yourself you can use the
org.apache.struts.action.DynaActionForm. The lazy forms (DynaBean based)
allow you to get and set properties without defining them in the
form-bean declaration in struts-config.xml.

Adam

-Original Message-
From: Yanroy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 1:53 PM
To: user@struts.apache.org
Subject: RE: how do I use a LazyDynaBean as an ActionForm?


I've seen the LazyValidatorForm referenced on a number of websites.  I
actually tried it before I tried the LazyDynaBean, but it causes an
exception.  Apparently there's some related class missing?  Here's what
I get from tomcat when I try to use it:

java.lang.NoClassDefFoundError:
org/apache/commons/validator/ValidatorException

The rest of the stack trace seems to indicate it's coming from a JSP,
presumably the one my strut forwards to.  My understanding of
LazyValidatorForm is that it is now a full part of struts, so I assume
it's in the struts libs, which are definately installed.  I'm obviously
missing something here...  Do I need to enable the validator?  I was
planning on doing validation myself inside the strut.

Thanks again,
Ryan
--
View this message in context:
http://www.nabble.com/how-do-I-use-a-LazyDynaBean-as-an-ActionForm--tf19
25661.html#a5274452
Sent from the Struts - User forum at Nabble.com.


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


-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


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



How to get the action name (in addition to the context path name)?

2006-07-11 Thread Bryce Nesbitt
>From within a struts 1.0 jsp, how can I find the name of the action that
invoked me?
I can find the context path easy enough:
 <%= request.getContextPath().toString() %>
And the name of the .jsp that I'm in:
  <%= request.getRequestURL() %>
But where is the action name hidden?
   

I'm trying to recycle code from two actions:
 :



So I'd like to have them share the same code, and just insert the
invoking action name.
Can this be done?

-- 

Visit http://www.obviously.com/


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



RE: how do I use a LazyDynaBean as an ActionForm?

2006-07-11 Thread Yanroy

I've seen the LazyValidatorForm referenced on a number of websites.  I
actually tried it before I tried the LazyDynaBean, but it causes an
exception.  Apparently there's some related class missing?  Here's what I
get from tomcat when I try to use it:

java.lang.NoClassDefFoundError:
org/apache/commons/validator/ValidatorException

The rest of the stack trace seems to indicate it's coming from a JSP,
presumably the one my strut forwards to.  My understanding of
LazyValidatorForm is that it is now a full part of struts, so I assume it's
in the struts libs, which are definately installed.  I'm obviously missing
something here...  Do I need to enable the validator?  I was planning on
doing validation myself inside the strut.

Thanks again,
Ryan
-- 
View this message in context: 
http://www.nabble.com/how-do-I-use-a-LazyDynaBean-as-an-ActionForm--tf1925661.html#a5274452
Sent from the Struts - User forum at Nabble.com.


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



RE: Shale Validation framework - Dynamic Parameters.

2006-07-11 Thread Iakouchev Alexander-EAL027C
Thank you Wendy! 

-Original Message-
From: Wendy Smoak [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 1:29 PM
To: Struts Users Mailing List
Subject: Re: Shale Validation framework - Dynamic Parameters.

On 7/11/06, Iakouchev Alexander-EAL027C <[EMAIL PROTECTED]> wrote:

> Is this possible to pass dynamically information from a beans as a 
> shale method parameter?

Please come join us on the Shale user list, and re-post your question
there.

* http://shale.apache.org/mail-lists.html

Thanks!
--
Wendy

-
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: Shale Validation framework - Dynamic Parameters.

2006-07-11 Thread Wendy Smoak

On 7/11/06, Iakouchev Alexander-EAL027C <[EMAIL PROTECTED]> wrote:


Is this possible to pass dynamically information from a beans as a shale
method parameter?


Please come join us on the Shale user list, and re-post your question there.

* http://shale.apache.org/mail-lists.html

Thanks!
--
Wendy

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



Shale Validation framework - Dynamic Parameters.

2006-07-11 Thread Iakouchev Alexander-EAL027C
I have a question.

Is this possible to pass dynamically information from a beans as a shale
method parameter?

The main idea is - I need to know about bean Ids then valuator invoked.

 

Solution, like below does not works.



 

,or something like this...



 

Alex Yakushev.

 



RE: how do I use a LazyDynaBean as an ActionForm?

2006-07-11 Thread Samere, Adam J
The class specified by the type attribute in your form bean must be a
concrete implementation of org.apache.struts.action.ActionForm (as the
signature of the Action.execute method indicates). 

You can create your own implementation of ActionForm backed by a
LazyDynaBean, or try org.apache.struts.validator.LazyValidatorForm.

-Adam

-Original Message-
From: Yanroy [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 12:39 PM
To: user@struts.apache.org
Subject: how do I use a LazyDynaBean as an ActionForm?


Hi,
You may recall I posted a message similar to this one several days ago.
I never received a reply, so I'm hoping that this shorter (and hopefully
simpler) version will get one.  I'm using a LazyDynaBean as the form
associated with a strut, which the docs seem to say will work by being
wrapped inside some other kind of ActionForm.  I haven't found any
examples online of exactly how to do this (none contain
struts-config.xml, strut and JSP all from the same app).  I'll give you
a couple lines from my
struts-config.xml:





I also specify some array fields in that bean, but I edited that out for
the sake of brevity.

I also have my action:




The real problem here is that I have no idea how to get the data out of
the LazyDynaBean.  In my action strut, the form parameter passed to the
handler is null.  To me, this indicates some kind of misconfiguration,
but I can't see what it could be.  I'd greatly appreciate any help you
can give... this problem is completely holding up my work (it's the last
part of the webapp I'm making).

Thank you very much,
Ryan

PS - If anyone cares, my previous message was titled "ActionForm is null
when using dynabean"
--
View this message in context:
http://www.nabble.com/how-do-I-use-a-LazyDynaBean-as-an-ActionForm--tf19
25661.html#a5273110
Sent from the Struts - User forum at Nabble.com.


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


-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


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



how do I use a LazyDynaBean as an ActionForm?

2006-07-11 Thread Yanroy

Hi,
You may recall I posted a message similar to this one several days ago.  I
never received a reply, so I'm hoping that this shorter (and hopefully
simpler) version will get one.  I'm using a LazyDynaBean as the form
associated with a strut, which the docs seem to say will work by being
wrapped inside some other kind of ActionForm.  I haven't found any examples
online of exactly how to do this (none contain struts-config.xml, strut and
JSP all from the same app).  I'll give you a couple lines from my
struts-config.xml:





I also specify some array fields in that bean, but I edited that out for the
sake of brevity.

I also have my action:




The real problem here is that I have no idea how to get the data out of the
LazyDynaBean.  In my action strut, the form parameter passed to the handler
is null.  To me, this indicates some kind of misconfiguration, but I can't
see what it could be.  I'd greatly appreciate any help you can give... this
problem is completely holding up my work (it's the last part of the webapp
I'm making).

Thank you very much,
Ryan

PS - If anyone cares, my previous message was titled "ActionForm is null
when using dynabean"
-- 
View this message in context: 
http://www.nabble.com/how-do-I-use-a-LazyDynaBean-as-an-ActionForm--tf1925661.html#a5273110
Sent from the Struts - User forum at Nabble.com.


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



Re: Action called multiple times

2006-07-11 Thread Al Eridani

On 7/10/06, Thomas Joseph <[EMAIL PROTECTED]> wrote:

Hi all,

I have got a strange problem. My action class generates PDF, and writes on
the the response and fushes it, but I can see that this action is getting
called multiple times (2-5 times). I have cheked my struts-config to be just
perfect (No forwards)


The culprit could be the browser, especially MSIE.

The brain-dead way that MSIE used to work (three years ago, when I had to
investigate this) goes like this:

1) The user clicks on the browser to request the file.
2) The server sends the file back.
3) The browser reads the first 100 bytes or so to determine the type.
4) Once the browser determines that it is a PDF file, it discards the bytes
it has already read and the rest of the file.
5) The browser *on its own, without user intervention* requests the file again.
6) The browser hands the received file to the helper plugin or application.

In fact, some versions of MSIE were even more stupid, and requested the file
three times. It was so bad that Microsoft published the incredibly convoluted
logic MSIE followed trying to figure out the content type of byte streams, but
even then MSIE showed that the publication was not always accurate.

Try using different browsers and take note of any difference in behavior.

What can you do? First, always set correctly the "Content-Type" response
header. Second, if you can, play games so that the request from the
browser looks like "http://blahblah/.../moreblah.pdf";. If the URL ends
in ".pdf",
MSIE will be more likely to do the right thing the first time.

Otherwise, just learn to live with it.

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



RE: Indexed Bean Copy

2006-07-11 Thread Pillay, Kiren KN
Thanks for the reply, I will consider your suggestion.

I could have written the business objects to fit the form bean with a
one-to-one mapping, but then I don't think it's a good idea to make the
domain objects match your framework's solution (even though it would
have been quicker this way).

I could have used a collection, I'll add it in when I refactor the code.

Regards
Kiren 

-Original Message-
From: Adam Gordon [mailto:[EMAIL PROTECTED] 
Sent: 11 July 2006 05:24 PM
To: Struts Users Mailing List
Subject: Re: Indexed Bean Copy

Kiren-

I assume you mean BeanUtils.copyProperties(...) right?

If so, I believe the reason you cannot use it is because
BeanUtils.copyProperties(...) performs a shallow copy and per the
javadocs (HTML tags removed):  "...and so complex properties (for
example, nested ones) will not be copied."

I would suggest removing it from the Action code by creating a utility
class and implement your own copy() method.  Say, a static "duplication"

method that takes an instance of your bean as a parameter and returns a
new instance of the same bean.  I'm curious as to why you're using
arrays as opposed to the Collections framework

I don't believe that any copy methods in the J2SE are deep copy methods,
so if this is what you need, then a static utility method is probably
your best bet.

cheers,

-Adam

Pillay, Kiren KN wrote:
> Hi
>
> I've got a domain object which stored an indexed array of objects.
>
> <-- Extract of Domain Object
> public class GroupExposures {
>
>   private Exposure [] exposures=new Exposure[]{new Exposure(),new 
> Exposure(),new Exposure()};
>   
> 
>   class Exposure{
>   float totalSBSABroughtForward;
>   float otherSBSAFacilitiesPerParagraph;
>   float SBSAExposureToTheApplicant;
>   float otherSBGFacilitiesPerParagraph;
>   float totalSBGExposureToTheApplicant;
>   float otherSBSAFacilitesWholeGroup;
>   float otherSBGFacilitiesWholeGroup;
>   float totalSBGExposureWholeGroup;
>   float SBGBorrowingsWholeGroup;
>   float otherBankBorrowings;
>   float otherLenders;
>   float totalArrangedBorrowings;
>   }
>   
> public float getOtherLenders(int type) {
>   return exposures[type].otherLenders;
>   }
>   public void setOtherLenders(float otherLenders,int type) {
>   exposures[type].otherLenders = otherLenders;
>   }
>
> -->
> Form extract:
> public float getOtherLendersUtilisation(){return
> OtherLendersUtilisation;
>   }
>
> 
>
> In my Action class I have to say the following:
>  
>
groupExposures.setOtherLenders(groupExposuresForm.getOtherLendersUtilisa
> tion(),LimitTypes.UTILISATION);   
>  
>
> --
> The way this class is set up, I cannot use BeanUtils.copy() to copy 
> the values across. The Action class is huge because of this and it was

> quite tedious putting in the code. Is there a quicker, easier way to
do this?
>
> Regards
> Kiren Pillay
>
>
>
> __
> __ __
>
> Standard Bank Disclaimer and Confidentiality Note
>
> This e-mail, its attachments and any rights attaching hereto are, 
> unless the context clearly indicates otherwise, the property of 
> Standard Bank Group Limited and/or its subsidiaries ("the Group"). It 
> is confidential, private and intended for the addressee only. Should 
> you not be the addressee and receive this e-mail by mistake, kindly 
> notify the sender, and delete this e-mail, immediately and do not 
> disclose or use same in any manner whatsoever. Views and opinions 
> expressed in this e-mail are those of the sender unless clearly stated

> as those of the Group. The Group accepts no liability whatsoever for 
> any loss or damages whatsoever and howsoever incurred, or suffered, 
> resulting, or arising, from the use of this email or its attachments. 
> The Group does not warrant the integrity of this e-mail nor that it is

> free of errors, viruses, interception or interference. Licensed 
> divisions of the Standard Bank Group are authorised financial services

> providers in terms of the Financial Advisory and Intermediary Services

> Act, No 37 of 2002 (FAIS).
> For information about the Standard Bank Group Limited visit our 
> website http://www.standardbank.co.za 
> __
> __ ___
>
>   

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

__

Standard Bank Disclaimer and Confidentiality Note

This e-mail, its attachments and any rights attaching hereto are, unless the 
context clearly indicates otherwise, t

Re: Indexed Bean Copy

2006-07-11 Thread Adam Gordon

Kiren-

I assume you mean BeanUtils.copyProperties(...) right?

If so, I believe the reason you cannot use it is because 
BeanUtils.copyProperties(...) performs a shallow copy and per the 
javadocs (HTML tags removed):  "...and so complex properties (for 
example, nested ones) will not be copied."


I would suggest removing it from the Action code by creating a utility 
class and implement your own copy() method.  Say, a static "duplication" 
method that takes an instance of your bean as a parameter and returns a 
new instance of the same bean.  I'm curious as to why you're using 
arrays as opposed to the Collections framework


I don't believe that any copy methods in the J2SE are deep copy methods, 
so if this is what you need, then a static utility method is probably 
your best bet.


cheers,

-Adam

Pillay, Kiren KN wrote:

Hi

I've got a domain object which stored an indexed array of objects.

<-- Extract of Domain Object
public class GroupExposures {

private Exposure [] exposures=new Exposure[]{new Exposure(),new
Exposure(),new Exposure()};

	  
	class Exposure{

float totalSBSABroughtForward;
float otherSBSAFacilitiesPerParagraph;
float SBSAExposureToTheApplicant;
float otherSBGFacilitiesPerParagraph;
float totalSBGExposureToTheApplicant;
float otherSBSAFacilitesWholeGroup;
float otherSBGFacilitiesWholeGroup;
float totalSBGExposureWholeGroup;
float SBGBorrowingsWholeGroup;
float otherBankBorrowings;
float otherLenders;
float totalArrangedBorrowings;
}

public float getOtherLenders(int type) {
return exposures[type].otherLenders;
}
public void setOtherLenders(float otherLenders,int type) {
exposures[type].otherLenders = otherLenders;
}

-->
Form extract:
public float getOtherLendersUtilisation(){return
OtherLendersUtilisation;
}



In my Action class I have to say the following:
 
groupExposures.setOtherLenders(groupExposuresForm.getOtherLendersUtilisa

tion(),LimitTypes.UTILISATION); 
 


--
The way this class is set up, I cannot use BeanUtils.copy() to copy the
values across. The Action class is huge because of this and it was quite
tedious putting in the code. Is there a quicker, easier way to do this? 


Regards
Kiren Pillay




__

Standard Bank Disclaimer and Confidentiality Note

This e-mail, its attachments and any rights attaching hereto are, unless
the context clearly indicates otherwise, the property of Standard Bank
Group Limited
and/or its subsidiaries ("the Group"). It is confidential, private and
intended for the addressee only. Should you not be the addressee and
receive this e-mail by
mistake, kindly notify the sender, and delete this e-mail, immediately
and do not disclose or use same in any manner whatsoever. Views and
opinions
expressed in this e-mail are those of the sender unless clearly stated
as those of the Group. The Group accepts no liability whatsoever for any
loss or
damages whatsoever and howsoever incurred, or suffered, resulting, or
arising, from the use of this email or its attachments. The Group does
not warrant the integrity
of this e-mail nor that it is free of errors, viruses, interception or
interference. Licensed divisions of the Standard Bank Group are
authorised financial services providers
in terms of the Financial Advisory and Intermediary Services Act, No 37
of 2002 (FAIS).
For information about the Standard Bank Group Limited visit our website
http://www.standardbank.co.za

___

  


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



Re: Tags in struts

2006-07-11 Thread Adam Gordon

Maya-

Excellent!  For a list box, I believe that you must have at least one 
option selected at any given time.  If you don't want to provide a 
default and force the user to actually select one (and then you can 
validate the user's input to ensure he/she has actually selected a real 
value) then you can do what we did.


For our Time Zone list box, we created the list of time zones and also 
inserted a text label of "Time Zone" with the value of "" into the 
LabelValueBean List and then in the Action that is executed before the 
JSP page is rendered, we set the property on the bean.  So for our time 
zone it would be beanInstance.setTimeZone("").  This defaults our time 
zone list box to display "Time Zone" and if the user tries to submit the 
form without selecting a time zone, our validator informs them that they 
must select a time zone.


Glad it worked.

-Adam

Maya menon wrote:

Thanks Adam
   
  Implemented it and it worked.

  One quick question, when we use these tags, one of the options get
selected by default. How can we modify the tag so that NONE of the
options get selected by default ?
   
  Thanks.


  


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



Re: Tags in struts

2006-07-11 Thread Maya menon
Thanks Adam
   
  Implemented it and it worked.
  One quick question, when we use these tags, one of the options get selected 
by default. How can we modify the tag so that NONE of the options get selected 
by default ?
   
  Thanks.

Adam Gordon <[EMAIL PROTECTED]> wrote:
  Maya-

Let's say your TestBean class has getFoo() and getBar() methods both 
which return Collection objects. If these objects are instances of 
LabelValueBean objects it's really easy, if they are not, I'd recommend 
converting them to these bean objects either in your bean class or in 
the action (though the latter could add additional overhead if not done 
correctly). Assume also that your TestBean class has getter and setter 
methods for ONE Foo and ONE Bar (say getOneFoo(), setOneFoo(String foo), 
getOneBar(), setOneBar(String bar).

In your Action's execute method (or a method called by execute(...)) 
type (assume testBean is an instance of the TestBean class and the 
getFoo() and getBar() methods return Collections of LabelValueBean objects):

public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

...

Collection fooCollection = testBean.getFoo();
Collection barCollection = testBean.getBar();

request.setAttribute("fooCollection", fooCollection); // 
"fooCollection" can be any text you want - i recommend using a final 
static reference instead of a hard-coded string.

request.setAttribute("barCollection", barCollection); // same 
comment applies

...
}

in your JSP, you would say:


your collection on the request -->
property="value"
labelProperty="label"/>


and,


property="value"
labelProperty="label"/>


to render list boxes of your model data.

html:options knows that you have a Collection of objects (in this case 
LabelValueBean objects) that have the methods getValue() and 
getLabel(). Note that since these attributes are configurable, you can 
make the Collection a collection of any type of bean you want so long as 
all the beans in the collection have a getXXX() methods where XXX are 
the values of the attributes "property" and "labelProperty".

When your form is submitted, the setOneFoo(String) and setOneBar(String) 
methods will be called and set with the value of the "property" 
attribute. the "labelProperty" attribute dictates what is actually 
displayed to the user in the browser.

Let me know if you have any more questions.

-Adam

Maya menon wrote:
> Thanks Adam.
> 
> Yes, I have a bean lets say, Testbean with two Collections.
> 
> I have to display the value of these Collections[has objects] in a
> select box in my JSP.
> 
> Can you send me the sample code please ?
> 
> Maya
>
> 

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




-
Yahoo! Music Unlimited - Access over 1 million songs.Try it free. 

RE: Action called multiple times

2006-07-11 Thread Samere, Adam J
Also, if you are submitting the request with script (i.e. onclick event
of a button) it's possible that the browser is submitting the form and
the call for the onclick. 

-Original Message-
From: Ulrich Elsner [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 10:35 AM
To: Struts Users Mailing List
Subject: Re: Action called multiple times

Hi,

just to be sure: in the Action, you do a

return null;

if everything is successful?
Everything else looks ok [1] or at least shouldn't trick Struts into
rerunning the action. You might want to set the ContentType in the
response, though.

Ulrich

[1] that is, looks just like my code, which just works with no
complaints.

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


-
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


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



Re: Action called multiple times

2006-07-11 Thread Ulrich Elsner

Hi,

just to be sure: in the Action, you do a

return null;

if everything is successful?
Everything else looks ok [1] or at least shouldn't trick Struts into
rerunning the
action. You might want to set the ContentType in the response, though.

Ulrich

[1] that is, looks just like my code, which just works with no complaints.

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



Re: JDK1.4.2 Version

2006-07-11 Thread struts
1.4.2 was Mantis.  Pretty much all significant revisions have code
names, then the codename is dropped after the production release.
http://java.sun.com/j2se/codenames.html

[EMAIL PROTECTED] wrote:
> Hi,
> I don't think 1.4.2 has got a naming. It started from 1.5 (Tiger) and
> SE6 "Mustang", 7 "Dolphin"
>
>
> Thanks and Regards,
> S.Ramkumar
> Associate Consultant - Investment Banking
> PrimeSourcing(tm)   "Add Value Reduce Risk"
> i-flex solutions limited, Bangalore
> Ph:+ 91-80- 22086000/57596000- extn 6873
> E-Mail:[EMAIL PROTECTED]
>
> -Original Message-
> From: Vasumathi [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, July 11, 2006 1:56 PM
> To: user@struts.apache.org
> Subject: JDK1.4.2 Version
>
> Hi All
>Can anyone tell me the name of 
> JDK1.4.2 like Java SE6 name is "Mustang".
>
> With Regards
> Vasumathi.
>   

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



DownloadAction in Struts 1.2.8

2006-07-11 Thread Raghuveer
When using download  Action 2 Dialogue Windows are opening.
Is it wrong in adding
 response.setHeader("Content-Disposition.


---
protected StreamInfo getStreamInfo(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response)
throws FileNotFoundException,CAcsException,Exception {
...


ServletContext servletContext = getServlet().getServletContext();
strTemplatePath =
servletContext.getResource(strTemplateDirName).getPath();
file  = new File(strTemplatePath+strFileName);

strContentType =servletContext.getMimeType(strTemplatePath);
response.setHeader("Content-Disposition","attachment;filename=\"" +
strFileName + "\"");// set header information

return new FileStreamInfo(strContentType, file);



.
}


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



Re: Action called multiple times

2006-07-11 Thread Thomas Joseph
Hi Martin,

I am delegating the pdf generation from the action class to a different
class, that uses itext to generate PDF, which inturn provides the bytestream
to the action class. Action Class writes these bytes to the browser and then
flushes the stream.

Here is the sample code for your reference..

// body of the execute method
{
...
...
try {

PDFDelegate delegate = new PDFDelegate();
baos = (ByteArrayOutputStream)delegate.generatePDF(hashMapParams);

response.setContentLength(baos.size());

response.setHeader("Content-disposition", " inline;
filename=Document.pdf");

ServletOutputStream sos = response.getOutputStream();
baos.writeTo(sos);

sos.flush();
}
catch (Exception e) {
}
}

To add up, I noticed this problem when I was in debug mode in eclipse 3.0. I
use JBoss 3.2.3.

Thanks

Thomas Joseph

From: "Martin Gainty" <[EMAIL PROTECTED]>

> Thomas Joseph-
>
> How are you generating the PDF?
>
> Martin --
> *
> This email message and any files transmitted with it contain confidential
> information intended only for the person(s) to whom this email message is
> addressed.  If you have received this email message in error, please
notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy.  Thank you.
>
>
>
> - Original Message -
> From: "Thomas Joseph" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" 
> Sent: Tuesday, July 11, 2006 1:29 AM
> Subject: Action called multiple times
>
>
> > Hi all,
> >
> > I have got a strange problem. My action class generates PDF, and writes
on
> > the the response and fushes it, but I can see that this action is
getting
> > called multiple times (2-5 times). I have cheked my struts-config to be
just
> > perfect (No forwards)
> >
> > What may be the reason for this? What can be the checklist I can have to
> > rectify this?
> >
> > Thanks in advance.
> > Thomas Joseph
> >
> >



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



Re: Action called multiple times

2006-07-11 Thread Martin Gainty
Thomas Joseph-

How are you generating the PDF?

Martin --
*
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.



- Original Message - 
From: "Thomas Joseph" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Tuesday, July 11, 2006 1:29 AM
Subject: Action called multiple times


> Hi all,
> 
> I have got a strange problem. My action class generates PDF, and writes on
> the the response and fushes it, but I can see that this action is getting
> called multiple times (2-5 times). I have cheked my struts-config to be just
> perfect (No forwards)
> 
> What may be the reason for this? What can be the checklist I can have to
> rectify this?
> 
> Thanks in advance.
> Thomas Joseph
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

Re: [Shale] some questions regarding dialogs and subdialogs

2006-07-11 Thread Wendy Smoak

On 7/11/06, David Delbecq <[EMAIL PROTECTED]> wrote:


Recently, i decided to play a bit with shale.  I began to write some
tests jsp to play with it. I came across various problems/interrogations:


Please come join us on the Shale user list, and re-post your question there.

  http://shale.apache.org/mail-lists.html

Thanks!
--
Wendy

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



[Shale] some questions regarding dialogs and subdialogs

2006-07-11 Thread David Delbecq

Hello all,

Recently, i decided to play a bit with shale.  I began to write some 
tests jsp to play with it. I came across various problems/interrogations:


1) considering the following dialog configuration, and the following 
jsps  (see bottom of email), i am supposed to have one main dialog, with 
a button starting a subdialog to edit one specific value.
More precisely, the backing bean of  main dialog is a property bean 
which gets modified by the subdialog. I can start the dialog ok with  
, i enter 
the subdialog when i click the appropriate button in testMain.faces but 
i am stuck in the subdialog. I never return from it. Did i miss 
something in the way a dialog is supposed to end? There is no message in 
console to help and in subdialog i click on an action which's outcome 
should direct to and  of subdialog.


2) I plan in an app to have the following structure:
- have a 'main' dialog present some forms to the user to edit a bean X 
containing some properties.
- amongst properties of X there is a collection of element Y, those 
elements are complex beans which will be presented read-only
- i need, next to those elements Y to put a button starting a subdialog 
for edition of Y.

- How do i pass the element Y as a parameter to the subdialog for edition?
- Will the content of my main dialog be preserved during the run of 
subdialog?


3) While testing, i noticed if i start dialog A by clicking on an action 
'dialog:A', enter a subdialog B, redeploy the webapp, click again on 
action 'dialog:A', i get exceptions in console telling me "You have 
requested a transition outcome named "dialog:A" from a state named 
"" in a dialog named "B", but no transition definition can be 
found.  Double check the spelling of the transition outcome name. To 
circumvent this problem i need to remove my jsessionId cookie, reload 
the page containg the link to action, and the i can start dialog:A. Why 
isn't dialog: always assumed as an attempt to start a new dialog and 
drop currently running one?


4) is there a way to start a dialog process or create a link to a JSF 
page without ressorting to a (like http://?action=dialog: or 
http:///userDetails.faces?username=), all this to prevent the 
use of javascript when possible and allow the sending of direct link to 
some JSF content by email.



Greetings,
David Delbecq



dialog-config.xml:
http://struts.apache.org/dtds/shale-dialog-config_1_0.dtd";>



   
   
   
  
   

   
   
   
   
  
   

   
   
   
   
   






testMain.jsp
http://www.w3.org/TR/html4/loose.dtd";>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>

 
   

   



   
   
   

   
 



testSub.jsp
http://www.w3.org/TR/html4/loose.dtd";>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>

 
   

   

   

   
 


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



Re: problems using validation framework in struts

2006-07-11 Thread Ed Griebel

I haven't seen this error, but my guess is that you have referenced a
form bean in your validation.xml that is not defined in
struts-config.xml. Look for a typo in the name.

-ed

On 7/11/06, Anil Kumar Pippalapalli <[EMAIL PROTECTED]> wrote:


hi all,
 iam new to struts  and iam tryin out a simple application which validates
 password for minlength and maxlength in nb 4.1.

iam gettin several exceptions saying unable to load validation.xml and 
validation-rules.xml

check below errors,

Using CATALINA_BASE:   C:\Documents and 
Settings\anil\.netbeans\4.1\jakarta-tomcat-5.5.7_base
Using CATALINA_HOME:   C:\Program 
Files\netbeans-4.1\enterprise1\jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR: C:\Documents and 
Settings\anil\.netbeans\4.1\jakarta-tomcat-5.5.7_base\temp
Using JAVA_HOME:   C:\Program Files\Java\jdk1.5.0_06
Jul 11, 2006 3:16:09 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
Jul 11, 2006 3:16:09 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3535 ms
Jul 11, 2006 3:16:10 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 11, 2006 3:16:10 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
Jul 11, 2006 3:16:10 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 11, 2006 3:16:17 PM org.apache.catalina.core.ApplicationContext log
INFO: action: []: Verifying ModuleConfig for this module
Jul 11, 2006 3:16:17 PM org.apache.catalina.core.ApplicationContext log
INFO: action: []: Verification of ModuleConfig has been completed
Jul 11, 2006 3:16:17 PM 
org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn init
INFO: Initializing memory database plug in from '/WEB-INF/database.xml'
Jul 11, 2006 3:16:17 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 11, 2006 3:16:17 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jul 11, 2006 3:16:21 PM org.apache.struts.tiles.TilesPlugin 
initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Jul 11, 2006 3:16:21 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 11, 2006 3:16:21 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jul 11, 2006 3:16:25 PM org.apache.struts.tiles.TilesPlugin 
initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Jul 11, 2006 3:16:25 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 11, 2006 3:16:25 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jul 11, 2006 3:16:26 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 11, 2006 3:16:26 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 11, 2006 3:16:27 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 11, 2006 3:16:27 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 11, 2006 3:16:37 PM org.apache.struts.tiles.TilesPlugin 
initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Jul 11, 2006 3:16:37 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 11, 2006 3:16:37 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jul 11, 2006 3:16:38 PM org.apache.struts.validator.ValidatorPlugIn init
SEVERE: null
java.lang.NullPointerException
at 
org.apache.commons.validator.ValidatorResources.internalProcessForms(ValidatorResources.java:464)
at 
org.apache.commons.validator.ValidatorResources.process(ValidatorResources.java:415)
at 
org.apache.commons.validator.ValidatorResources.(ValidatorResources.java:162)
at 
org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:237)
at 
org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:162)
at 
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:900)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardCont

Re: Re: Performance Tests on Action Level

2006-07-11 Thread Leon Rosenberg

On 7/11/06, Julian Tillmann <[EMAIL PROTECTED]> wrote:


HI!



Thank you for your link!

I tried to deploy the war-file on tomcat 4 and tomcat 5 but always get the same
exception "major-minor version".
Does it require JDK 1.5?
I hope not because I would be very interested in this tool!

Thanks
Julian


Hi Julian,

The current version is compiled with jdk1.5, hence the error, but the
code itself doesn't require 1.5 at least not 'really'.
You can checkout the sourcecode from moskito.dev.java.net:
https://moskito.dev.java.net/servlets/ProjectSource#cmdlinecvs

and try to compile it with 1.4.
most problems to expect are generics:
like private List listeners

and new "for" syntax:
for (ValueHolder holder : valuesAsList)

and of course atomics, but they are available from compatibility packages.

if its your absolute requirement to use 1.4 we can talk off-list about
possibilities.

regards
Leon




 Original-Nachricht 
Datum: Tue, 11 Jul 2006 13:21:59 +0200
Von: Leon Rosenberg <[EMAIL PROTECTED]>
An: Struts Users Mailing List 
Betreff: Re: Performance Tests on Action Level

> http://moskito.anotheria.net is probably what you want.
>
> try
> http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers
>
> The project is (yet) rather bad documented (working on it) so ask me
> directly if you have any questions :-)
>
> regards
> Leon
>
> On 7/11/06, Julian Tillmann <[EMAIL PROTECTED]> wrote:
> > Hi everybody,
> >
> > we need a performance test on the actions level in our rather big Struts
> Application which contains many database queries. for example to find out
> which Action takes the longest or which actions might cause a high CPU
> usage ..
> > Is there a tool how to implement it? Or is it possible via filter?
> > The problem is that there's a constant, high CPU usage on our Tomcat and
> we'd like to find out why.
> > I'm sure that it's because of the struts-application.
> >
> > thanks very much
> > Julian
> >
> >
> >
> > --
> >
> >
> > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> >
> > -
> > 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]

--


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

-
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: Fw: jasper

2006-07-11 Thread C. Grobmeier
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

this list is not for jasper. try this:
http://jasperreports.sourceforge.net/documentation.html


Abhimanyu Koul wrote:
> hi all I asked a question.
> Can anyone please help me. its urgent
> Regards,
> Abhimanyu Koul
> FinEng Solutions (P)  Ltd.
> # +91 22 66950676  Extn. 212
> 
> 
> DISCLAIMER
> This e-mail and any attachments are confidential and intended solelyfor the
> addressee and may also be privileged or exempt from disclosure under
> applicable law. If you are not the addressee, or have received this e-mail
> in error, please notify the sender immediately, delete it from your system
> and do not copy, disclose or otherwise act upon any part of this e-mail or
> its attachments
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted,corrupted,lost,destroyed,arrive late or
> incomplete or contain viruses.The sender therefore does not accept liability
> for any errors or omissions in the contents of this message which arise as a
> result of e-mail transmission. If verification is required please request a
> hard-copy version.
> - Original Message -
> From: "Abhimanyu Koul" <[EMAIL PROTECTED]>
> To: "Struts Mailing list" 
> Sent: Tuesday, July 11, 2006 11:44 AM
> Subject: jasper
> 
> 
> hi all!
> I am new to jasper reports.
> can anyone please give me some good jasper report resources. some ebooks or
> other resources.
> thanks
> Regards,
> Abhimanyu Koul
> FinEng Solutions (P)  Ltd.
> # +91 22 66950676  Extn. 212
> 
> 
> DISCLAIMER
> This e-mail and any attachments are confidential and intended solelyfor the
> addressee and may also be privileged or exempt from disclosure under
> applicable law. If you are not the addressee, or have received this e-mail
> in error, please notify the sender immediately, delete it from your system
> and do not copy, disclose or otherwise act upon any part of this e-mail or
> its attachments
> E-mail transmission cannot be guaranteed to be secure or error-free as
> information could be intercepted,corrupted,lost,destroyed,arrive late or
> incomplete or contain viruses.The sender therefore does not accept liability
> for any errors or omissions in the contents of this message which arise as a
> result of e-mail transmission. If verification is required please request a
> hard-copy version.
> 
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.1 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEs52Okv8rKBUE/T4RAjRPAKCUBeqmhysylKVYKph3AJvfB0uJdACfQrJm
CZAxfMENvwYVc7O+IbMNjgg=
=N7IY
-END PGP SIGNATURE-

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



Fw: jasper

2006-07-11 Thread Abhimanyu Koul
hi all I asked a question.
Can anyone please help me. its urgent
Regards,
Abhimanyu Koul
FinEng Solutions (P)  Ltd.
# +91 22 66950676  Extn. 212


DISCLAIMER
This e-mail and any attachments are confidential and intended solelyfor the
addressee and may also be privileged or exempt from disclosure under
applicable law. If you are not the addressee, or have received this e-mail
in error, please notify the sender immediately, delete it from your system
and do not copy, disclose or otherwise act upon any part of this e-mail or
its attachments
E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted,corrupted,lost,destroyed,arrive late or
incomplete or contain viruses.The sender therefore does not accept liability
for any errors or omissions in the contents of this message which arise as a
result of e-mail transmission. If verification is required please request a
hard-copy version.
- Original Message -
From: "Abhimanyu Koul" <[EMAIL PROTECTED]>
To: "Struts Mailing list" 
Sent: Tuesday, July 11, 2006 11:44 AM
Subject: jasper


hi all!
I am new to jasper reports.
can anyone please give me some good jasper report resources. some ebooks or
other resources.
thanks
Regards,
Abhimanyu Koul
FinEng Solutions (P)  Ltd.
# +91 22 66950676  Extn. 212


DISCLAIMER
This e-mail and any attachments are confidential and intended solelyfor the
addressee and may also be privileged or exempt from disclosure under
applicable law. If you are not the addressee, or have received this e-mail
in error, please notify the sender immediately, delete it from your system
and do not copy, disclose or otherwise act upon any part of this e-mail or
its attachments
E-mail transmission cannot be guaranteed to be secure or error-free as
information could be intercepted,corrupted,lost,destroyed,arrive late or
incomplete or contain viruses.The sender therefore does not accept liability
for any errors or omissions in the contents of this message which arise as a
result of e-mail transmission. If verification is required please request a
hard-copy version.



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



Re: Re: Performance Tests on Action Level

2006-07-11 Thread Julian Tillmann

HI!

 

Thank you for your link!

I tried to deploy the war-file on tomcat 4 and tomcat 5 but always get the same 
exception "major-minor version".
Does it require JDK 1.5? 
I hope not because I would be very interested in this tool!

Thanks
Julian

 Original-Nachricht 
Datum: Tue, 11 Jul 2006 13:21:59 +0200
Von: Leon Rosenberg <[EMAIL PROTECTED]>
An: Struts Users Mailing List 
Betreff: Re: Performance Tests on Action Level

> http://moskito.anotheria.net is probably what you want.
> 
> try
> http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers
> 
> The project is (yet) rather bad documented (working on it) so ask me
> directly if you have any questions :-)
> 
> regards
> Leon
> 
> On 7/11/06, Julian Tillmann <[EMAIL PROTECTED]> wrote:
> > Hi everybody,
> >
> > we need a performance test on the actions level in our rather big Struts
> Application which contains many database queries. for example to find out
> which Action takes the longest or which actions might cause a high CPU
> usage ..
> > Is there a tool how to implement it? Or is it possible via filter?
> > The problem is that there's a constant, high CPU usage on our Tomcat and
> we'd like to find out why.
> > I'm sure that it's because of the struts-application.
> >
> > thanks very much
> > Julian
> >
> >
> >
> > --
> >
> >
> > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
> > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> >
> > -
> > 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]

-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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



Re: Performance Tests on Action Level

2006-07-11 Thread Leon Rosenberg

http://moskito.anotheria.net is probably what you want.

try
http://moskito.anotheria.net/moskitodemo/mui/mskShowAllProducers

The project is (yet) rather bad documented (working on it) so ask me
directly if you have any questions :-)

regards
Leon

On 7/11/06, Julian Tillmann <[EMAIL PROTECTED]> wrote:

Hi everybody,

we need a performance test on the actions level in our rather big Struts 
Application which contains many database queries. for example to find out which 
Action takes the longest or which actions might cause a high CPU usage ..
Is there a tool how to implement it? Or is it possible via filter?
The problem is that there's a constant, high CPU usage on our Tomcat and we'd 
like to find out why.
I'm sure that it's because of the struts-application.

thanks very much
Julian



--


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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



problems using validation framework in struts

2006-07-11 Thread Anil Kumar Pippalapalli

hi all,
 iam new to struts  and iam tryin out a simple application which validates
 password for minlength and maxlength in nb 4.1.

iam gettin several exceptions saying unable to load validation.xml and 
validation-rules.xml

check below errors,

Using CATALINA_BASE:   C:\Documents and 
Settings\anil\.netbeans\4.1\jakarta-tomcat-5.5.7_base
Using CATALINA_HOME:   C:\Program 
Files\netbeans-4.1\enterprise1\jakarta-tomcat-5.5.7
Using CATALINA_TMPDIR: C:\Documents and 
Settings\anil\.netbeans\4.1\jakarta-tomcat-5.5.7_base\temp
Using JAVA_HOME:   C:\Program Files\Java\jdk1.5.0_06
Jul 11, 2006 3:16:09 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8084
Jul 11, 2006 3:16:09 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3535 ms
Jul 11, 2006 3:16:10 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 11, 2006 3:16:10 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.7
Jul 11, 2006 3:16:10 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jul 11, 2006 3:16:17 PM org.apache.catalina.core.ApplicationContext log
INFO: action: []: Verifying ModuleConfig for this module
Jul 11, 2006 3:16:17 PM org.apache.catalina.core.ApplicationContext log
INFO: action: []: Verification of ModuleConfig has been completed
Jul 11, 2006 3:16:17 PM 
org.apache.struts.webapp.example.memory.MemoryDatabasePlugIn init
INFO: Initializing memory database plug in from '/WEB-INF/database.xml'
Jul 11, 2006 3:16:17 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 11, 2006 3:16:17 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jul 11, 2006 3:16:21 PM org.apache.struts.tiles.TilesPlugin 
initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Jul 11, 2006 3:16:21 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 11, 2006 3:16:21 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jul 11, 2006 3:16:25 PM org.apache.struts.tiles.TilesPlugin 
initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Jul 11, 2006 3:16:25 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 11, 2006 3:16:25 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jul 11, 2006 3:16:26 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 11, 2006 3:16:26 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 11, 2006 3:16:27 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jul 11, 2006 3:16:27 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jul 11, 2006 3:16:37 PM org.apache.struts.tiles.TilesPlugin 
initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.
Jul 11, 2006 3:16:37 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validator-rules.xml'
Jul 11, 2006 3:16:37 PM org.apache.struts.validator.ValidatorPlugIn 
initResources
INFO: Loading validation rules file from '/WEB-INF/validation.xml'
Jul 11, 2006 3:16:38 PM org.apache.struts.validator.ValidatorPlugIn init
SEVERE: null
java.lang.NullPointerException
at 
org.apache.commons.validator.ValidatorResources.internalProcessForms(ValidatorResources.java:464)
at 
org.apache.commons.validator.ValidatorResources.process(ValidatorResources.java:415)
at 
org.apache.commons.validator.ValidatorResources.(ValidatorResources.java:162)
at 
org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:237)
at 
org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:162)
at 
org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:869)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:336)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1068)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:900)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3823)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4087)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at 
org.apache.catalina.core.ContainerBase.a

Performance Tests on Action Level

2006-07-11 Thread Julian Tillmann
Hi everybody, 

we need a performance test on the actions level in our rather big Struts 
Application which contains many database queries. for example to find out which 
Action takes the longest or which actions might cause a high CPU usage .. 
Is there a tool how to implement it? Or is it possible via filter? 
The problem is that there's a constant, high CPU usage on our Tomcat and we'd 
like to find out why. 
I’m sure that it’s because of the struts-application.

thanks very much 
Julian

 

-- 


Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

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



RE: JDK1.4.2 Version

2006-07-11 Thread Ramkumar.Sakthivel
Hi,
I don't think 1.4.2 has got a naming. It started from 1.5 (Tiger) and
SE6 "Mustang", 7 "Dolphin"


Thanks and Regards,
S.Ramkumar
Associate Consultant - Investment Banking
PrimeSourcing(tm)   "Add Value Reduce Risk"
i-flex solutions limited, Bangalore
Ph:+ 91-80- 22086000/57596000- extn 6873
E-Mail:[EMAIL PROTECTED]

-Original Message-
From: Vasumathi [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 11, 2006 1:56 PM
To: user@struts.apache.org
Subject: JDK1.4.2 Version

Hi All
   Can anyone tell me the name of 
JDK1.4.2 like Java SE6 name is "Mustang".

With Regards
Vasumathi.



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





DISCLAIMER:
This message contains privileged and confidential information and is intended 
only for the individual named.If you are not the intended recipient you should 
not disseminate,distribute,store,print, copy or deliver this message.Please 
notify the sender immediately by e-mail if you have received this e-mail by 
mistake and delete this e-mail from your system.E-mail transmission cannot be 
guaranteed to be secure or error-free as information could be 
intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain 
viruses.The sender therefore does not accept liability for any errors or 
omissions in the contents of this message which arise as a result of e-mail 
transmission. If verification is required please request a hard-copy version.

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



JDK1.4.2 Version

2006-07-11 Thread Vasumathi

Hi All
  Can anyone tell me the name of 
JDK1.4.2 like Java SE6 name is "Mustang".


With Regards
Vasumathi.



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



Indexed Bean Copy

2006-07-11 Thread Pillay, Kiren KN
Hi

I've got a domain object which stored an indexed array of objects.

<-- Extract of Domain Object
public class GroupExposures {

private Exposure [] exposures=new Exposure[]{new Exposure(),new
Exposure(),new Exposure()};

  
class Exposure{
float totalSBSABroughtForward;
float otherSBSAFacilitiesPerParagraph;
float SBSAExposureToTheApplicant;
float otherSBGFacilitiesPerParagraph;
float totalSBGExposureToTheApplicant;
float otherSBSAFacilitesWholeGroup;
float otherSBGFacilitiesWholeGroup;
float totalSBGExposureWholeGroup;
float SBGBorrowingsWholeGroup;
float otherBankBorrowings;
float otherLenders;
float totalArrangedBorrowings;
}

public float getOtherLenders(int type) {
return exposures[type].otherLenders;
}
public void setOtherLenders(float otherLenders,int type) {
exposures[type].otherLenders = otherLenders;
}

-->
Form extract:
public float getOtherLendersUtilisation(){return
OtherLendersUtilisation;
}



In my Action class I have to say the following:
 
groupExposures.setOtherLenders(groupExposuresForm.getOtherLendersUtilisa
tion(),LimitTypes.UTILISATION); 
 

--
The way this class is set up, I cannot use BeanUtils.copy() to copy the
values across. The Action class is huge because of this and it was quite
tedious putting in the code. Is there a quicker, easier way to do this? 

Regards
Kiren Pillay



__

Standard Bank Disclaimer and Confidentiality Note

This e-mail, its attachments and any rights attaching hereto are, unless the 
context clearly indicates otherwise, the property of Standard Bank Group Limited
and/or its subsidiaries ("the Group"). It is confidential, private and intended 
for the addressee only. Should you not be the addressee and receive this e-mail 
by
mistake, kindly notify the sender, and delete this e-mail, immediately and do 
not disclose or use same in any manner whatsoever. Views and opinions
expressed in this e-mail are those of the sender unless clearly stated as those 
of the Group. The Group accepts no liability whatsoever for any loss or
damages whatsoever and howsoever incurred, or suffered, resulting, or arising, 
from the use of this email or its attachments. The Group does not warrant the 
integrity
of this e-mail nor that it is free of errors, viruses, interception or 
interference. Licensed divisions of the Standard Bank Group are authorised 
financial services providers
in terms of the Financial Advisory and Intermediary Services Act, No 37 of 2002 
(FAIS).
For information about the Standard Bank Group Limited visit our website 
http://www.standardbank.co.za
___