Re: [S2] Load Testing and number of sessions

2008-03-11 Thread Skip Hollowell

Figured I would follow up, as I hadn't heard anything from others.

OpenSTA (http://www.opensta.org/) falls in to the category of  'Open 
Source Partial LoadRunner clone', and has been serving me well for most 
of the last two days.

Any other recommendations?

Skip Hollowell wrote:

Hey all,

It's getting pretty close to that magical time, production day.

So I am starting to get a little anxious about what kind of limits my
Struts 2 app will run up against.  Is there any good way to determine
what kind of user load I will start maxing out with?  Is there an open
source load test tool for webapps that you all might recommend.
Something that I can use to simulate hundreds of signed in users at the
same time?  I'm just more curious what has worked for you all before I
try a couple of things here.  Right now we are slated to run 2 servers,
each with 1 instance of tomcat, and some basic load balancing down to
divvy up requests to the separate machines.

Skip Hollowell


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=15899865&i=0>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=15899865&i=1>






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



[S2] Load Testing and number of sessions

2008-03-07 Thread Skip Hollowell

Hey all,

It's getting pretty close to that magical time, production day. 

So I am starting to get a little anxious about what kind of limits my 
Struts 2 app will run up against.  Is there any good way to determine 
what kind of user load I will start maxing out with?  Is there an open 
source load test tool for webapps that you all might recommend. 
Something that I can use to simulate hundreds of signed in users at the 
same time?  I'm just more curious what has worked for you all before I 
try a couple of things here.  Right now we are slated to run 2 servers, 
each with 1 instance of tomcat, and some basic load balancing down to 
divvy up requests to the separate machines.


Skip Hollowell


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



[S2] Simple-ish tag question about autocomplete

2008-03-07 Thread Skip Hollowell
In my app, I don't want to have any of the fields be autocomplete, so I 
took the generalized approach of each form calling an onload script that 
sets AUTOCOMPLETE=OFF.  Turns out, this gets my security folk's knickers 
in a twist, and they would like field itself have AUTOCOMPETE set to 
off, so people who turn off Javascript aren't able to bypass this concern.


But I can't figure out how to, using regular struts stags, to add a 
parameter that isn't in the tag definition.  Any ideas?



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



Re: Struts2 CheckBox tag inside an s:iterator

2008-03-04 Thread Skip Hollowell
The problem with this is that checkboxes only exist when they are 
checked.  If the box is not checked, nothing is sent to the form for 
that box.  Thus you are seeing information in your pre-populated data 
for those boxes that were checked when the form was submitted.  It's not 
an easy fix, and one I too am currently struggling with.


Skip Hollowell

Mano Dasanayaka-2 wrote:

Hi All,

I have a jsp where we list down some dynamic checkboxes.
for this we use s:checkbox tag inside a s:iterator ,




   
name="fullMarket" fieldValue="${entry.packageId}"
   
theme="simple" value="${fullMarket}" >










in my action class I have a string[] named fullMarket and all the 
required

getters and setters are provided there. Everything happens successfully,
when we submit the form ,,.i.e fullMarket  array comes with the selected
id's.

but as we try to pre populate this same set of checkboxes , I see all the
checkboxes  selected irrespective of the values I set in action class.

this.fullMarket =  new String[] {"3","4","5"};


Any one got an idea what's wrong with this implementation.,..,


Thanks In Advance

Regards,

Mano



-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=15823377&i=0>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=15823377&i=1>






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



Re: [S2]Issue with wrong dates for datetimepicker and the New Year

2008-01-04 Thread Skip Hollowell

https://issues.apache.org/struts/browse/WW-2377
So, if I read this correctly, it is in the system, and schedule for 
release in the 2.1?  If there is a way to grab a patch for this, I am 
unsure how to do that.  Ideas?

Skip Hollowell wrote:

I have a datetimepicker on my page, from the struts tag lilbrary:

<%@ taglib prefix="s" uri="/struts-tags"%>
...


So today is Jan 3.  If I choose December 31, Monday of this week, the
value I get back in my field is 3/2/2008, and for the 30th, Sunday, I
receive 3/1/2008
Conversely, if I change the Calendar to December, 2007, and choose Jan
1, I receive 11/1/2007 and if I choose Jan 3, I receive 11/3/2007  As
long as we aren't crossing over a Year boundary, the picker works just 
fine.


Is this a known bug (and if so, where should I have looked to find that
out)? Or is this something most folks haven't run into before, or better
yet, am I doing something wrong?

Skip Hollowell


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=14597406&i=0>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=14597406&i=1>






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



Re: [S2]Issue with wrong dates for datetimepicker and the New Year

2008-01-04 Thread Skip Hollowell
I have checked the Issues db for datetimepicker, and don't see this 
specific issue, or one even close to it.  Is this something that I 
should report as a bug?  Is anyone else able to verify that it is indeed 
an issue?


Skip Hollowell wrote:

I have a datetimepicker on my page, from the struts tag lilbrary:

<%@ taglib prefix="s" uri="/struts-tags"%>
...


So today is Jan 3.  If I choose December 31, Monday of this week, the
value I get back in my field is 3/2/2008, and for the 30th, Sunday, I
receive 3/1/2008
Conversely, if I change the Calendar to December, 2007, and choose Jan
1, I receive 11/1/2007 and if I choose Jan 3, I receive 11/3/2007  As
long as we aren't crossing over a Year boundary, the picker works just 
fine.


Is this a known bug (and if so, where should I have looked to find that
out)? Or is this something most folks haven't run into before, or better
yet, am I doing something wrong?

Skip Hollowell


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=14597406&i=0>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=14597406&i=1>






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



[S2]Issue with wrong dates for datetimepicker and the New Year

2008-01-03 Thread Skip Hollowell

I have a datetimepicker on my page, from the struts tag lilbrary:

<%@ taglib prefix="s" uri="/struts-tags"%>
...
   

So today is Jan 3.  If I choose December 31, Monday of this week, the 
value I get back in my field is 3/2/2008, and for the 30th, Sunday, I 
receive 3/1/2008
Conversely, if I change the Calendar to December, 2007, and choose Jan 
1, I receive 11/1/2007 and if I choose Jan 3, I receive 11/3/2007  As 
long as we aren't crossing over a Year boundary, the picker works just fine.


Is this a known bug (and if so, where should I have looked to find that 
out)? Or is this something most folks haven't run into before, or better 
yet, am I doing something wrong?


Skip Hollowell


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



No replies in the struts forum [via Nabble]

2007-12-26 Thread Skip Hollowell
Is it just my imagination, or are there no replies showing up on this 
forum anymore?  Is this just a Nabble issue?



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



[S2] Splitting a Struts 2 Application

2007-12-05 Thread Skip Hollowell
This may be a bit off target, but I was hoping some folks here have some 
suggestions. 

I have been working on a Struts2 app here for the last6-8 months, and it 
is now pretty stable.  So stable in fact that we want to use it as a 
model for more apps with similar functionality.  So my question is, how 
can I split this thing apart, presumably into Core features, and project 
specific features.


I assume I will keep a separate set of JSP's for each app.  But what 
about actions?  I can keep the struts jar files, and the base actions in 
the core project.  And then...what?  Extend those actions as needed for 
features outside of the core set on a project by project basis?  All of 
my file and XML processing for example, can be core.  But each of my 
actions extends the ApplicationSupport.java, which in turn is used to 
load all of my application.properties.  So do I somehow tell it to use a 
properties file from my project dir instead?  How?


You can see my confusion, and my dilemma.  I am just trying to set 
things up now so I am not maintaining multiple copies of code for the 
core features of all of these apps, and most of these core feature are 
very Struts2 related.


Any help, pointers, wikis or articles that you know of would be greatly 
appreciated.


Skip.


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



Re: [S2] Action-specific validate method?

2007-10-16 Thread Skip Hollowell
I struggled with the same thing, and finally had to defer to the 
"Webwork in Action" and it's chapter on the Validation Framework.


"In the case of multiple action aliases, it's a better idea to pull your 
common validations into a method and then call that method from each of 
your execute() equivalent methods."


So instead of overriding validate(), I have several validation() methods 
[action1Validation(), action2Validation)(), etc) and calls those first 
off, as needed.


ironic wrote:
I have a class that services many actions. For each action that needs 
validation I have a corresponding Class-action-validation.xml, which 
takes care of the simple validation. However, I have a case where two 
actions need more complex validation (handled in Struts 1 by validwhen 
and indexedproperty validators), and I've overridden the validate() 
method in an attempt to handle this. The problem now is that I need to 
work out which action caused the validate() method to be called. How 
can I determine this? Alternatively, is there a way to direct an 
action to a validate method that is intended only for that action? For 
example, actionA would cause method validateActionA() to be called. 
Any hints, pointers or help would be greatly appreciated. 




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



[S2] Shopping Cart functionality

2007-10-15 Thread Skip Hollowell
Before I go about building some basic shopping cart features in my S2 
app, I wanted to make sure that I wasn't reinventing the wheel, if 
something of this sort already exists.


I have thousands of old transactions that a user can search for, a list 
comes up (using DisplayTag), 50 per page, and the user can then select a 
few from page 1, a few from page 3, etc etc, and then choose to perform 
a single action on the while set of selected transactions.  There is 
not, as of yet, a requirement to be able to save or edit this set for 
later use.


Thanks for any pointers as usual.

Skip.


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



Re: {S2}doublselect How to create the doubleList

2007-09-25 Thread Skip Hollowell
I think I have it...and I wanted to make sure I got this archived 
somewhere in case I or anyone else was ever looking for an example.


The first list is a list of Course objects, made up of an id, name and 
Foods (a Set of Food objects)

Food has an id and a name field.

List listCourse = new ArrayList();  // make sure you 
have a getter for this


Course c1 = new Course(1, "Appetizer");
Food f1 = new Food("1", "Cheese Stick");
Food f2 = new Food("2", "Nachos");
Set setFood1 = new HashSet();
setFood1.add(f1);
setFood1.add(f2);
c1.setFoods(setFood1);

Course c2 = new Course(2, "Main Course");
Food f1 = new Food("3", "Chicken Sandwich");
Food f2 = new Food("4", "Veggie Wrap");
Set setFood2 = new HashSet();
setFood2.add(f3);
setFood2.add(f4);
c2.setFoods(setFood2);

etc etc ad nauseum


and in the JSP then:







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



{S2}doublselect How to create the doubleList

2007-09-13 Thread Skip Hollowell
2 days is my limit on attempting to implement a feature before I finally 
beg:


I have read the doc, and am able to create a double list with static 
data in the jsp.
list="{'fruit','other'}" doubleName="dishes" doubleList="top == 'fruit' 
? {'apple', 'orange'} : {'monkey', 'chicken'}" />


And I have read the group here and looked at a couple posts from someone 
that references Client and Task in their action, and that was helpful, 
to a point.


But I have done all I know how to do and now, I ask for help (again).  I 
have a list of Call Centers (A-E, let's say) and then for each of those, 
there is a list of possible Cost Centers (A1-A5, B1-B5, etc etc)


Using examples and trial and error, I have this so far

   list="callCenters"
 doubleName="costCenter" 
doubleList="doubleCostCenters" />


I put a plain List as callCenters, and I am able to view that 
dropdown.


Now, from what I have been able to glean, I need to create a list of a 
collection of things for my cost centers, but that is where I break 
down.  What should costCenters be defined as in this case?  I know more 
information is probably needed, but I am at a loss as to what that 
information might be.


Any help would be a Godsend.

Thanks,
Skip.





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



Re: Upgraded to 2.0.9 and Tomcat became very cranky starting my app.

2007-09-05 Thread Skip Hollowell
My bad.  I don't use plexus, don't have the jar, and have removed the 
plugin.  Argh, I hate posting before thinking.







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



Upgraded to 2.0.9 and Tomcat became very cranky starting my app.

2007-09-05 Thread Skip Hollowell
Help.  What else can I send?  I have also listed my complete WEB-INF/lib 
directory below.  I know there are some libs I don't need, but I have 
them all in there for now.  Are some doubling up perhaps? 


INFO: XML validation disabled
05 Sep 2007 10:41:43 INFO 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - 
Parsing configuration file [struts-default.xml]
05 Sep 2007 10:41:43 INFO 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - 
Parsing configuration file [struts-plugin.xml]
05 Sep 2007 10:41:44 INFO 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider - 
Parsing configuration file [struts.xml]
05 Sep 2007 10:41:44 WARN org.apache.struts2.config.Settings - Settings: 
Could not parse struts.locale setting, substituting default VM locale
05 Sep 2007 10:41:44 INFO 
com.opensymphony.xwork2.config.impl.DefaultConfiguration - Overriding 
property struts.i18n.reload - old value: false new value: true
05 Sep 2007 10:41:44 INFO 
com.opensymphony.xwork2.config.impl.DefaultConfiguration - Overriding 
property struts.configuration.xml.reload - old value: false new value: true
05 Sep 2007 10:41:44 ERROR 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/IR-STRUTS2] 
- Exception starting filter struts2

java.lang.NoClassDefFoundError: Lorg/codehaus/plexus/PlexusContainer;
   at java.lang.Class.getDeclaredFields0(Native Method)
   at java.lang.Class.privateGetDeclaredFields(Class.java:2259)
   at java.lang.Class.getDeclaredFields(Class.java:1715)
   at 
com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:102)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:84)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:82)
   at 
com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)

   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
   at java.util.concurrent.FutureTask.run(FutureTask.java:123)
   at 
com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:81)
   at 
com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:121)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.(ContainerImpl.java:329)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:299)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:298)
   at 
com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:155)

   at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
   at java.util.concurrent.FutureTask.run(FutureTask.java:123)
   at 
com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:81)
   at 
com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:121)
   at 
com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.java:562)
   at 
com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:460)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:501)
   at 
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:549)
   at 
com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:499)
   at 
com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
   at 
com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:134)

   at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:49)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$ParameterInjector.inject(ContainerImpl.java:431)
   at 
com.opensymphony.xwork2.inject.ContainerImpl.getParameters(ContainerImpl.java:446)
   at 
com.opensymphony.xwork2.inject.ContainerImpl.access$000(ContainerImpl.java:48)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:288)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:117)
   at 
com.opensymphony.xwork2.inject.ContainerImpl$2.call(ContainerImpl.java:115)
   at 
com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:542)
   at 
com.opensymphony.xwork2.inject.ContainerImpl.injectStatics(ContainerImpl.java:114)
   at 
com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:494)
   at 
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:145)
   at 
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
   at 
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)

   at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
   at 
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:201)
   at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
   at 
org.apache.catalina.core.Application

Re: [S2] 2 Select Boxes, one based on the other

2007-08-17 Thread Skip Hollowell

Rene,

It sounds you are are saying that there IS a way, using this 
  Correct?


Rene Gielen wrote:

Indeed there is no way without Javascript. The s2 tag Skip is searching
for is
http://cwiki.apache.org/confluence/display/WW/doubleselect

Zoran Avtarovski schrieb:
> Any solution has to be javascript based. The question is wether you 
want a
> server side visit or not. And that is dependant on how much data 
variability

> there is in your second select list.
>
> In our case if there are only a limited number of variations we 
download
> them all as part of the initial page and use pure javascript, but if 
there

> lots then we employ a simple ajax call.
>
> Z.
>
>> I apologize profusely for what has got to be a FAQ, but I can't find
>> reference to this at all, either Googling or in my message archives.
>>
>> I have the classic problem of 2 select boxes, and the values of the
>> second select will change based upon the choice in the first box. 
 I am
>> using a simple theme at the present time, and have no immediate 
plans to

>> move to anything AJAX related for this release.
>>
>> I have seen ComboBox and AutoComplete, but these don't seem to come
>> close to what is needed.  IS there a Struts 2 based way to do this, or
>> am I back to JavaScript?
>> 




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



[S2] 2 Select Boxes, one based on the other

2007-08-13 Thread Skip Hollowell
I apologize profusely for what has got to be a FAQ, but I can't find 
reference to this at all, either Googling or in my message archives.


I have the classic problem of 2 select boxes, and the values of the 
second select will change based upon the choice in the first box.  I am 
using a simple theme at the present time, and have no immediate plans to 
move to anything AJAX related for this release.


I have seen ComboBox and AutoComplete, but these don't seem to come 
close to what is needed.  IS there a Struts 2 based way to do this, or 
am I back to JavaScript?


Thanks for any help, and again, I very much apologize for posting what 
must be a very basic question.


Skip Hollowell


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



Re: [S2] Inserting Build Date

2007-07-31 Thread Skip Hollowell
If I want to replace a value in a properties file with a new value, can 
I do this?  It looks like I need to instead have a base file with time 
placeholders for the values that I want to replace with my real genned 
values.  It is very possible that I missed an easier way to accomplish this.


Dinwiddie, George wrote:

What are you using to build your app?  The Ant "replace" task can be
used for such a thing.  See also, "tstamp" for creating the value to
insert.

 George Dinwiddie, iDIA Computing, LLC
 http://iDIAcomputing.com/
 http://blog.gdinwiddie.com/
 
-Original Message-
From: Skip Hollowell [mailto:[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11924428&i=0>]

Sent: Tuesday, July 31, 2007 9:25 AM
To: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11924428&i=1>

Subject: [S2] Inserting Build Date

I am not sure if this is technically an S2 or even Struts specific
question, but is there a programmatic way to insert the build date of my

webapp into a file?  In my case I just have a little mouseover on the
application's logo, and that lets you know what version and hopefully
build time you are running against.  This is more for our QA staff and
developers, so once can tell just how old the app is as we progress
through a rapid dev cycle.

"
 onmouseover="window.status='Version ';"
 onmouseout="window.status='';">

Thanks for any info

Skip Hollowell

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11924428&i=2>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11924428&i=3>






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



Re: [S2] Inserting Build Date

2007-07-31 Thread Skip Hollowell
Thanks George.  I am looking into that now and it appears to be what I 
need.  I just need to work out the little details of what to replace, 
and probably in what file so that I can easily get it ready by my S2 app. 


Dinwiddie, George wrote:

What are you using to build your app?  The Ant "replace" task can be
used for such a thing.  See also, "tstamp" for creating the value to
insert.

 George Dinwiddie, iDIA Computing, LLC
 http://iDIAcomputing.com/
 http://blog.gdinwiddie.com/
 
-Original Message-
From: Skip Hollowell [mailto:[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11924428&i=0>]

Sent: Tuesday, July 31, 2007 9:25 AM
To: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11924428&i=1>

Subject: [S2] Inserting Build Date

I am not sure if this is technically an S2 or even Struts specific
question, but is there a programmatic way to insert the build date of my

webapp into a file?  In my case I just have a little mouseover on the
application's logo, and that lets you know what version and hopefully
build time you are running against.  This is more for our QA staff and
developers, so once can tell just how old the app is as we progress
through a rapid dev cycle.

"
 onmouseover="window.status='Version ';"
 onmouseout="window.status='';">

Thanks for any info

Skip Hollowell

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11924428&i=2>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11924428&i=3>






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



[S2] Inserting Build Date

2007-07-31 Thread Skip Hollowell
I am not sure if this is technically an S2 or even Struts specific 
question, but is there a programmatic way to insert the build date of my 
webapp into a file?  In my case I just have a little mouseover on the 
application's logo, and that lets you know what version and hopefully 
build time you are running against.  This is more for our QA staff and 
developers, so once can tell just how old the app is as we progress 
through a rapid dev cycle.


"
onmouseover="window.status='Version name="application.version" />';"

onmouseout="window.status='';">

Thanks for any info

Skip Hollowell


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



Re: [S2]Paging through a large list of things

2007-06-22 Thread Skip Hollowell

Jeromy Evans - Blue Sky Minds wrote:

Here's some options:
1. store your results in the http session.  This takes no effort but
won't scale very well.
2. Look at the paging implementation provided by displaytag.  The
default behaviour loads all data and pages through it for you.  
http://displaytag.sourceforge.net/11/index.html

3. pass all the results to the client in one request.  Use a javascript
widget to page through the results entirely on the client.  This would
be great if its not too much data to download
4. if you're using an ORM framework like hibernate or toplink, enabling
an object cache or query cache may achieve the effect you desire without
having to write any custom code (WRT hitting the database once and then
not needing to access it again for each page)


Right now I am going the Session route to store the full resultset as 
returned from the db service call. (They do use Hibernate, but I have no 
access to it, so I look at it basically as a service call, and in this 
case, it has been ordained that they will return ALL the results, and 
the front end can deal with it.)  I then specify the starting index of 
the results array I want, it brings back X more to show on the screen.  
It's passable for now, but I have extreme limitations with regards to 
future functionality, (sorting for example).


Passing it all to the client probably isn't the best option, given the 
possible size of the result set.


I have been looking at DisplayTag this week as well, but in regards to 
Struts 2, wouldn't I still have to store this resultset on the server 
side.  Otherwise, how would the Display tags get access to this 
information?  Wouldn't I again run into a scaling issue (which hopefully 
will not happen in this current description of the system use?.   This 
would also get me things like Sorting, exports to CSV or Excel that they 
want, etc.




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



[S2]Paging through a large list of things

2007-06-21 Thread Skip Hollowell
The power that be have dictated that a mega search against the DB will 
be fired off 1 time, and all the results will be returned to my Struts 2 
app for me to deal with.  (Rather than my suggestion of sending a 
request for 1 page worth of information as most people would suggest)


So now my question is ... how?  I have a list of 5000 records.  I want 
to initially show them a 100 of these records, with a nice Prev / Next 
feature. 

1.  Where / how do I safely store this list for this user?  Obviously it 
needs to be saved somewhere so it is not lost once the request is done.  
Is this something that should be dropped into the session?  Or is there 
a Struts way of doing things like this?


2.  As for tracking where in the list the paging is, I would assume I 
could store an iterator number to track what record was last displayed, no?


#1 is the piece I am truly looking for expert insight on, as the total 
list could be 1 records or more.  (Don't ask me, I don't make their 
sandbox, I just play in it.)


Skip Hollowell



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



Re: [S2] Exporting to CSV and Excel

2007-06-19 Thread Skip Hollowell

Hack Alert:

   public String exportCSV() throws Exception {
   // Search based upon the entered criteria  
   // TODO:  pass the previously found List in, instead of 
performing the locate again
   // Use the Criteria, create a list of transactionBeans, and 
return it

   UserBean user = (UserBean) super.getLoginUser();
   this.transList = transService.locate(transaction, user);

   // This is Kludgey for Struts 2.  Rework the proper way when you 
get a chance...

   HttpServletResponse response = ServletActionContext.getResponse();
   if (this.transList != null)
   {
// Now...Let's Export the son of a gun
   if (logger.isDebugEnabled())
   {
   logger.debug("Exporting Tables to Disk... ");
   }
   ServletOutputStream out = response.getOutputStream();
//
---

// Set the output data's mime type
//
---

   response.setContentType("application/text");
   response.setHeader("Content-disposition", 
"filename=\"Transactions.csv\"");

   out.println("Tracking #,Ext Auth #,Debtor Name");
   Iterator iter = transList.iterator();
   while (iter.hasNext())
   {
   TransactionBean trans = (TransactionBean)iter.next();
   out.println(trans.getTrackingNumber() + "," +
   trans.getVendorTrackingNumber() + "," +
   trans.getDebtorName());
   }
   out.flush();
   out.close();
   return null;
   }
   else
   {
   addActionError("No results were returned based upon the 
search criteria supplied.");

   return "locsearch-error";
   }
   }


newton.dave wrote:
--- Musachy Barroso <[EMAIL PROTECTED] 
> 
wrote:

> Or you can write your own result, and generate the
> CSV file there (reusable, clean, bla bla)

I did that, to a very small degree (not to the extent
of JSONResult; I'm lazy) but haven't gotten around to
cleaning it up yet--it's pretty hacky.

Someone should go ahead and write a real version :D

It seemed a bit much for the current question under
discussion, I thought :)

d.




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



Re: [S2] Exporting to CSV and Excel

2007-06-19 Thread Skip Hollowell

Hi Dave:

Quite honesty, I couldn't make the connection, in my head, on how the 
result parameters in my .xml file corresponded to the action and method 
I am working in.


1.  I don't believe I have to use the execute method, correct?  In my 
case, I have an exportCSV() method in my action, and call it via my url 
/Report_exportCSV.do  Is that base assumption ok?

   
   /WEB-INF/jsp/Report.jsp
   
   text/plain
   inputStream
   name="contentDisposition">filename="export.csv"

   4096
   
  2.  Assuming 1 is correct, I was unable to backtrack through the docs 
enough to figure out what pieces I needed to set to initialize things 
correctly.  I wasn't sure of which pieces needed setters or getters, and 
how I would be able to send info to the export.csv file once it was all 
initialized.  Nor how I close the file, nor how I then redirect the 
users to a success page somewhere.


I dug through the Showcase as best I could and didn't really see a 
comparable example of any of this.  It's very probable that you have 
just the pointers I am looking for.


Thanks for any and all help.

Skip Hollowell
newton.dave wrote:
--- Skip Hollowell <[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11194671&i=0>> 
wrote:

> The simple days of just dropping my values onto the
> response stream seem to be very much over.

Yay!

> I attempted to play with the Stream Result but
> crashed and burned in a big way.

How so?

d.



 
 


Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html 


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11194671&i=1>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=11194671&i=2>






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



Re: [S2] Exporting to CSV and Excel

2007-06-19 Thread Skip Hollowell
The simple days of just dropping my values onto the response stream seem 
to be very much over. 


   // Back in the Day... (Struts 1)
   response.setContentType("application/text");
   response.setHeader("Content-disposition", "filename=\"Testing.csv\"");
   out.println("Column1,Column2,Column3,Column4");
   Iterator iter = beanQuery.getListRP().iterator();
   // This returns 5 elements
   while (iter.hasNext())
   {
   iter.next();
   // the following is static garbage until the db connection is worked 
out later

   out.println("Data 1" + "," +
   "Data 2" + "," +
   "Data 3" + "," +
   "Data 4");
   }
   out.flush();

I attempted to play with the Stream Result but crashed and burned in a 
big way.  I was digging in Stream Results, because of the following 
blurbs at the Struts 2 site:


   * Edit the Action so that it implements the ServletResponseAware
 interface.
 o The ServletResponseAware interface expects a
   setServletResponse method. You may wish to include a
   companion getServletResponse method.
   * At runtime, call getServletResponse to obtain a reference to the
 response object.

   Only implement ServletResponseAware as a last resort. A better 
approach to solving a use case
   involving the response may be with a custom Result Type 
.



David Durham-3 wrote:


Both of these tools use Apache POI  as an
underlying Excel format  generator.  I wouldn't use Jasper as an Excel
generator, unless I were already using or intended to use Jasper as a
reporting engine.  Display tag is only applicable, in this case, if
you need tabular data within a JSP along with an option to export in
Excel format.

POI is fairly easy to use, I've found, but it does have some memory
related problems associated with very large excel files.

-Dave

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 

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







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



[S2] Exporting to CSV and Excel

2007-06-18 Thread Skip Hollowell
I see that in the new 2.0.8 (Thanks Ted, Don and team) that the Jasper 
plugin is included.  Does that mean that Jasper is the endorsed 
recommended way to export data to Excel and or CSV?  If so, great.  If 
not, can you offer up what you feel is a preferred mechanism for 
exporting to Excel?


Thanks for any experienced viewpoints you may have.

Skip Hollowell


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



[S2]Field Validators, conditional

2007-06-07 Thread Skip Hollowell
So things are working much much better which means, of course, I have to 
break something.  I am attempting to add some conditional validation to 
one of my forms...


If a flag field is not true, then I need to have several other fields be 
required.


Right now (before Conditional):


   
   
   
   
   
 4
 4
 
   
   
   
   
   
   
   



Works great.  I am looking at short circuits and  expressions, in order 
to get this conditional going, but I am still not there.  Any one have 
any ideas as to the best approach?


Skip Hollowell


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



Re: Regarding "How can we test applications?" in S2 doc online

2007-05-30 Thread Skip Hollowell

Dave and Laurie:

So I am complicating things, as usual, by over thinking them.  Say I 
have an AccountAction.  Then it's as simple as having an AccountUtil 
class (or several classes depending on need) that will contain most of 
the logic that will need to be performed by the Account Action.  The 
Action simply pulls in the data off the form, maintains the Struts2 
Framework and integrity, but passes that data off to my Util class 
methods for process and obtaining results, and then passes that 
information  back to the front via the standard Struts2 means.


I already have my DAO for the actual data layer retrieval via our 
webservices and that has worked out great, as per the CRUD demos and 
Mailreader.


I could learn to like this.

Thanks,

Skip.

Laurie Harper wrote:



Err, no, the idea is for the POJO facade classes to form a completely
decoupled service layer -- i.e. they should know nothing about Struts,
HTTP, etc. The service layer provides a platform-agnostic API for
invoking business functionality, which your actions (or anything else)
can then call.




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



Regarding "How can we test applications?" in S2 doc online

2007-05-29 Thread Skip Hollowell
"First, push as much business and data access logic as possible out of 
the Action class and into a POJO facade that the Action can call. In 
this way, you can test all that outside of the Action."


My question lies in how do you scale this for 10 actions?  20?  50?  Do 
you have 1 facade for all actions (ActionSupport.java) or do you break 
it down more granular (LogonActionSupport, LookupActionSupport, etc)?  
If so, do you recommend then that I keep 1 main support class that each 
of these secondary support classes extends? 


LoginAction extenbs LogonActionSupport
LogonActionSupport extends ActionSupport (or do we skip this second 
layer, and have it extend Preparable?)

ActionSupport extends Preparable, etc

Testing and jUnit test cases look like they may take as long as the dev 
itself, but it's gotta be done.



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



Re: [s2] Validation does not work in Struts 2 basic project

2007-05-29 Thread Skip Hollowell

It looks to me like a typo in your xml or the naming of your xml file:
Pasted as *Java* by *Logon-validaiton.xml

*should be logon-validation.xml



robinbajaj wrote:

Here's my Logon-Validation.xml
http://rafb.net/p/FToVf186.html





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



[S2] Checkbox causes error on form submission.

2007-05-25 Thread Skip Hollowell

I am a wee bit confused on this one.
I have my Account bean, with a boolean field:
   private boolean billerSame = false;
along with a getter and setter, obviosuly.

On my form I have:
   

I submit the form and see this on the console for Tomcat:
SEVERE: ParametersInterceptor - [setParameters]: Unexpected Exception 
catched: Error setting expression '__checkbox_payment.billerSameAsPayor' 
with value '[Ljava.lang.String;@401d45'


I am confused as to where this _checkbox_payment notation came from.

I looked at the generated page, and lo and behold there is this:

id="Payment_retrieveFeeSingle_payment_billerSame" />
value="true"/> class="checkboxLabel">Does the Billing Address match?


I get the first input, but the second hidden one? That is obviously 
where the error is coming from, but why/how?  I do have validate turned 
on, so is that how the extra field is getting generated for checkboxes?  
Help.


OK Dave, feel free to show me which doc page I missed this time.  :) 





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



Re: Struts2 Dynamic Checkboxes

2007-05-24 Thread Skip Hollowell

Dave Newton-4 wrote:


Yep... in its simplest form, it's really pretty
straight-forward. There's all sorts of cool ways to
mess it up later ;)
THAT'S the one part of this that I don't need any help with.  I can mess 
things up with the best of them.


Thanks again Dave for your input.  It's greatly aprpeciated.


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



Re: Struts2 Dynamic Checkboxes

2007-05-24 Thread Skip Hollowell
I have been struggling with the very same problem.  So you say 
pre-populate the map/list.  Would you make that a separate  data 
structure, or part of the object already being passed?  Let's say it's 
separate, just add the Map/List to the action, create setter and 
getters, and make sure and recreate the list when ever a function of the 
action is called that returns to the page where you display the list and 
the choices?


Dave Newton-4 wrote:
--- Torsten Römer <[EMAIL PROTECTED] 
> 
wrote:

> I see there is no point in what I am trying to do.

Oh, I don't know about that.

You could use a map (or list) for the checkbox values
and gather up the result values that way, couldn't
you?

You just need to pre-populate the map (or list) in the
action before hitting the view.





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



Re: [s2] unexpected Tomcat shutdown everyday

2007-05-17 Thread Skip Hollowell
Off the top of my head, this smells a lot like a supporting app is 
unavailable at this time, causing the crash of Struts.  All signs point 
to your Database being down.  Is this the time of day your DB is being 
backed up? 


Skip Hollowell

walidito wrote:

Hi all,
I have a a very strange and critical pb with my struts 2.0.1 
application that makes my tomcat server shutdown everyday between 
5:40pm and 6:30pm approx. I'm sure that this come from my application 
since the pb does not occur when I remove it.

tomcat is a 5.5.20, my jdk is 1.5-009.
...
...
17:49:32,484 DEBUG ManagerBase:655 - Stopping
17:49:32,494 DEBUG ManagerBase:477 - Unloading persisted sessions
17:49:32,494 DEBUG ManagerBase:484 - Saving persisted sessions to 
SESSIONS.ser

17:49:32,494 DEBUG ManagerBase:507 - Unloading 0 sessions
17:49:32,504 DEBUG ManagerBase:551 - Expiring 0 persisted sessions
17:49:32,504 DEBUG ManagerBase:565 - Unloading complete
17:49:34,006  INFO DriverManagerConnectionProvider:147 - cleaning up 
connection pool: jdbc:oracle:thin:@xx::
17:49:34,026  WARN DriverManagerConnectionProvider:155 - problem 
closing pooled connection

java.sql.SQLException: Io exception: Socket closed
at 
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at 
oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)


thanks a lot for your help. 




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



Re: [S2] Setting Global Variable in Struts 2

2007-05-09 Thread Skip Hollowell
Currently, I used a Contants class to store this information.  Am I 
better off keeping
that class, and creating a static block in there that reads these values 
in from the properties

files as such:

 InputStream input = null;
 input = 
getClass().getClassLoader().getResourceAsStream(RESOURCE_FILE);

 if (null != input)
 {
   prop = new Properties();
   prop.load(input);
   public final String AGE_MIN = prop.get("AGE_MIN").toString();
   public final String AGE_MAX = prop.get("AGE_MAX").toString();
 }

Am I on a better track now?
Skip Hollowell wrote:

I know this is probably a dumb question, and even more so it is probably
in some best practices doc that I haven't seen, but here goes anyway.

What is the preferred/recommended method for setting some global
variables for my struts 2 app?  These are things that may change
sometime, so I would update a config file somewhere and then just
restart the app.
for example
AGE_MAX=18
AGE_MIN=65

Obviously I can just use standard properties XML stuff, but I wasn't
sure of the best place to read the file, and if there were already some
built in preferred methods of opening and readying config files.

Thanks for any insight.

Skip Hollowell


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=10396336&i=0>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=10396336&i=1>






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



[S2] Setting Global Variable in Struts 2

2007-05-09 Thread Skip Hollowell
I know this is probably a dumb question, and even more so it is probably 
in some best practices doc that I haven't seen, but here goes anyway.


What is the preferred/recommended method for setting some global 
variables for my struts 2 app?  These are things that may change 
sometime, so I would update a config file somewhere and then just 
restart the app.

for example
AGE_MAX=18
AGE_MIN=65

Obviously I can just use standard properties XML stuff, but I wasn't 
sure of the best place to read the file, and if there were already some 
built in preferred methods of opening and readying config files.


Thanks for any insight.

Skip Hollowell


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



Re: [S2]Loop through two arrays in my JSP

2007-04-27 Thread Skip Hollowell

Martin,

This is helpful for Struts1 and I appreciate you taking some time to dig 
it up and post a reply, but the problem I described was for Struts 2.  
Dave Newton sent a nice post earlier that pointed me to the proper 
section in the doc that explains how to use the status property of the 
s:iterate tag.


Skip Hollowell

Martin Gainty wrote:

Hi Skip

http://husted.com/struts/tips/006.html
from id of the iterate is then used to reference name
(for the specific array value indicated by property)

Does this help?




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



Re: [S2]Loop through two arrays in my JSP

2007-04-26 Thread Skip Hollowell

Dave Newton-4 wrote:
--- Skip Hollowell <[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=10206085&i=0>> 
wrote:

> I will work more in depth now that I know this
> is the functionality I have been searching for.

You should just be able to use the stat.index value in
your tags. Doesn't mean you *can*, just that *I* think
you should!

> My apologies for RTFM questions.

Nah, that's what the FML is for (to a degree ;)

Besides, I'm usually wrong, so don't thank me yet!

d.

Indeed I can:
   
   
 
   value="%{payment.amtToPay[#stat.index]}" theme="simple" />

 
 
   value="%{payment.datePaid[#stat.index]}" theme="simple"/>

 
   
   

Thanks a million.  If I ever have to buy beer for all the people that 
have helped me through this process, I will be be a very happy, albeit 
very broke, man.



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



Re: [S2]Loop through two arrays in my JSP

2007-04-26 Thread Skip Hollowell

Dave,

Thanks for the pointer.  I was there, and quite frankly, I couldn't get 
it.  I will work more in depth now that I know this is the functionality 
I have been searching for.  My apologies for RTFM questions.


Skip

Dave Newton-4 wrote:
--- Skip Hollowell <[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=10205381&i=0>> 
wrote:

> I can't seem to find any looping constructs that
> would get me the index [...]


  


http://struts.apache.org/2.x/docs/iterator.html

d.




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



[S2]Loop through two arrays in my JSP

2007-04-26 Thread Skip Hollowell
I have two Arrays (account.amt and account.date) and while they are both 
the same size, I don't know what that size is until the page gets em.  
If I really needed to I guess I could also put a size field into account.


But what is the best way to loop over them  and grab these values?

I can easily go over one field at a time:
   
 
   

I can't seem to find any looping constructs that would get me the index 
each time through and allow me to do something like:

 //index i=0
 
   theme="simple" />
   theme="simple"/>

 //increment my index i



Am I missing some basic way of doing things, or am I way off base on my 
object definitions.  I tried the alternate way, creating an array of 
payments (instead of a payment with an array of dates and an array of 
amounts), with each payment having a date and an amount, but then I 
couldn't update these objects from the form (see earlier post and some 
suggestions from Mike Menard, which I wasn't able to get functioning)



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



Re: [s2] Difference between actionMessages and actionErrors

2007-04-24 Thread Skip Hollowell

Harring Figueiredo wrote:


Here it goes, without testing. I think that the HTML generated is 
slightly

different so that you
may apply different CSS style sheets to it.




Bingo.  That is exactly the reason for the two.  Direct from my style sheet:

span.actionMessage {
   background-color: LightGreen;
   border: 1px;
   width: 100%;
   font-family: sans-serif;
   padding-left: 10px;
   padding-right: 10px;
   padding-top: 1px;
   padding-bottom: 1px;
   border-color: #000;
   border-width: 1px;
   border-style: solid;
}

span.errorMessage {
   color: Black;
   background-color: Pink;
   border: 1px;
   width: 100%;
   font-weight: normal;
   text-align: left;
   padding-left: 10px;
   padding-right: 10px;
   padding-top: 1px;
   padding-bottom: 1px;
   border-color: #000;
   border-width: 1px;
   border-style: solid;
}



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



[S2] Data entry form for nested beans

2007-04-23 Thread Skip Hollowell

I have the following Bean, which represents an Account I am working on:

public class PaymentBean {
   String acctNumber;
   DebtorBean debtor;  // The person who owes money(s).  MAkes sense to 
use this bean as I used it throughout the app
   PayorBean   payor;   // The person making the payment(s)  Same 
reason as above.

   CreditCardBean cc;  // The card used to make the payment(s).
   SinglePaymentBean[] singlePayment;   // A bunch of singlePayments to 
be made, with a $ amount, a fee,  and a date

}

I have tried several different ways in my AccountAction to populate this 
bean from the data entered on the form.   I can, of course, read 
multiple layers down inside my nested beans and display it in a JSP, but 
how I do I allow for data entry into them? 

Does one create a simple form that has a bunch of simple text fields, 
and the action then uses all of these to populate the pieces of the 
various beans that make up Payment Bean.  Or is there a correct way to 
represent this structure inside of my form so that the data goes 
directly into the appropriate subBean upon form submittal?  I went 
through the person showcase, and thought I was on the right track, but 
based upon that simple example, i was never able to get the data from 
the form to the bean.  Yes, I can get errors to you from the experiment 
if it helps.


I could supply jsp and action code examples, but they are all just 
failed tests at this point. I am so in need of direction on how best to 
design and implement this base concept in Struts 2.  Any, ANY, advice 
and help would be greatly appreciated.


Skip Hollowell


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



Re: [S2]Accessing a Bean within a Bean in my jsp

2007-04-20 Thread Skip Hollowell

Mark Menard wrote:
On 4/19/07 12:48 PM, "Skip Hollowell" <[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=10104748&i=0>> 
wrote:


> I am not sure if this is possible, but can I access a bean within a
> bean, and grab fields from it within my jsp?

Yes, you can, and I do it all the time. Sometimes with multiple levels of
nesting (ie: order -> order line item -> order shipment join -> shipment
line item -> shipment header -> transport orders)
 
> The AccountBean named account has a Customer Bean named customer, and I

> want the first name of that Customer.
>  returns null every 
time.


I assume your action or model has a getAccount() method on it, and 
account

has a getCustomer() method, etc.?


Mark,

Thanks for taking the time.  It turns out when I was refactoring it went 
even deeper than that and I rewrote a portion of the bean incorrectly.  
All is well, and I can display levels of deepness as needed.





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



Re: html:text autocomplete=off possible?

2007-04-19 Thread Skip Hollowell

john lee-15 wrote:

for regular html, input type=text autocomplete=off
   
  but, how to set it in struts html:text ?
   
  i checked the reference of html:text, it does not have autocomplete 
this attribute,
   
  what is the equivalent of that?
   
  tks in advance
   
  john
John, since I wasn't able to find a property for this in the tags, and I 
have no ability yet to modify templates, I took the javascript route.  
Each of my pages runs the following onLoad:


function loader() {
  self.focus();//Bring 
window to foreground if necessary.
  var form = document.forms[0];   // grab the first form 
available.
  form.setAttribute("autocomplete","off");  // Turn off Autocomplete 
for the form, if the browser supports it.
  form.elements[0].focus();   // Send the cursor to 
the first field of the first form

}

Skip Hollowell



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



[S2]Accessing a Bean within a Bean in my jsp

2007-04-19 Thread Skip Hollowell
I am not sure if this is possible, but can I access a bean within a 
bean, and grab fields from it within my jsp? 

The AccountBean named account has a Customer Bean named customer, and I 
want the first name of that Customer.

 returns null every time.

I know that the account is set (see it in the debugger), that it has a 
valid Customer object and I can access a more simple field

 from the page no problem.


Any ideas?


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



Re: [S2]: Which way would you present dynamically generated block of text?

2007-04-18 Thread Skip Hollowell
Definitely ResourceBundle.I'll let the Action build the text based 
on the variables and the text in the bundle, drop it on the ActionStack 
(in a prop called script) and then display it that way. 


Skip Hollowell wrote:

My app is progressing happily (With no small thanks to you all) and I
have reached a point where I need to make a decision on something.

The app will present a customized script to be read, verbatim, to a
customer, based upon amounts paid, owed, dates, outstanding balances,
and what not.  If you were going to do this, which approach would you 
take?


I am thinking I have two ways:

1.  The message resources file that I use for everything else (field
labels, page headers, titles, etc).  This has the extra advantage of
being easy to use for my i18n stuff as well.   I am not sure though how
I would pass multiple variables in to a resource tag, and how I would
ensure that I get an acceptable level of grammar correctness (single
values vs multiple and what not).

2.  I use a separate data file, and have the actions access that file as
a basis for building the script to be generated and then passing that
out on the response for the page to display.  Using a DB instead of a
file is possible, but probably not warranted in this scenario.  As for
i18n,  would need to keep a separate file, and then just read from the
appropriate file based upon the locale.

Are either of these 'more' correct?  Is there a 3rd or 4th option I have?

Suggestions?  Comments?  Help?

Skip Hollowell


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=10058299&i=0>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=10058299&i=1>






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



[S2]: Which way would you present dynamically generated block of text?

2007-04-18 Thread Skip Hollowell
My app is progressing happily (With no small thanks to you all) and I 
have reached a point where I need to make a decision on something.


The app will present a customized script to be read, verbatim, to a 
customer, based upon amounts paid, owed, dates, outstanding balances, 
and what not.  If you were going to do this, which approach would you take?


I am thinking I have two ways:

1.  The message resources file that I use for everything else (field 
labels, page headers, titles, etc).  This has the extra advantage of 
being easy to use for my i18n stuff as well.   I am not sure though how 
I would pass multiple variables in to a resource tag, and how I would 
ensure that I get an acceptable level of grammar correctness (single 
values vs multiple and what not).


2.  I use a separate data file, and have the actions access that file as 
a basis for building the script to be generated and then passing that 
out on the response for the page to display.  Using a DB instead of a 
file is possible, but probably not warranted in this scenario.  As for 
i18n,  would need to keep a separate file, and then just read from the 
appropriate file based upon the locale.


Are either of these 'more' correct?  Is there a 3rd or 4th option I have?

Suggestions?  Comments?  Help?

Skip Hollowell


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



Re: [S2] Adding Calendar function to a form.

2007-04-11 Thread Skip Hollowell


Fogleson, Allen wrote:

Skip,
 
  There is a pretty good tutorial out there to create a component 
using the struts tags - this is what I did for exactly what you are 
doing. Granted it is not as "pretty" as stuff 
here but it does the job and now that I have it written I can 
use it in all the places I need to. Check out 
http://www.vitarara.org/cms/node/86 for the example.
 
Al
 

Al,

I am surprised I didn't remember seeing this on your site, as it is one 
of only a handful of Struts 2 sites I have bookmarked.  Thanks for the 
indepth explanations along with the solid examples.


Skip.


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



Re: [S2] Adding Calendar function to a form.

2007-04-11 Thread Skip Hollowell

Dave Newton-4 wrote:

So far I've found the "xhtml" theme to work for me
almost everything with the occasional dip in to
"simple" land, but my projects have fairly basic input
needs (except for one horribly difficult page :/

d.


I too am starting to see this.  Yes, simple will be the way to go when I 
need to get out of the realm of columnar Label/Data presentations.  We 
actually have the 'luxury' of a presentation team here, so they will 
design the look and feel, and I will get to plug things in so as to fit 
into their vision.  Not too shabby a way to work, sometimes.



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



Re: [S2] Adding Calendar function to a form.

2007-04-11 Thread Skip Hollowell
The more I look at and play with this scenario, the more I am starting 
to thing that using the default XHTML theme is not the way to go.  I 
would be much better served, I think to use the simple theme, giving me 
much more control over layout and additional tags around my form 
fields.  Is that a proper assumption, and a more 'struts2-ish' way of 
approaching things?


Thanks,
Skip

Skip Hollowell wrote:

Trying again, due to bad formatting on Nabble...
I saw cilquirms reply, but I don't think I phrased my problems
correctly.  I understand that the tag libraries are very accomodating,
but I am at a loss as to how to insert this code.  This little calendar
image and the associated href for clickability would need to go
somewhere inside the generated code that the tag outputs.  Is that even
possible?  I want to have the little calendar icon be next to the field
input, so user's can use it instead of typing in a date by hand.

Hopefully that is a bit more clear on my issues.

Any ideas?

---

I tried the s:datetimepicker to work on things, but since I am not using
AJAX, I believe that is a dead end, no?  There'd be no point in bringing
in the ajax theme if I wasn't using AJAX.

So how do I incorporate a standard js calendar routine into a field on
my form?

What I want to add is this calendar clickable icon that brings up a date
picker:




Where I want to add it is next to my input box on my form for the
datePaid field:


I am just missing the concept here on how to plug custom code into the
s: tags.  I am trying very hard not to hack this thing to bits with
tricks and cheats.

Skip Hollowell



-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9938513&i=0>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9938513&i=1>






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



Re: [S2] Adding Calendar function to a form.

2007-04-11 Thread Skip Hollowell

Trying again, due to bad formatting on Nabble...
I saw cilquirms reply, but I don't think I phrased my problems 
correctly.  I understand that the tag libraries are very accomodating, 
but I am at a loss as to how to insert this code.  This little calendar 
image and the associated href for clickability would need to go 
somewhere inside the generated code that the tag outputs.  Is that even 
possible?  I want to have the little calendar icon be next to the field 
input, so user's can use it instead of typing in a date by hand. 


Hopefully that is a bit more clear on my issues.

Any ideas?

---

I tried the s:datetimepicker to work on things, but since I am not using 
AJAX, I believe that is a dead end, no?  There'd be no point in bringing 
in the ajax theme if I wasn't using AJAX.


So how do I incorporate a standard js calendar routine into a field on 
my form?


What I want to add is this calendar clickable icon that brings up a date 
picker:


src="images/cal.gif" width="16" height="16" border="0" alt="Pick a 
date">



Where I want to add it is next to my input box on my form for the 
datePaid field:



I am just missing the concept here on how to plug custom code into the 
s: tags.  I am trying very hard not to hack this thing to bits with 
tricks and cheats.


Skip Hollowell



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



[S2] Adding Calendar function to a form.

2007-04-10 Thread Skip Hollowell
I tried the s:datetimepicker to work on things, but since I am not using 
AJAX, I believe that is a dead end, no?  There'd be no point in bringing 
in the ajax theme if I wasn't using AJAX.


So how do I incorporate a standard js calendar routine into a field on 
my form?


What I want to add:
src="images/cal.gif" width="16" height="16" border="0" alt="Pick a 
date">


Where I want to add it:


I am just missing the concept here on how to plug custom code into the 
s: tags.  I am trying very hard not to hack this thing to bits with 
tricks and cheats.


Skip Hollowell



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



Re: [S2] Validation setup

2007-04-09 Thread Skip Hollowell

minLength and maxLength (case is important and I am an idiot)

Done and done.  Thanks Dave for helping where you could.  Much appreciated.

Skip.

Skip Hollowell wrote:

Now, if I could only figure out why I am getting errors on the minlength
and maxlength of my stringlength validator:
   




  4
  4
  



WARNING: Caught OgnlException while setting property 'minlength' on type
'com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator'. 


ognl.NoSuchPropertyException:
com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator.minlength 







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



Re: [S2] Validation setup

2007-04-09 Thread Skip Hollowell

The file name for the validation file is:
{ActionName}-{AliasName}-validation.xml

In my case:
AccountAction-Payment_retrieveFee-validation.xml

Now, if I could only figure out why I am getting errors on the minlength 
and maxlength of my stringlength validator:

  
   
   
   
   
 4
 4
 
   
   

WARNING: Caught OgnlException while setting property 'minlength' on type 
'com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator'.
ognl.NoSuchPropertyException: 
com.opensymphony.xwork2.validator.validators.StringLengthFieldValidator.minlength


Anyone?

Skip Hollowell wrote:

I had the whole validation thing working great, and then I had to go and
get 'fancy' with my Actions and aliases, and now, I can't seem to get my
validator xml files named correctly...



/WEB-INF/jsp/UC01-EnterPayment.jsp




name="input">/WEB-INF/jsp/UC01-FindAccount.jsp

/WEB-INF/jsp/UC01a-RetrieveFee.jsp
/WEB-INF/jsp/UC01-FindAccount.jsp
name="search">/WEB-INF/jsp/UC01-FindAccount.jsp

Account_input
Account_input

 
name="input">/WEB-INF/jsp/UC01a-RetrieveFee.jsp
name="list">/WEB-INF/jsp/UC01a-RetrieveFee.jsp

/WEB-INF/jsp/UC01b-EnterPayment.jsp
/WEB-INF/jsp/UC01b-EnterPayment.jsp
/WEB-INF/jsp/UC01a-RetrieveFee.jsp
/WEB-INF/jsp/UC01b-EnterPayment.jsp
Menu
/WEB-INF/jsp/UC01a-RetrieveFee.jsp


According to the doc:

Validation rules can be specified:

   1. Per Action class: in a file named ActionName-validation.xml
   2. Per Action alias: in a file named ActionName-alias-validation.xml
   3. Inheritance hierarchy and interfaces implemented by Action class:
  WebWork searches up the inheritance tree of the action to find
  default validations for parent classes of the Action and
  interfaces implemented


So I have a form that will be submitting a payment, and I want to
validate a couple fields on the form...


What do I name my validation xml file in com.skip.action?
AccountAction-valdiation.xml is too broad
AccountAction_payment-validation.xml doesn't work
AccountAction_Payment-validation.xml doesn't work
Payment-validation.xml doesn't work


I'll keep digging through Wikis, Examples and Doc, but I haven't found
it yet.
Thanks for any help

Skip


-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9857547&i=0>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9857547&i=1>






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



Re: [S2] Validation setup

2007-04-05 Thread Skip Hollowell

OK, I think I may be on to something here...

In this particular Action, I am working with a Payment class, instead of 
individual fields.  that may very well be where all of my trouble is.









align="center"/>



So say I want to validate the ccNumber and ccExpDate.  These are part of 
my Payment, so how do I go about validating them?  Let's assume for now 
that the AccountAction class has a method called doRetrieveFee() and my 
validation file should in fact be called 
AccountAction-doRetrieveFee-validation.xml


My AcccountAction works with the complete payment as such:
   /**
* @param payment
*The payment to set.
*/
   public void setPayment(PaymentBean payment) {
   this.payment = payment;
   }

   /**
* @return Returns the payment.
*/
   public PaymentBean getPayment() {
   return payment;
   }

So in my validator I have tried a couple variations on a theme.  Does 
anyone see what I need to change or modify to get some validation happening?


http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd";>


   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
 4
 4
 
   
   





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



Re: [S2] Validation setup

2007-04-05 Thread Skip Hollowell

Dave Newton-4 wrote:
--- Skip Hollowell <[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9858550&i=0>> 
wrote:

> Dave Newton-4 wrote:
>> Skip Hollowell said:
>>> AccountAction_payment-validation.xml doesn't work
>>> AccountAction_Payment-validation.xml doesn't work
>> Are the underscores typos?
> No typos.
> So how can I turn on the validation for this form /
> action / method?

No luck.  It's confusing, I can get the plan 
AccountAction-validation.xml to trigger, but nothing else.  I too am a 
bit foggy on the alias concept.  I really don't want to have to pull my 
AccountAction apart into separate actions, but that may be what needs to 
be done.  (AccountRetrieveAction, AccountPaymentAction, 
AccountSearchAction, etc etc)

Try:

AccountAction-doRetrieveFee-validation.xml

(I've never been sure about that whole "alias"
terminology, quite frankly. Maybe it's XWork-ish?)

d.




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



Re: [S2] Validation setup

2007-04-05 Thread Skip Hollowell

Dave Newton-4 wrote:
--- Skip Hollowell <[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9857845&i=0>> 
wrote:



> AccountAction_payment-validation.xml doesn't work
> AccountAction_Payment-validation.xml doesn't work

Are the underscores typos?

No typos.  I am grasping at straws since I don't seem to have a handle 
on an alias vs an action name.  I could certainly go the other way, with 
Action-method-validation.xml, if it would work for me, which up until 
now it has not.  Payment is just another name for the AccountAction, the 
alias if you will.


I have a doRetrieveFee method in my AccountAction class.  The form in 
question will be calling that method.  So how can I turn on the 
validation for this form / action / method?

> Payment-validation.xml doesn't work

Is that in the package containing the Payment class?

(Haven't played with validation like that much; I
prefer action[-method] validation almost all the
time.)

d.



 
 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.

http://tools.search.yahoo.com/toolbar/features/mail/

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9857845&i=1>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9857845&i=2>






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



[S2] Validation setup

2007-04-05 Thread Skip Hollowell
I had the whole validation thing working great, and then I had to go and 
get 'fancy' with my Actions and aliases, and now, I can't seem to get my 
validator xml files named correctly...


   
   method="list">
   name="success">/WEB-INF/jsp/UC01-EnterPayment.jsp

   
   
   
   class="com.skip.action.AccountAction" method="{1}">

   /WEB-INF/jsp/UC01-FindAccount.jsp
   name="success-acctfound">/WEB-INF/jsp/UC01a-RetrieveFee.jsp
   name="error-acctnotfound">/WEB-INF/jsp/UC01-FindAccount.jsp

   /WEB-INF/jsp/UC01-FindAccount.jsp
   type="redirect-action">Account_input
   type="redirect-action">Account_input

   
method="{1}">

   /WEB-INF/jsp/UC01a-RetrieveFee.jsp
   /WEB-INF/jsp/UC01a-RetrieveFee.jsp
   name="success-feefound">/WEB-INF/jsp/UC01b-EnterPayment.jsp
   name="success-paymentmade">/WEB-INF/jsp/UC01b-EnterPayment.jsp
   name="error-feenotfound">/WEB-INF/jsp/UC01a-RetrieveFee.jsp
   name="error-paymentnotmade">/WEB-INF/jsp/UC01b-EnterPayment.jsp

   Menu
   name="success">/WEB-INF/jsp/UC01a-RetrieveFee.jsp

   

According to the doc:

Validation rules can be specified:

  1. Per Action class: in a file named ActionName-validation.xml
  2. Per Action alias: in a file named ActionName-alias-validation.xml
  3. Inheritance hierarchy and interfaces implemented by Action class:
 WebWork searches up the inheritance tree of the action to find
 default validations for parent classes of the Action and
 interfaces implemented


So I have a form that will be submitting a payment, and I want to 
validate a couple fields on the form...
name="Payment_retrieveFee" onsubmit="return 
validateForm_Payment_retrieveFee();" 
action="/WEB/blah/Payment_retrieveFee.do" method="POST">


What do I name my validation xml file in com.skip.action?
AccountAction-valdiation.xml is too broad
AccountAction_payment-validation.xml doesn't work
AccountAction_Payment-validation.xml doesn't work
Payment-validation.xml doesn't work


I'll keep digging through Wikis, Examples and Doc, but I haven't found 
it yet.

Thanks for any help

Skip


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



Re: Setting up actions

2007-03-13 Thread Skip Hollowell

Dave Newton-4 wrote:
--- Skip Hollowell <[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9458130&i=0>> 
wrote:

> 1 action per functional part of the app, or 1 action

> per data type, with many results corresponding to
> each method that I call inside that partuclar
action?

I think this is mostly a matter of preference, isn't
it? I find it more concise (overall) to use an Action
per datatype (when appropriate).

The Actions are still short because much of the work
is done via injected services.

> 

class="com.its.irmc.interceptor.AuthenticationInterceptor"/>

   
   

   
   
   
   
   
   
   
   


d.



 
 

It's here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.

http://tools.search.yahoo.com/toolbar/features/mail/

-
To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9458130&i=1>
For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9458130&i=2>






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



[S2] Setting up actions

2007-03-13 Thread Skip Hollowell
I have spent a few weeks getting my hands dirty with Struts 2 now, and I 
have come to a crossroads of sorts, in my app design and layout of my 
actions. 


A good example of where I am looking for direction is the following:

A user logs in and wants to add a transaction for an account.  I have an 
AccountAction that is setup to work with, ultimately, my AccountBean.  
But here is where I need to know the right way to do things in Struts2 
land.  When I want to search for a particular account, I of course use 
the AccountAction, sending in an account.acctNumber via my _input.  So 
far so good no?  If the account is not found, great, I just send them 
back to the same page, with a nift actionError telling them what went 
wrong. 

But if the Account is indeed found, then what?  I know I need to get the 
Account object onto the stack for displaying.   But where should I send 
the app next?  Do I have an _enterPayment method in my AccountAction?  
And then reference that in the same way as I did _input, as a new result 
in my ActionCrud_* in my .xml file?  Or is it more recommended to create 
a new action in the .xml file with a new result just for this particular 
scenario?  1 action per functional part of the app, or 1 action per data 
type, with many results corresponding to each method that I call inside 
that partuclar action?


The more I think of it, the more questions I have. 



   class="com.its.irmc.action.AccountAction" method="{1}">
   
   name="success-acctfound">/WEB-INF/jsp/UC01a-EnterPayment.jsp


  
   type="redirect-action">AccountCrud_search


   

From my search page:
 
   label="%{getText('acctNumber')}" size="40"/>

   
   
 


From my result page after the search:
Account Number: []
Name:  value="account.lastName"/>

Address: 
Address: 
Debtor Phone: 




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



Re: Error Starting on Tomcat

2007-03-09 Thread Skip Hollowell
After several Eclipse restarts with -clean and a hundred other options, 
I finally gave it the ole reboot and test.  I don't think I will ever 
truly understand what goes on inside that metal box on my desk, but at 
least everything is functioning again.


Thanks for your help.

Skip.

Alex Wibowo wrote:

I would try to recompile the entire app. NoClassDefFoundError generally
relates to different JAR files that is shipped .. vs  the one that was 
used

to compile the app.

On 3/9/07, Skip Hollowell <[EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9386591&i=0>> 
wrote:

>
> This morning, I was playing with my setup in eclipse, and I moved some
> of my libraries around, and then I decided to move them back to where
> they originally were.  I can no longer start my tomcat instance, as I
> get the following error:
>
> Mar 8, 2007 3:15:17 PM 
org.apache.catalina.core.StandardContextfilterStart

> SEVERE: Exception starting filter struts2
> java.lang.NoClassDefFoundError:
> com/opensymphony/xwork2/config/ConfigurationProvider
> at
> org.apache.struts2.dispatcher.FilterDispatcher.createDispatcher(
> FilterDispatcher.java:239)
> at
> 
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java

> :200)
> at
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(
> ApplicationFilterConfig.java:225)
> at
> org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(
> ApplicationFilterConfig.java:308)
> at
> org.apache.catalina.core.ApplicationFilterConfig.(
> ApplicationFilterConfig.java:79)
> at
> 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java

> :3563)
> at
> 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4133)

> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1012)
> at 
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)

> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java
> :1012)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
> at
> 
org.apache.catalina.core.StandardService.start(StandardService.java:450)

> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:680)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java

> :39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> Mar 8, 2007 3:15:17 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error filterStart
>
> My web.xml, where the filter is defined, has not changed.  The jar 
files

> are in their 'proper' place WEB-INF/lib now, and eclipse sees them, and
> there are no compile errors.  What else might I be missing in this
> setup?   Very frustrating as things were progressing nicely up until
> this point.
>
> Thanks for any help,
>
> Skip Hollowell
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9386591&i=1>
> For additional commands, e-mail: [EMAIL PROTECTED] 
<http://www.nabble.com/user/SendEmail.jtp?type=post&post=9386591&i=2>

>
>


--
Best regards,


Alex Wibowo
---




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



[S2]: Error Starting on Tomcat

2007-03-08 Thread Skip Hollowell
This morning, I was playing with my setup in eclipse, and I moved some 
of my libraries around, and then I decided to move them back to where 
they originally were.  I can no longer start my tomcat instance, as I 
get the following error:


Mar 8, 2007 3:15:17 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
java.lang.NoClassDefFoundError: 
com/opensymphony/xwork2/config/ConfigurationProvider
   at 
org.apache.struts2.dispatcher.FilterDispatcher.createDispatcher(FilterDispatcher.java:239)
   at 
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:200)
   at 
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:225)
   at 
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
   at 
org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:79)
   at 
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3563)
   at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4133)

   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
   at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
   at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
   at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:680)

   at org.apache.catalina.startup.Catalina.start(Catalina.java:536)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Mar 8, 2007 3:15:17 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart

My web.xml, where the filter is defined, has not changed.  The jar files 
are in their 'proper' place WEB-INF/lib now, and eclipse sees them, and 
there are no compile errors.  What else might I be missing in this 
setup?   Very frustrating as things were progressing nicely up until 
this point.


Thanks for any help,

Skip Hollowell


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



Re: Problem with struts validator

2004-04-07 Thread Skip Hollowell
"Saul Q Yuan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> One thing I noticed is you're missing the argument for the required
> message, ie.
>  in your validation.xml file.
>
>

And as per my earlier post with this same problem, do you have the
 tag in your jsp to actually show the errors.  That was what I
was missing when I thought I had everything setup properly.






  



Skip Hollowell




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



Need advice on design decisions and architecture issues.

2004-04-07 Thread Skip Hollowell
I am not sure if this is an acceptable forum for a question like this but I
need some advice on how to proceed with a design for an application.  Some
of you (Andy, Niall) have helped on a few things already regarding the
DynaValidator stuff.  Let me describe the app first, and some of the things
that we are definitely doing, and then maybe you can help me fill in the
blanks.

This app will require a user to log in, and based upon who they are, they
will have certain priveleges in the system.  Some of these priveleges may be
modified by a manager at anytime (user has processed their dollar limit for
the day, but needs a higher limit for whatever reason).

The interface will be Tab based, and tabs will be enabled/disabled on
per-user basis. Each tab will represent a page with a form (or several
forms) of data that display things from the database and allow the user to
update data in the database.  I also believe that since this is a
customer-care application, that not more than 1 user will be working with
any given set of customer data at any 1 time.

Things I know so far.  We are using Struts 1.1 as the basic framework for
the system.  We are using Tiles for piecing together the parts of the
interface (tabBar, header, body, footer for each page).  It has also been
suggested that we use SAIF (Interceptor Framework) to be able to process
before every action whether the user is logged in, and what they are allowed
to do.  We could then also do some after-action processing as needed.

Now the questions:

1. With my tabs, I have what turns out to be at least 30 actions, and will
probable be closer to 60 when it is all said and done.  So I have created
them all in the struts-config.xml as show below.  But then I am going to
need form beans for each one, and a DynaValidatorActionForm for each, won't
I?  The granularity of this is nice, and I like the concept of keeping
everything separated out, but is this overkill?  Is there a better way to do
this kind of work?  As you can see, some of this is related functionality,
but just for different types of data.  Is there some way to use just 1
Action for all these forms on my app?  (I would doubt it, but I want to see
what you have to say)

2. Is SAIF the best (probably not) way to go for handling users and roles.
How do you handle what a user is allowed to do and see in a struts based
application?  What do I do if a user tries to hand code an URL and go to a
part of the system he is not authorized for?  Right now I am looking at the
SAIF saying "not authorized" (which I already have) and then ... what?
Redirecting them to the login page I would assume (if they are not logged
in) or to the main (start) page if they are logged in.

Those are my two biggest dilemmas right now, handling the user-roles issue
and how to handle so many different forms and actions in the app.  I am sure
there are others, but they escape me know that I am actually writing this
all down.

Ideas?  Comments?  Pointers?  All are greatly appreciated.

Skip Hollowell


struts-config.xml [edited]
--

  
  
  
  
  
  



 













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



Re: Problem with DynaValidatorForm

2004-04-06 Thread Skip Hollowell
Not specifically.  A lot of the examples I found over the past few days deal
with Validator in realtion to Actions and Forms, but not DynaValidator
stuff.  'Strutting with Struts' had some great information, but didn't
explain it's examples completely, and even had inaccuracies, especially with
regards to the input on the action mapping (it didn't list an input, even
when it changed the validate to True).  You immediately find out it is
required, but examples should at least show correct strutcture.

Thanks Adam.

Skip Hollowell


"Adam Hardy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Good point. I'll put some up there when I get a moment later.
>
> What do you mean about 'path relate to bean'? Are you talking
> ValidatorActionForm?
>
> On 04/06/2004 03:03 PM Skip Hollowell wrote:
> > Adam,
> >
> > I like seeing all the steps listed in there, but some examples are what
the
> > new user like myself needs.  Specificially, what is the path and the
input.
> > Can they be a mapping, or do they have to be a physical file.  What if I
am
> > using tiles, can the path or input  be a Tile definition?  How does the
path
> > relate to the bean or vice versa.  These are the things I had to
practice
> > with through trial and error, and usenet, of course.
> >
> > And thanks for all your help.
> >
> > Skip Hollowell




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



Re: Problem with DynaValidatorForm

2004-04-06 Thread Skip Hollowell
Adam,

I like seeing all the steps listed in there, but some examples are what the
new user like myself needs.  Specificially, what is the path and the input.
Can they be a mapping, or do they have to be a physical file.  What if I am
using tiles, can the path or input  be a Tile definition?  How does the path
relate to the bean or vice versa.  These are the things I had to practice
with through trial and error, and usenet, of course.

And thanks for all your help.

Skip Hollowell
"Adam Hardy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Done the same sort of time-wasting myself just recently with the
> validator. My mistake was to forget to upgrade the validator-rules.xml.
>
> I thought I would try to help with the docs by writing out the setup
> steps on the wiki. Perhaps if you could look over it and see if there's
> anything I missed:
>
> http://nagoya.apache.org/wiki/apachewiki.cgi?ValidatorSetup
>
> Sorry it came just a bit too late to help you.
>




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



Re: Problem with DynaValidatorForm

2004-04-05 Thread Skip Hollowell
Son of a gun.  As my gramma would used to say, "Ain't that a pip?"

I guess I just have to ask myself  how I missed that part in the tags and
validator documentation.

Thanks a million, Adam and Niall.  3 days down the drain, but you probably
saved me at least 3 more.

Skip Hollowell

"Niall Pemberton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> The validation is done before it calls the action's execute method - so if
> you get validation errors you won't see the debug output you put into your
> action - it forwards to what you defined in the "input" parameter before
> that.
>
> Sounds to me like your validation is working - as Adam said - put an
>  tag on your form and you should see the errors.
>
> Niall
>
> - Original Message - 
> From: "Skip Hollowell" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, April 05, 2004 6:53 PM
> Subject: Re: Problem with DynaValidatorForm
>
>
> > /PrepaidAccountInfo.do is the same form as prepaid.do, just a different
> path
> > name.  I couldn't get them to use the same path name.  The forward is
> > working, and it 'reloads' the form, but I get no validation issues.
> >
> > The funny thing is I don't think the PrepaidDynaAction is being called
> > either.  None of my debug messages for this show up in the log file.  So
I
> > guess I don't understand what is really being called.  Probably the
> default
> > dynaValidationAction instead, as defined in the bean for struts config?
> >
> > Just when I thought I had a handle on this  I have lost it again.  I was
> > going like gangbusters with regular forms and actions and then decided
to
> > 'simplify' based on the number of forms in the syste, (30 at last
count).
> >
> > Skip Hollowell
> >
> > "Niall Pemberton" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> > > With your configuration validator will forward to
/PrepaidAccountInfo.do
> > if
> > > validation errors are found - because thats what you set up as the
> "input"
> > > in your "/prepaid" action mapping - is that not happening?
> > >
> > > Niall
> > >
> > > - Original Message - 
> > > From: "Skip Hollowell" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Monday, April 05, 2004 6:14 PM
> > > Subject: Problem with DynaValidatorForm
> > >
> > >
> > > > OK, I have a lot of things going on in my app, and something
> > > > is cancelling out my Validation, and I don't know what.I load
> > > > the PrepaidAccoundInfo.do action, and the Tiles based
> > > > page loads properly.  I am able to submit the form on this
> > > > page, and it loads the prepaid.do action just fine, and r
> > > > emembers the bean info and redisplays it properly, but the
> > > > data is not validated.  I can omit any of the required fields,
> > > > and the AccountNum can be entered as anything, not just an int.
> > > >
> > > > I have tryed renaming some of my paths, but they all appear to
> > > > be correct.  Is the SAIF Intereceptor causing the problem?
> > > > My next test will be to remove it, but I was wondering if anyone
> > > > had incorporated all of these things together before.
> > > >
> > > > - DynaValidatorForm (I need to validate my user entered data, and
> > > > I am using lots of forms throughout the system)
> > > > - SAIF (I Want to be able to perform some common logic on all the
> > > > actions, for user authentication and authroization type
functionality
> > > > mainly.  Tabs and actions will be available based upon what rights
> > > >  the user has)
> > > > -  Tiles for easy page creation (tabBar, header, body, footer)
> > > >
> > > > Thoughts?  Help? Possible alternatatives?  All would be greatly
> > > > appreciated.
> > > >
> > > > Skip Hollowell
> > > >
> > > >
> > > > struts-config.xml:
> > > > =
> > > >  
> > > >> > type="skipdaddy.struts.form.RegisterForm">
> > > >   
> > > >> > > type="org.apache.struts.validator.DynaValidatorForm">
> > > &

Re: Problem with DynaValidatorForm

2004-04-05 Thread Skip Hollowell
I do not currently have any error tags in my JSP.  I was hoping to actually
see the validation work in the server logs first, then work on spitting out
messages as appropriate to the user.

Skip Hollowell

"Adam Hardy" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Did you forget the errors tag?
>
> Adam
>
> On 04/05/2004 07:44 PM Niall Pemberton wrote:
> > With your configuration validator will forward to /PrepaidAccountInfo.do
if
> > validation errors are found - because thats what you set up as the
"input"
> > in your "/prepaid" action mapping - is that not happening?
> >
> > Niall
> >
> > - Original Message - 
> > From: "Skip Hollowell" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, April 05, 2004 6:14 PM
> > Subject: Problem with DynaValidatorForm
> >




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



Re: Problem with DynaValidatorForm

2004-04-05 Thread Skip Hollowell
/PrepaidAccountInfo.do is the same form as prepaid.do, just a different path
name.  I couldn't get them to use the same path name.  The forward is
working, and it 'reloads' the form, but I get no validation issues.

The funny thing is I don't think the PrepaidDynaAction is being called
either.  None of my debug messages for this show up in the log file.  So I
guess I don't understand what is really being called.  Probably the default
dynaValidationAction instead, as defined in the bean for struts config?

Just when I thought I had a handle on this  I have lost it again.  I was
going like gangbusters with regular forms and actions and then decided to
'simplify' based on the number of forms in the syste, (30 at last count).

Skip Hollowell

"Niall Pemberton" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> With your configuration validator will forward to /PrepaidAccountInfo.do
if
> validation errors are found - because thats what you set up as the "input"
> in your "/prepaid" action mapping - is that not happening?
>
> Niall
>
> - Original Message - 
> From: "Skip Hollowell" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, April 05, 2004 6:14 PM
> Subject: Problem with DynaValidatorForm
>
>
> > OK, I have a lot of things going on in my app, and something
> > is cancelling out my Validation, and I don't know what.I load
> > the PrepaidAccoundInfo.do action, and the Tiles based
> > page loads properly.  I am able to submit the form on this
> > page, and it loads the prepaid.do action just fine, and r
> > emembers the bean info and redisplays it properly, but the
> > data is not validated.  I can omit any of the required fields,
> > and the AccountNum can be entered as anything, not just an int.
> >
> > I have tryed renaming some of my paths, but they all appear to
> > be correct.  Is the SAIF Intereceptor causing the problem?
> > My next test will be to remove it, but I was wondering if anyone
> > had incorporated all of these things together before.
> >
> > - DynaValidatorForm (I need to validate my user entered data, and
> > I am using lots of forms throughout the system)
> > - SAIF (I Want to be able to perform some common logic on all the
> > actions, for user authentication and authroization type functionality
> > mainly.  Tabs and actions will be available based upon what rights
> >  the user has)
> > -  Tiles for easy page creation (tabBar, header, body, footer)
> >
> > Thoughts?  Help? Possible alternatatives?  All would be greatly
> > appreciated.
> >
> > Skip Hollowell
> >
> >
> > struts-config.xml:
> > =
> >  
> >type="skipdaddy.struts.form.RegisterForm">
> >   
> >> type="org.apache.struts.validator.DynaValidatorForm">
> > 
> > 
> > 
> >   
> >  
> >
> >  
> >
> >  
> >
> >  
> >>type="skipdaddy.struts.action.PrepaidDynaAction"
> >name="prepaidDynaValidatorForm"
> >input="/PrepaidAccountInfo.do"
> >scope="session"
> >validate="true" >
> >
> >
> >   
> >
> >>path="/PrepaidAccountInfo"
> >type="org.apache.struts.actions.ForwardAction"
> >parameter=".prepaid.accountInfoLayout" />
> >
> >  
> >
> >  
> >> value="/WEB-INF/tiles-defs.xml" />
> >   
> >   
> >  
> >  
> >
> >  
> >   
> >   
> >  
> >
> >
> >   > value="/WEB-INF/interceptor-config.xml" />
> >
> >
> >
> > validation.xml:
> > ==
> >   
> >  
> >  > depends="required">
> >   
> > 
> >  > depends="required,integer">
> >   
> > 
> >  > depends="required,integer">
> >   
> > 
> > 
> >   
> >
> >
> > header.jsp (part of my tile)
> > =
> >   
> > 
> >   
> >   
> > VRUCode 
> >  > maxlength="10"/>
> >  
> >   
> >
> > PrepaidDyna

Problem with DynaValidatorForm

2004-04-05 Thread Skip Hollowell
OK, I have a lot of things going on in my app, and something
is cancelling out my Validation, and I don't know what.I load
the PrepaidAccoundInfo.do action, and the Tiles based
page loads properly.  I am able to submit the form on this
page, and it loads the prepaid.do action just fine, and r
emembers the bean info and redisplays it properly, but the
data is not validated.  I can omit any of the required fields,
and the AccountNum can be entered as anything, not just an int.

I have tryed renaming some of my paths, but they all appear to
be correct.  Is the SAIF Intereceptor causing the problem?
My next test will be to remove it, but I was wondering if anyone
had incorporated all of these things together before.

- DynaValidatorForm (I need to validate my user entered data, and
I am using lots of forms throughout the system)
- SAIF (I Want to be able to perform some common logic on all the
actions, for user authentication and authroization type functionality
mainly.  Tabs and actions will be available based upon what rights
 the user has)
-  Tiles for easy page creation (tabBar, header, body, footer)

Thoughts?  Help? Possible alternatatives?  All would be greatly
appreciated.

Skip Hollowell


struts-config.xml:
=
 
  
  
  



  
 

 
   
 

 
  
   
   
  

  

 

 
  
  
  
 
 

 
  
  
 

   
 
   


validation.xml:
==
  
 

  


  


  


  


header.jsp (part of my tile)
=
  

  
  
VRUCode 

 
  

PrepaidDynaAction.java:

/Created by MyEclipse Struts
// XSL source (default):
platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_2.6.200/xslt/
JavaClass.xsl

package skipdaddy.struts.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.tiles.actions.TilesAction;
import org.apache.struts.validator.DynaValidatorForm;

/**
 * MyEclipse Struts
 * Creation date: 01-13-2004
 *
 */
public class PrepaidDynaAction extends TilesAction
{

  // - Instance
Variables

  // - Methods

  /**
   * Method execute
   * @param ActionMapping mapping
   * @param ActionForm form
   * @param HttpServletRequest request
   * @param HttpServletResponse response
   * @return ActionForward
   * @throws Exception
   */
  public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception
  {
//String parmAccountNum = prepaidForm.getParmAccountNum();
// String parmDnis = prepaidForm.getParmDnis();
//String parmVruCode = prepaidForm.getParmVRUCode();

DynaValidatorForm prepaidDynaValidatorForm = (DynaValidatorForm)form;
System.out.println(prepaidDynaValidatorForm.toString());
String parmAccountNum = request.getParameter("parmAccountNum");
String parmDnis = request.getParameter("parmDnis");
String parmVruCode = request.getParameter("parmVRUCode");

System.out.println(
  "Entering the ActionForward in PrepaidAction"
+ request.getParameter("parmAccountNum"));
if (parmAccountNum.equals(parmAccountNum))
{
  System.out.println("PrepaidAction: SUCCESS");
  return mapping.findForward("success");
}
else
{
  System.out.println("PrepaidAction: FAILURE");
  return mapping.findForward("failure");
}
  }
}





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