RE: Maven struts2-archetype-starter error

2008-05-12 Thread Allen, Daniel
Add a -e (or it might be a capital -E) to the command, and Maven
will print out the stack trace and a little more information about the
problem. That might give you something to work with.

-Original Message-
From: maestro [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 10, 2008 8:42 PM
To: Struts Users Mailing List
Subject: Maven struts2-archetype-starter error

Hi,


I very new to Struts2 and Maven.

I ran this command with version 2.0.9 on the 6th of May without a
problem.


mvn archetype:create   -DgroupId=tutorial \

   -DartifactId=tutorial \
   -DarchetypeGroupId=org.apache.struts \
   -DarchetypeArtifactId=struts2-archetype-starter \
   -DarchetypeVersion=2.0.5-SNAPSHOT \

-DremoteRepositories=http://people.apache.org/repo/m2-snapshot-repositor
y


When I run it now I get an error.

[INFO]

[ERROR] BUILD FAILURE
[INFO]

[INFO] :
org.apache.maven.archetype.exception.ArchetypeGenerationFailure:
Failed to generate project from the old archetype
Failed to generate project from the old archetype


I'm not sure if its a maven problem or a problem with the
struts2-archetype-starter or something else.

Maven version: 2.0.9
Java version: 1.5.0_13 OS name: mac os x version: 10.5.2 arch:
i386
Family: unix

Any ideas are appreciated.
- Glenn

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



[s2] Getting the current Action name in a JSP?

2008-05-12 Thread Allen, Daniel
Hi, all.

I'm using Sitemesh decorators on my Struts2 project to create a generic
header menu. However, I'd like to use a CSS class to highlight the menu
item for where the user currently is. Is there a good way to get the
current action name and namespace just with JSP code? I know I can get
it using Java code and then put it into my JSPs by accessing the action
property via OGNL. I'm just wondering if there is a built-in way to get
that information.

Thanks,
~Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: [s2] Getting the current Action name in a JSP?

2008-05-12 Thread Allen, Daniel
Thanks for the tip, but to clarify, what I want to know is whether that
action reference has an easy, built-in way to get its name and
namespace, as configured in struts.xml.

For example, I have in struts.xml
action name=doSample class=package.DoSampleAction
result name=successsample.jsp/result
/action

Can I put into sample.jsp a reference to something built-in like
s:property value=#action.name? Or will I have to actually edit the
DoSampleAction.java to create a getConfiguredName() property before I
can do that? I didn't see anything in the API document for
ActionSupport.

~DVA



-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 12, 2008 12:45 PM
To: Struts Users Mailing List
Subject: Re: [s2] Getting the current Action name in a JSP?

#action will give you a reference to the last executed action.

musachy

On Mon, May 12, 2008 at 12:10 PM, Allen, Daniel [EMAIL PROTECTED]
wrote:
 Hi, all.

  I'm using Sitemesh decorators on my Struts2 project to create a
generic
  header menu. However, I'd like to use a CSS class to highlight the
menu
  item for where the user currently is. Is there a good way to get the
  current action name and namespace just with JSP code? I know I can
get
  it using Java code and then put it into my JSPs by accessing the
action
  property via OGNL. I'm just wondering if there is a built-in way to
get
  that information.

  Thanks,
  ~Dan Allen

  --
  This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP).

  This message does not create any obligation, contractual or
otherwise, on the part of KBC FP. It is not an offer (or solicitation of
an offer) of, or a recommendation to buy or sell, any financial product.
Any prices or other values included in this message are indicative only,
and do not necessarily represent current market prices, prices at which
KBC FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided as is, without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.


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





-- 
Hey you! Would you help me to carry the stone? Pink Floyd

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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: [s2] Getting the current Action name in a JSP?

2008-05-12 Thread Allen, Daniel
So that's what #action gets? That's really useful, thanks!

~DVA

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 12, 2008 1:52 PM
To: Struts Users Mailing List
Subject: Re: [s2] Getting the current Action name in a JSP?

Under struts.actionMapping there will be an object of type
org.apache.struts2.dispatcher.mapper.ActionMapping with fields:
extension, name, namespace, params and method. Another tip, if you
have the debug interceptor applied to your action you can add
debug=browser to the url and you will be able to browse the values
stored in the stack.

musachy

On Mon, May 12, 2008 at 1:35 PM, Allen, Daniel [EMAIL PROTECTED]
wrote:
 Thanks for the tip, but to clarify, what I want to know is whether
that
  action reference has an easy, built-in way to get its name and
  namespace, as configured in struts.xml.

  For example, I have in struts.xml
  action name=doSample class=package.DoSampleAction
 result name=successsample.jsp/result
  /action

  Can I put into sample.jsp a reference to something built-in like
  s:property value=#action.name? Or will I have to actually edit
the
  DoSampleAction.java to create a getConfiguredName() property before I
  can do that? I didn't see anything in the API document for
  ActionSupport.

  ~DVA





  -Original Message-
  From: Musachy Barroso [mailto:[EMAIL PROTECTED]
  Sent: Monday, May 12, 2008 12:45 PM
  To: Struts Users Mailing List
  Subject: Re: [s2] Getting the current Action name in a JSP?

  #action will give you a reference to the last executed action.

  musachy

  On Mon, May 12, 2008 at 12:10 PM, Allen, Daniel
[EMAIL PROTECTED]
  wrote:
   Hi, all.
  
I'm using Sitemesh decorators on my Struts2 project to create a
  generic
header menu. However, I'd like to use a CSS class to highlight the
  menu
item for where the user currently is. Is there a good way to get
the
current action name and namespace just with JSP code? I know I can
  get
it using Java code and then put it into my JSPs by accessing the
  action
property via OGNL. I'm just wondering if there is a built-in way
to
  get
that information.
  
Thanks,
~Dan Allen
  
--
This message may contain confidential, proprietary, or legally
  privileged information. No confidentiality or privilege is waived by
any
  transmission to an unintended recipient. If you are not an intended
  recipient, please notify the sender and delete this message
immediately.
  Any views expressed in this message are those of the sender, not
those
  of any entity within the KBC Financial Products group of companies
  (together referred to as KBC FP).
  
This message does not create any obligation, contractual or
  otherwise, on the part of KBC FP. It is not an offer (or solicitation
of
  an offer) of, or a recommendation to buy or sell, any financial
product.
  Any prices or other values included in this message are indicative
only,
  and do not necessarily represent current market prices, prices at
which
  KBC FP would enter into a transaction, or prices at which similar
  transactions may be carried on KBC FP's own books. The information
  contained in this message is provided as is, without
representations
  or warranties, express or implied, of any kind. Past performance is
not
  indicative of future returns.
  
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  



  --
  Hey you! Would you help me to carry the stone? Pink Floyd

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


  --
  This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP).

  This message does not create any obligation, contractual or
otherwise, on the part of KBC FP. It is not an offer (or solicitation of
an offer) of, or a recommendation to buy or sell, any financial product.
Any prices or other values included in this message are indicative only,
and do not necessarily represent current market prices, prices at which
KBC FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided as is, without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.


  -
  To unsubscribe, e

RE: [s2] Getting the current Action name in a JSP?

2008-05-12 Thread Allen, Daniel
Ok, thanks for the clarification.

What is the Java type of #struts? I'd like to take a look at the docs to
see what else I can get out of that.

~DVA

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 12, 2008 3:07 PM
To: Struts Users Mailing List
Subject: Re: [s2] Getting the current Action name in a JSP?

%{#struts.actionMapping} -Action Mapping
%{#action} - Last executed action

musachy

On Mon, May 12, 2008 at 3:05 PM, Dave Newton [EMAIL PROTECTED]
wrote:
 --- Allen, Daniel [EMAIL PROTECTED] wrote:
   So that's what #action gets? That's really useful, thanks!

  Wait, what? I'm not sure that #action is mapped to anything, and if
it
  was, it'd be the action itself, not its configuration.

  Dave



   -Original Message-
   From: Musachy Barroso [mailto:[EMAIL PROTECTED]
   Sent: Monday, May 12, 2008 1:52 PM
   To: Struts Users Mailing List
   Subject: Re: [s2] Getting the current Action name in a JSP?
  
   Under struts.actionMapping there will be an object of type
   org.apache.struts2.dispatcher.mapper.ActionMapping with fields:
   extension, name, namespace, params and method. Another tip, if you
   have the debug interceptor applied to your action you can add
   debug=browser to the url and you will be able to browse the values
   stored in the stack.
  
   musachy
  
   On Mon, May 12, 2008 at 1:35 PM, Allen, Daniel
   [EMAIL PROTECTED]
   wrote:
Thanks for the tip, but to clarify, what I want to know is
whether
   that
 action reference has an easy, built-in way to get its name and
 namespace, as configured in struts.xml.
   
 For example, I have in struts.xml
 action name=doSample class=package.DoSampleAction
result name=successsample.jsp/result
 /action
   
 Can I put into sample.jsp a reference to something built-in like
 s:property value=#action.name? Or will I have to actually
edit
   the
 DoSampleAction.java to create a getConfiguredName() property
   before I
 can do that? I didn't see anything in the API document for
 ActionSupport.
   
 ~DVA
   
   
   
   
   
 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 12, 2008 12:45 PM
 To: Struts Users Mailing List
 Subject: Re: [s2] Getting the current Action name in a JSP?
   
 #action will give you a reference to the last executed action.
   
 musachy
   
 On Mon, May 12, 2008 at 12:10 PM, Allen, Daniel
   [EMAIL PROTECTED]
 wrote:
  Hi, all.
 
   I'm using Sitemesh decorators on my Struts2 project to create
a
 generic
   header menu. However, I'd like to use a CSS class to
highlight
   the
 menu
   item for where the user currently is. Is there a good way to
   get
   the
   current action name and namespace just with JSP code? I know
I
   can
 get
   it using Java code and then put it into my JSPs by accessing
   the
 action
   property via OGNL. I'm just wondering if there is a built-in
   way
   to
 get
   that information.
 
   Thanks,
   ~Dan Allen
 
   --
   This message may contain confidential, proprietary, or
legally
 privileged information. No confidentiality or privilege is
waived
   by
   any
 transmission to an unintended recipient. If you are not an
   intended
 recipient, please notify the sender and delete this message
   immediately.
 Any views expressed in this message are those of the sender, not
   those
 of any entity within the KBC Financial Products group of
companies
 (together referred to as KBC FP).
 
   This message does not create any obligation, contractual or
 otherwise, on the part of KBC FP. It is not an offer (or
   solicitation
   of
 an offer) of, or a recommendation to buy or sell, any financial
   product.
 Any prices or other values included in this message are
indicative
   only,
 and do not necessarily represent current market prices, prices
at
   which
 KBC FP would enter into a transaction, or prices at which
similar
 transactions may be carried on KBC FP's own books. The
information
 contained in this message is provided as is, without
   representations
 or warranties, express or implied, of any kind. Past performance
   is
   not
 indicative of future returns.
 
 
 
  
-
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
   
   
 --
 Hey you! Would you help me to carry the stone? Pink Floyd
   
   
  
-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   
   
 --
 This message may contain confidential, proprietary, or legally
   privileged information. No confidentiality

RE: [s2] Getting the current Action name in a JSP?

2008-05-12 Thread Allen, Daniel
Oh, ok. I was just in the middle of poking around the debug info to see
why that wasn't working. 

Thanks,
~DVA 

-Original Message-
From: Allen, Daniel 
Sent: Monday, May 12, 2008 3:11 PM
To: Struts Users Mailing List
Subject: RE: [s2] Getting the current Action name in a JSP?

Ok, thanks for the clarification.

What is the Java type of #struts? I'd like to take a look at the docs to
see what else I can get out of that.

~DVA

-Original Message-
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 12, 2008 3:07 PM
To: Struts Users Mailing List
Subject: Re: [s2] Getting the current Action name in a JSP?

%{#struts.actionMapping} -Action Mapping
%{#action} - Last executed action

musachy

On Mon, May 12, 2008 at 3:05 PM, Dave Newton [EMAIL PROTECTED]
wrote:
 --- Allen, Daniel [EMAIL PROTECTED] wrote:
   So that's what #action gets? That's really useful, thanks!

  Wait, what? I'm not sure that #action is mapped to anything, and if
it
  was, it'd be the action itself, not its configuration.

  Dave



   -Original Message-
   From: Musachy Barroso [mailto:[EMAIL PROTECTED]
   Sent: Monday, May 12, 2008 1:52 PM
   To: Struts Users Mailing List
   Subject: Re: [s2] Getting the current Action name in a JSP?
  
   Under struts.actionMapping there will be an object of type
   org.apache.struts2.dispatcher.mapper.ActionMapping with fields:
   extension, name, namespace, params and method. Another tip, if you
   have the debug interceptor applied to your action you can add
   debug=browser to the url and you will be able to browse the values
   stored in the stack.
  
   musachy
  
   On Mon, May 12, 2008 at 1:35 PM, Allen, Daniel
   [EMAIL PROTECTED]
   wrote:
Thanks for the tip, but to clarify, what I want to know is
whether
   that
 action reference has an easy, built-in way to get its name and
 namespace, as configured in struts.xml.
   
 For example, I have in struts.xml
 action name=doSample class=package.DoSampleAction
result name=successsample.jsp/result
 /action
   
 Can I put into sample.jsp a reference to something built-in like
 s:property value=#action.name? Or will I have to actually
edit
   the
 DoSampleAction.java to create a getConfiguredName() property
   before I
 can do that? I didn't see anything in the API document for
 ActionSupport.
   
 ~DVA
   
   
   
   
   
 -Original Message-
 From: Musachy Barroso [mailto:[EMAIL PROTECTED]
 Sent: Monday, May 12, 2008 12:45 PM
 To: Struts Users Mailing List
 Subject: Re: [s2] Getting the current Action name in a JSP?
   
 #action will give you a reference to the last executed action.
   
 musachy
   
 On Mon, May 12, 2008 at 12:10 PM, Allen, Daniel
   [EMAIL PROTECTED]
 wrote:
  Hi, all.
 
   I'm using Sitemesh decorators on my Struts2 project to create
a
 generic
   header menu. However, I'd like to use a CSS class to
highlight
   the
 menu
   item for where the user currently is. Is there a good way to
   get
   the
   current action name and namespace just with JSP code? I know
I
   can
 get
   it using Java code and then put it into my JSPs by accessing
   the
 action
   property via OGNL. I'm just wondering if there is a built-in
   way
   to
 get
   that information.
 
   Thanks,
   ~Dan Allen
 
   --
   This message may contain confidential, proprietary, or
legally
 privileged information. No confidentiality or privilege is
waived
   by
   any
 transmission to an unintended recipient. If you are not an
   intended
 recipient, please notify the sender and delete this message
   immediately.
 Any views expressed in this message are those of the sender, not
   those
 of any entity within the KBC Financial Products group of
companies
 (together referred to as KBC FP).
 
   This message does not create any obligation, contractual or
 otherwise, on the part of KBC FP. It is not an offer (or
   solicitation
   of
 an offer) of, or a recommendation to buy or sell, any financial
   product.
 Any prices or other values included in this message are
indicative
   only,
 and do not necessarily represent current market prices, prices
at
   which
 KBC FP would enter into a transaction, or prices at which
similar
 transactions may be carried on KBC FP's own books. The
information
 contained in this message is provided as is, without
   representations
 or warranties, express or implied, of any kind. Past performance
   is
   not
 indicative of future returns.
 
 
 
  
-
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
   
   
   
 --
 Hey you! Would you help me to carry the stone? Pink Floyd

RE: How to validate a checkboxlist?

2008-05-09 Thread Allen, Daniel
If you want client-side anything, wouldn't you want to use JavaScript?
As far as I know, everything XWork validation does is on the server.

(I would say have a validator in the action bean too, though, in case
the use has JS disabled and manages to submit without passing that
check.)

-Original Message-
From: mojoRising [mailto:[EMAIL PROTECTED] 
Sent: Thursday, May 08, 2008 5:21 PM
To: user@struts.apache.org
Subject: How to validate a checkboxlist?


I am trying to perform client side validation on a struts checkboxlist
tag
but nothing I try seems to work.  ANy ideas? I do not want to submit the
form and do a validation method in the action bean because obviously it
would be ridiculous to post back to the server just to check that there
is
at least one checkbox selected

This is what I have:  


s:checkboxlist  label=Assigned Roles  title=Assigned Roles
 name=selectedRoles
 value=selectedRoles
 listValue=value
 listKey=id 
 list=roleList
 required=true/


!DOCTYPE validators PUBLIC
-//OpenSymphony Group//XWork Validator 1.0.2//EN
http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;

validators
field name=selectedRoles
field-validator type=required
   messageYou must select at least one role for this
user/message
/field-validator
/field
/validators
-- 
View this message in context:
http://www.nabble.com/How-to-validate-a-checkboxlist--tp17136631p1713663
1.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: 2 Dimensional arrays?

2008-05-09 Thread Allen, Daniel
Hmm. I don't know of a way to make Struts 2 give back 2-D array
properties in the auto-magical way that it will do 1-D arrays (doesn't
mean there's not one: I keep finding out that a lot of things I want to
do can be done by magic if you know the correct XML incantation) but
perhaps you could sidestep this with JSON? I'm not particularly familiar
with AJAX stuff, but my understanding is that JSON can encode any
arbitrary object possible in JavaScript. That could potentially entail a
large number of changes, though... 

Or, another JavaScript solution, one that doesn't entail switching to
any kind of AJAX, would be to have a script that concatenates all of one
row's values into a single string, and then have a single-dimensional
array property. Sort of wasteful in that processing time is spent
composing and then parsing back to the original state, but I think it
would serve your purpose.

HTH,
~DVA

-Original Message-
From: Michael Gagnon [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 11:36 AM
To: user@struts.apache.org
Subject: 2 Dimensional arrays?

Is it possible to get back 2D arrays from a form?

 

I want to be able to have a table with some number of rows. Each row has
a
'grouping' field which the user can enter a number in. Each row will
also
have a dynamic 'foo' column which will have a button to add additional
'foo'
values. Some javascript will drop in new 'foo' textfields on a given row
whenever that row's button is clicked.

 

I want to be able to collect an int[] grouping array, which is straight
forward. Iterating over a collection to create textfields will let me
get an
int[] in my action which will be the list of groupings indexed by row
(so
grouping[0] yields the entered value for the first row, grouping[3]
yields
the entered value for the fourth row, etc.)

 

I also want to be able to collect an int[][] foo array. This should be
an
int[] array of foo values indexed by row. This is less straightforward
and
I'm not sure how to approach this. Are there any sorts of similar
examples
to this floating around?


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: How to validate a checkboxlist?

2008-05-09 Thread Allen, Daniel
I don't know the exact code (I always forget JS details) but the basic
idea would be to give your checkboxes IDs in the JSP, then use
getElementById() to grab the DOM nodes for them and just do
(node.checked == true), then  the results. And your submit would have
call the method that validates as its onClick event and only submits the
form if the validation passes.

JavaScript is ubiquitous enough that Google has plenty of results for
it, so have a look:
http://www.google.com/search?q=javascript+checkbox+groupbtnG=z34r%3C%7C
-%7C Hopefully that ought to point you in the right direction.

~DVA



-Original Message-
From: mojoRising [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 09, 2008 2:34 PM
To: user@struts.apache.org
Subject: RE: How to validate a checkboxlist?


I am using struts 2.0.11, and with the validation framework, client-side
validation is of course done using javascript:
http://struts.apache.org/2.x/docs/client-validation.html


Javascript must be used for my project so I have no problem requiring
it.
The client side (javascript)validation works perfectly for text
boxes...but
I don't see how to make it check that a checkboxlist has at least one
box
checked? Has anyone ever done this?




Allen, Daniel wrote:
 
 If you want client-side anything, wouldn't you want to use JavaScript?
 As far as I know, everything XWork validation does is on the server.
 
 (I would say have a validator in the action bean too, though, in case
 the use has JS disabled and manages to submit without passing that
 check.)
 
 -Original Message-
 From: mojoRising [mailto:[EMAIL PROTECTED] 
 Sent: Thursday, May 08, 2008 5:21 PM
 To: user@struts.apache.org
 Subject: How to validate a checkboxlist?
 
 
 I am trying to perform client side validation on a struts checkboxlist
 tag
 but nothing I try seems to work.  ANy ideas? I do not want to submit
the
 form and do a validation method in the action bean because obviously
it
 would be ridiculous to post back to the server just to check that
there
 is
 at least one checkbox selected
 
 This is what I have:  
 
 
 s:checkboxlist  label=Assigned Roles  title=Assigned Roles
name=selectedRoles
value=selectedRoles
listValue=value
listKey=id 
list=roleList
required=true/
 
 
 !DOCTYPE validators PUBLIC
 -//OpenSymphony Group//XWork Validator 1.0.2//EN
 http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd;
 
 validators
   field name=selectedRoles
 field-validator type=required
  messageYou must select at least one role for this
 user/message
 /field-validator
 /field
 /validators
 -- 
 View this message in context:

http://www.nabble.com/How-to-validate-a-checkboxlist--tp17136631p1713663
 1.html
 Sent from the Struts - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -- 
 This message may contain confidential, proprietary, or legally
privileged
 information. No confidentiality or privilege is waived by any
transmission
 to an unintended recipient. If you are not an intended recipient,
please
 notify the sender and delete this message immediately. Any views
expressed
 in this message are those of the sender, not those of any entity
within
 the KBC Financial Products group of companies (together referred to as
 KBC FP). 
 
 This message does not create any obligation, contractual or otherwise,
on
 the part of KBC FP. It is not an offer (or solicitation of an offer)
of,
 or a recommendation to buy or sell, any financial product. Any prices
or
 other values included in this message are indicative only, and do not
 necessarily represent current market prices, prices at which KBC FP
would
 enter into a transaction, or prices at which similar transactions may
be
 carried on KBC FP's own books. The information contained in this
message
 is provided as is, without representations or warranties, express or
 implied, of any kind. Past performance is not indicative of future
 returns.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context:
http://www.nabble.com/How-to-validate-a-checkboxlist--tp17136631p1715411
0.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended

RE: Action servlet becomes null in UNIX environment

2008-05-07 Thread Allen, Daniel
A couple of things strike me as really odd about this. 

First: why are you creating HTML using strings in Java code? The whole
point of JSPs was to avoid doing exactly that. You should either make
use of .jsp files and the logic tags in Struts [1] or just use regular
servlets if you really want to manually compose HTML.

Second, why is your test environment different from your production
environment? That sort of defeats the purpose of testing, since you can
no longer rely on the fact that something you tested works.


That said, chances are pretty good that you're getting null from that
line because the HTTP request represented by the request object didn't
have a parameter called actionSelection. I suggest you stick in a
breakpoint and have a look at the contents of the object.

Hope that helps.
~DVA

[1] http://struts.apache.org/1.3.8/struts-taglib/index.html Looks as
though you're using Struts 1, but you didn't specify a version, so
here's the last release's tag documents. If this is a new app, may I
humbly suggest you use Struts2 instead?  No sense in starting a project
using a deprecated framework.


-Original Message-
From: Raghuveer Rawat [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 07, 2008 1:18 PM
To: Struts Users Mailing List
Subject: Action servlet becomes null in UNIX environment

Hi,
I have a problem with my application where actionServlet becomes null in
UNIX environment and works fine in windows XP system. While saving data
on
test environment (UNIX) I am getting action servlet as null in My Action
class. The jsp is built dynamically in as below

*JSP code:*

if (newGuide) {

sb.append(tr\n);

sb.append(td align=right colspan=2\n);

sb.append(select name=\actionSelection\);

sb.append( option value=saveOnly- Save Assessment/option);

sb.append( option value=delete- Delete Assessment/option);

sb.append( option value=saveSchedule- Save  Schedule/option);

sb.append( option value=saveRefer- Save  Refer/option);

sb.append(/select);

sb.append( input type=\submit\ name=\save\

value=\Complete\ class=Button );

sb.append(/td\n);

sb.append(/tr\n);

}

* Action Class // Action class used for security *

public void setServlet(ActionServlet actionServlet) {

super.setServlet(actionServlet); // Here I get actionServlet as null

ServletContext servletContext = actionServlet.getServletContext();

WebApplicationContext wac = WebApplicationContextUtils

.getRequiredWebApplicationContext(servletContext);

setIcrProcessor((CareRequestProcessor)wac.getBean(myCareRequestProcesso

r));

}

Because of this I get null pointer exception in class Main Action Class
used
for saving the data.

*Action class code :*

public ActionForward saveHAGuide(ActionMapping mapping, ActionForm form,
HttpServletRequest request,

HttpServletResponse response) throws Exception {

String method = saveHAGuide;

Exception ex = null;

ActionForward forward = null;

AppUser appUser = getAppUser(request);

appUser.methodStart(this, saveHAGuide);

HttpSession session = request.getSession(false);

String action = request.getParameter(actionSelection); // Here I get
action as null

Action becomes null and it throws null pointer exception.

As UNIX is case sensitive I checked the request parameter which is
actionSelection in this class and I do not see any problem with it. I
don't
know why action servlet becomes null at this point. Please suggest if
you
have any idea about this.

Note: This happens only in test environment (UNIX). Works fine in my
local
system (Windows XP) .

Thanks and regards,

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Action servlet becomes null in UNIX environment

2008-05-07 Thread Allen, Daniel
 are using html in java code because the JSP changes at run time
according to
 the user inputs.

But that's exactly what the Logic tags are for: a JSP that produces
different output according to inputs. For example:
If, in your Java code, you have:
if (reqType == A)
sb.append (User made request A);

You can instead have in a JSP file (I'm using struts 2 tags because it's
what I know, but there are s1 equivalents):
s:if test=reqType == A
User made request A
/s:if

Both of those should do the same thing. I suppose it's beside the point
if you're stuck with the current design, though.

Anyway, did you check out the request object's contents? If the
parameter is indeed missing from the request, then the next step is to
find out what should
Be putting it into the request (probably the previous page, I'd guess)
and make sure that is putting it in. If it seems like the incoming URLs
are correct, including that parameter, then it looks like you have an
Apache or Tomcat problem, and you should probably ask them about it.

~DVA

-Original Message-
From: Raghuveer Rawat [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, May 07, 2008 2:45 PM
To: Struts Users Mailing List
Subject: Re: Action servlet becomes null in UNIX environment

Thanks for the prompt reply. Its a late 90's   huge application in which
now
i cannot start using Strus 2  as iam the only developer working on this.
We
are using html in java code because the JSP changes at run time
according to
the user inputs . Yeah , i agree that coz of diff environment we face
lot of
problems but i cannot do anything as its not my decision.
We  run Apache as a front end for Tomcat. Apache serves up the html
pages
and uses mod_jk mounts to forward the java application requests to
Tomcat.
I'll try to find out what else i can do as i am unable to see anything
in
apache logs as well.

On Wed, May 7, 2008 at 1:48 PM, Allen, Daniel [EMAIL PROTECTED]
wrote:

 A couple of things strike me as really odd about this.

 First: why are you creating HTML using strings in Java code? The whole
 point of JSPs was to avoid doing exactly that. You should either make
 use of .jsp files and the logic tags in Struts [1] or just use regular
 servlets if you really want to manually compose HTML.

 Second, why is your test environment different from your production
 environment? That sort of defeats the purpose of testing, since you
can
 no longer rely on the fact that something you tested works.


 That said, chances are pretty good that you're getting null from that
 line because the HTTP request represented by the request object didn't
 have a parameter called actionSelection. I suggest you stick in a
 breakpoint and have a look at the contents of the object.

 Hope that helps.
 ~DVA

 [1] http://struts.apache.org/1.3.8/struts-taglib/index.html Looks as
 though you're using Struts 1, but you didn't specify a version, so
 here's the last release's tag documents. If this is a new app, may I
 humbly suggest you use Struts2 instead?  No sense in starting a
project
 using a deprecated framework.


 -Original Message-
 From: Raghuveer Rawat [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, May 07, 2008 1:18 PM
 To: Struts Users Mailing List
 Subject: Action servlet becomes null in UNIX environment

 Hi,
 I have a problem with my application where actionServlet becomes null
in
 UNIX environment and works fine in windows XP system. While saving
data
 on
 test environment (UNIX) I am getting action servlet as null in My
Action
 class. The jsp is built dynamically in as below

 *JSP code:*

 if (newGuide) {

 sb.append(tr\n);

 sb.append(td align=right colspan=2\n);

 sb.append(select name=\actionSelection\);

 sb.append( option value=saveOnly- Save Assessment/option);

 sb.append( option value=delete- Delete Assessment/option);

 sb.append( option value=saveSchedule- Save  Schedule/option);

 sb.append( option value=saveRefer- Save  Refer/option);

 sb.append(/select);

 sb.append( input type=\submit\ name=\save\

 value=\Complete\ class=Button );

 sb.append(/td\n);

 sb.append(/tr\n);

 }

 * Action Class // Action class used for security *

 public void setServlet(ActionServlet actionServlet) {

 super.setServlet(actionServlet); // Here I get actionServlet as null

 ServletContext servletContext = actionServlet.getServletContext();

 WebApplicationContext wac = WebApplicationContextUtils

 .getRequiredWebApplicationContext(servletContext);


setIcrProcessor((CareRequestProcessor)wac.getBean(myCareRequestProcesso

 r));

 }

 Because of this I get null pointer exception in class Main Action
Class
 used
 for saving the data.

 *Action class code :*

 public ActionForward saveHAGuide(ActionMapping mapping, ActionForm
form,
 HttpServletRequest request,

 HttpServletResponse response) throws Exception {

 String method = saveHAGuide;

 Exception ex = null;

 ActionForward forward = null;

 AppUser appUser = getAppUser(request);

 appUser.methodStart(this, saveHAGuide

RE: Redirect-action parameters via POST

2008-04-25 Thread Allen, Daniel
Thanks for the info, guys!

I will probably end up going with the session after all, but I'll take a
look at Flash scope in that interceptor, too.

~DVA 

-Original Message-
From: Guillaume Bilodeau [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 25, 2008 10:09 AM
To: user@struts.apache.org
Subject: Re: Redirect-action parameters via POST


The use case you're describing would be best implemented using flash
scope. 
Your options include:

. use the Scope plugin
(http://cwiki.apache.org/S2PLUGINS/scope-plugin.html)
. implement the scope yourself using a result / interceptor pair as
discussed in this forum
(http://www.nabble.com/Is-there-such-a-thing-as-flash-in-S2--td16697840.
html#a16866433)

Developing the scope itself is quite straightforward, but if you want
some
pointers I can help you out.

Cheers,
GB


ancatdubher wrote:
 
 Redirect (by design) uses an HTTP GET request method. This means the
only
 way to pass values is in the URL. If your data is small enough, you
could
 encode/encrypt it into the URL and decode it back after the redirect -
an
 approach that isn't clean and I wouldn't recommend. (Also, the URL is
 limited to 256 characters length).
 
 The only other option is the session. 
 
 
 
 Nils-Helge Garli wrote:
 
 
 Well, it sounds like something that shouldn't be possible to me... It
 kind of violates the whole concept of a redirect. If you really want
 the data to be a part of the URL, you could do some encoding to make
 them less readable and shorter.
 
 Nils-H
 
 On Thu, Apr 24, 2008 at 10:12 PM, Allen, Daniel
[EMAIL PROTECTED]
 wrote:
 I can, and I considered that, but I was hoping to keep it in the XML
to
  minimize the number of files that need to be changed. The
 documentUpload
  action that's the redirect target below is actually the recipient
of
  quite a few links (in fact the basic point of the application is to
  facilitate document submission for various purposes).

  If this isn't possible purely via configuration, then yeah, session
  storage is definitely my fallback plan.

  ~DVA



  -Original Message-
  From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED]
  Sent: Thursday, April 24, 2008 3:58 PM
  To: Struts Users Mailing List
  Subject: Re: Redirect-action parameters via POST

  Can you put the info on the session?

  Nils-H

 
 
 
 

-- 
View this message in context:
http://www.nabble.com/Redirect-action-parameters-via-POST-tp16884951p168
95774.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Building First strut

2008-04-25 Thread Allen, Daniel
Actually, I found Maven very helpful when I was starting Struts2. 

http://struts.apache.org/2.x/docs/struts-maven-archetypes.html has some
information on the archetype plugin, which Maven can use to generate the
empty shell of an application. That's great for beginners because all
the configuration files are where they need to be and creates the proper
directory structure, and to have a functioning program all you need to
do is write an action or two and JSPs for results. Then you can start
tweaking things to see how they change, tracing through executions, etc.

Dave's right, though. Maven is arguably as complex as Struts, and
although it's a great tool, any more than a link or two is outside the
scope of this list (though there's a Maven list too!)

~Dan Allen

-Original Message-
From: Vinay Nagrik [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 25, 2008 1:41 PM
To: Struts Users Mailing List
Subject: Re: Building First strut

Hello Dave,

On 4/25/08, Dave Newton [EMAIL PROTECTED] wrote:

 --- Vinay Nagrik [EMAIL PROTECTED] wrote:
  I started my download from the link you provided.  And that link
does
 not
  give any info.  Your email did not help me.

 You are asking very vague questions.

 How familiar are you with Java web development? Are you planning on
using
 Ant
 or Maven?



I am very comfortable with Java prog. lang and I have worked with jsps
and
servlets extensively.  However, this is my first struts project.

If you are not using Maven creating an S2 web application is like
creating
 any other. Maven is a topic unto itself and the basics of it are
beyond
 the
 scope of the newsgroup, but looking at the sample applications may
point
 you
 in the right direction.


I have nothing agains using Maven, but it does not compile.  I
downloaded
Maven, tomcat, and struts.

My tomcat is up and running.
My Maven does not compile for lack of pom.xml and I do not know where to
get
it from.
I have followed the instructions on the strut page to create helloworld
struts
Created four files verbatim web.xml, struts.xml, helloworld.java,
helloworld.jsp.  Put all
.jar files form struts download in WEB-INF/lib, \
web.xml in WEB-INF
struts.xml in WEB-INF/classes and my helloworld.class in the
WEB-INF/classes.

Points to be noted.

my directory structure is

~/tomcat/webapps/examples (instead of tutorials)/WEB-INF/ and then other
classes
and other directories.
helloworld.java's  top line reads package examples  (I can take this
line
out if it creates
any confusion) and make it flat.

I am typing http://localhost:8080/examples/helloworld.action.  (Please
don't
mind the spelling
and upper/lower case of letters, they have been thoroughly checked.)

It gives the error message

The requested resource (examples/Helloworld.action ) is not available.

If you're using Eclipse (or, I presume, most other IDEs) it's best to
let
 the
 IDE move config files from the source directory into WEB-INF/classes
 rather
 than creating the file there, just to avoid confusion.

 What issues, precisely, do you think you're having?

 Dave


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




-- 
Thanks

Nagrik

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Building First strut

2008-04-25 Thread Allen, Daniel
Did you read the page I linked? The archetype creator writes you a basic
POM, in addition to many other things.

If you don't read the answers people give you, this list won't be of any
help to you.

-Original Message-
From: Vinay Nagrik [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 25, 2008 2:09 PM
To: Struts Users Mailing List
Subject: Re: Building First strut

I can not get Maven to install.  It is looking for pom.xml and I don't
have
it
in my download of Maven.  I supplied it Super POM from internet and even
then it did not compile.

I tried

mvn clean install
mvn install

Both failed.

Thanks.

nagrik

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Redirect-action parameters via POST

2008-04-24 Thread Allen, Daniel
Hi, all.

I'm using the snippet below[1] in my struts.xml file to send finish an
action with a redirect to another, and sending a parameter along.
However, Struts 2 defaults to passing the parameter via appending it to
the URL in a GET request. I'm going to need to add additional
parameters, some of which may be extremely large, and which I'd prefer
the user not be able to easily alter. So, I would like to change things
so that the URL result is just
webapp.com/namespace/documentUpload_input and the parameters are
passed invisibly via POST request.

Is there a way to do that?

~Dan Allen



[1]
action name=createPolicy class=createPolicyAction
result name=success type=redirect-action
param name=actionNamedocumentUpload_input/param
param name=parsetrue/param
param name=policyId${policyId}/param
/result
/action

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Redirect-action parameters via POST

2008-04-24 Thread Allen, Daniel
I can, and I considered that, but I was hoping to keep it in the XML to
minimize the number of files that need to be changed. The documentUpload
action that's the redirect target below is actually the recipient of
quite a few links (in fact the basic point of the application is to
facilitate document submission for various purposes). 

If this isn't possible purely via configuration, then yeah, session
storage is definitely my fallback plan.

~DVA

-Original Message-
From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 24, 2008 3:58 PM
To: Struts Users Mailing List
Subject: Re: Redirect-action parameters via POST

Can you put the info on the session?

Nils-H

On Thu, Apr 24, 2008 at 9:52 PM, Allen, Daniel [EMAIL PROTECTED]
wrote:
 Hi, all.

  I'm using the snippet below[1] in my struts.xml file to send finish
an
  action with a redirect to another, and sending a parameter along.
  However, Struts 2 defaults to passing the parameter via appending it
to
  the URL in a GET request. I'm going to need to add additional
  parameters, some of which may be extremely large, and which I'd
prefer
  the user not be able to easily alter. So, I would like to change
things
  so that the URL result is just
  webapp.com/namespace/documentUpload_input and the parameters are
  passed invisibly via POST request.

  Is there a way to do that?

  ~Dan Allen



  [1]
  action name=createPolicy class=createPolicyAction
 result name=success type=redirect-action
 param name=actionNamedocumentUpload_input/param
 param name=parsetrue/param
 param name=policyId${policyId}/param
 /result
  /action

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Exception like a missing JAR, but I think I have them all

2008-04-22 Thread Allen, Daniel
When I try to start up my Struts 2/Spring project, I get an exception
about a missing class, which makes me think I have a missing JAR, but I
can't find mention of anything that isn't already in my build. Could
anyone take a look, perhaps?


I have the following entries in my Maven POM. Am I missing anything? 
dependency
groupIdorg.apache.struts/groupId
artifactIdstruts2-core/artifactId
version2.0.11/version
/dependency
dependency
groupIdorg.apache.struts/groupId
artifactIdstruts2-sitemesh-plugin/artifactId
version2.0.11/version
/dependency
dependency
groupIdorg.apache.struts/groupId
artifactIdstruts2-spring-plugin/artifactId
version2.0.11/version
/dependency

Here is the exception stack trace:
2008-04-22 15:18:37,115 ERROR [StandardContext.java:3604] : Exception
starting filter action2
Cannot locate the chosen ObjectFactory implementation: spring - [unknown
location]
at
org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvi
der.java:224)
at
org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvi
der.java:195)
at
org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionPr
ovider.java:153)
at
com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultC
onfiguration.java:131)
at
com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(Con
figurationManager.java:52)
at
org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispa
tcher.java:395)
at
org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
at
org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.jav
a:201)
at
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFi
lterConfig.java:223)
at
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicatio
nFilterConfig.java:304)
at
org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilte
rConfig.java:77)
at
org.apache.catalina.core.StandardContext.filterStart(StandardContext.jav
a:3600)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4193
)
at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
va:759)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at
org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:9
04)
at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java
:867)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
0)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
pport.java:119)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
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:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)

And the web.xml excerpt containing action2:
filter
filter-nameaction2/filter-name
 
filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-cla
ss
/filter

Thanks,
~Dan Allen


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in 

RE: Exception like a missing JAR, but I think I have them all

2008-04-22 Thread Allen, Daniel
Yeah, that would be key, wouldn't it? It works now.

If the POM's writer is around, though, is there a reason that the Spring
core is not listed as a dependency of the struts-spring plugin? That's
what I originally assumed would happen.

Thanks, Dave.
~Dan

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 22, 2008 3:47 PM
To: Struts Users Mailing List
Subject: Re: Exception like a missing JAR, but I think I have them all

--- Allen, Daniel [EMAIL PROTECTED] wrote:
 When I try to start up my Struts 2/Spring project, I get an exception
 about a missing class, which makes me think I have a missing JAR, but
I
 can't find mention of anything that isn't already in my build. Could
 anyone take a look, perhaps?
 
 I have the following entries in my Maven POM. Am I missing anything? 

Spring?

Dave

 dependency
 groupIdorg.apache.struts/groupId
 artifactIdstruts2-core/artifactId
 version2.0.11/version
 /dependency
 dependency
 groupIdorg.apache.struts/groupId
 artifactIdstruts2-sitemesh-plugin/artifactId
 version2.0.11/version
 /dependency
 dependency
 groupIdorg.apache.struts/groupId
 artifactIdstruts2-spring-plugin/artifactId
 version2.0.11/version
 /dependency
 
 Here is the exception stack trace:
 2008-04-22 15:18:37,115 ERROR [StandardContext.java:3604] : Exception
 starting filter action2
 Cannot locate the chosen ObjectFactory implementation: spring -
[unknown
 location]
   at

org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvi
 der.java:224)
   at

org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvi
 der.java:195)
   at

org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionPr
 ovider.java:153)
   at

com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultC
 onfiguration.java:131)
   at

com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(Con
 figurationManager.java:52)
   at

org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispa
 tcher.java:395)
   at
 org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
   at

org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.jav
 a:201)
   at

org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFi
 lterConfig.java:223)
   at

org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Applicatio
 nFilterConfig.java:304)
   at

org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilte
 rConfig.java:77)
   at

org.apache.catalina.core.StandardContext.filterStart(StandardContext.jav
 a:3600)
   at

org.apache.catalina.core.StandardContext.start(StandardContext.java:4193
 )
   at

org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja
 va:759)
   at

org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
   at
 org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
   at

org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:9
 04)
   at

org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java
 :867)
   at
 org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
   at
 org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
   at

org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31
 0)
   at

org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu
 pport.java:119)
   at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
   at
 org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
   at
 org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
   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:709)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
 Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at
 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
   at
 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
 
 And the web.xml excerpt containing action2:
 filter
 filter-nameaction2/filter-name
  

filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-cla
 ss
 /filter
 
 Thanks,
 ~Dan Allen
 
 
 -- 
 This message may contain confidential, proprietary, or legally
privileged
 information. No confidentiality or privilege is waived

RE: How to use Autocompleter like GMail style.

2008-04-10 Thread Allen, Daniel
The showcase [1] has an autocompleter example page with demonstrations
of several of its features and accompanying source.

~DVA

[1] http://www.planetstruts.org/struts2-showcase/ajax/autocompleter/

-Original Message-
From: Joey [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 10, 2008 6:23 AM
To: Struts Users Mailing List
Subject: How to use Autocompleter like GMail style.

Hi Everybody.

Just want to know how to can I use Autocompleter as GMail style,
I mean, in GMail website, When I  type more than 1 recipient name in
To: text box, the text box can complete with each recipient name.

I have checked Antocompleter document in Struts2 website, but didn't
find any useful information.

Thanks

Joey

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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Scope of action messages?

2008-04-01 Thread Allen, Daniel
Hi, all.

I'm trying to display a message to the user to confirm that a new user
was created, basic par-for-the-course concept. However, I'm finding that
my s:actionmessage/ tag doesn't render to anything. The first thing I
thought of was that my result for the user creation is an
action-redirect, so by the time we get to the JSP that shows action
messages, another whole action has executed. Do action messages have a
limited scope, i.e. are they being lost because we started a new action?

Thanks,
Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Scope of action messages?

2008-04-01 Thread Allen, Daniel
Hmmm...

How much interfering in the internals do you suppose I'd have to do to
make action errors  messages hang around until the corresponding
s:action___/ tag is rendered?



-Original Message-
From: Chris Pratt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2008 1:58 PM
To: Struts Users Mailing List
Subject: Re: Scope of action messages?

actionmessages, actionerrors and fielderrors are all request scope, so
they'll be gone by the time the redirect comes back around.  You might
want to look into the scope interceptor, it can help bridge the gap.
  (*Chris*)

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Scope of action messages?

2008-04-01 Thread Allen, Daniel
Oh. Yeah, that one looks a lot more immediately applicable. :)

Thanks!
~DVA 

-Original Message-
From: Chris Pratt [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 01, 2008 2:45 PM
To: Struts Users Mailing List
Subject: Re: Scope of action messages?

None if you use the store interceptor (sorry, I had the interceptor
name wrong on the last mail).
  (*Chris*)

On Tue, Apr 1, 2008 at 11:22 AM, Allen, Daniel [EMAIL PROTECTED]
wrote:
 Hmmm...

  How much interfering in the internals do you suppose I'd have to do
to
  make action errors  messages hang around until the corresponding
  s:action___/ tag is rendered?




  -Original Message-
  From: Chris Pratt [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, April 01, 2008 1:58 PM
  To: Struts Users Mailing List
  Subject: Re: Scope of action messages?

  actionmessages, actionerrors and fielderrors are all request scope,
so
  they'll be gone by the time the redirect comes back around.  You
might
  want to look into the scope interceptor, it can help bridge the gap.
   (*Chris*)

  --


 This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP).

  This message does not create any obligation, contractual or
otherwise, on the part of KBC FP. It is not an offer (or solicitation of
an offer) of, or a recommendation to buy or sell, any financial product.
Any prices or other values included in this message are indicative only,
and do not necessarily represent current market prices, prices at which
KBC FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided as is, without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.


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



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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Inheritence of validator annotations

2008-04-01 Thread Allen, Daniel
Hi, all.

I have a superclass where almost all of the subclasses will require
several validations for a particular field, but one subclass will use
some but not all of those validations. I know that you can add
@SkipValidation to avoid all validators, but is there something that you
can use to mark a set() method as not using any of the validators on
overridden superclass methods?


Thanks,
~Dan Allen


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Using Javascript to change struts-generated forms

2008-03-24 Thread Allen, Daniel
 - I'm not sure that order is guaranteed when you have two params with 
the same name at time they are submitted.

I thought multiple parameters with the same name is how Struts did
actions with array-typed properties. That's what's done on the File
Uploads How-To.[1] Is that example potentially broken, then?

~Dan

[1]http://struts.apache.org/2.x/docs/how-do-we-upload-files.html



-Original Message-
From: Jeromy Evans [mailto:[EMAIL PROTECTED] 
Sent: Friday, March 21, 2008 2:49 AM
To: Struts Users Mailing List
Subject: Re: Using Javascript to change struts-generated forms

Yes, create a custom theme to get out of that table.  css_xhtml may work

immediately.

Potential issues:
- Your current approach is also going to create nodes with duplicate 
ids. This may confuse some browsers badly. At least remove the ID from 
the template
- I'm not sure that order is guaranteed when you have two params with 
the same name at time they are submitted.  Ensure you can't get a 
mismatch between doctype/doc name when uploading multuple files.  ie. 
doctype[1] is associated with docname[0].  It seems vulnerable to 
browser-dependent processing of the form.

You may be safer generating the DOM nodes with JS programmatically 
rather than doing a clone.  That way you'll be able to assign unique 
ID's for each node, add listeners for validation and use array notation 
in your field names to guarantee order for struts eg. doctype[1].

hope that helps,
Jeromy Evans


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Using Javascript to change struts-generated forms

2008-03-20 Thread Allen, Daniel
Hi, all.

I'm working on a form that would allow some arbitrary number of
documents to be uploaded at once. The idea is that by default, one set
of document fields appears, and there's a link that a user can click to
activate some javascript that would add another set of document fields.
I have this basically working. The new fields are named the same as the
old fields, and that works just fine, with Struts automatically making
those into array properties.

My question, though, is how to make it not look horrible. I've included
the JSP below, and as you can see, I have an invisible div that I clone
and insert into the DOM tree before the Submit button. What I want is
for the cloned portion to be added as additional table rows in the table
that Struts creates for the main form. Instead, the cloned portion ends
in a table inside of a single cell in the original form's table. How can
I write the JSP so that the cloned portion fits in nicely? Is this a job
for a new theme? Have I just taken the complete wrong approach?

Thanks,
Dan Allen

__JSP below__

!DOCTYPE html PUBLIC 
-//W3C//DTD XHTML 1.1 Transitional//EN
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;

[EMAIL PROTECTED] prefix=s uri=/struts-tags %

html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
head
titlePolicy Uploads/title
s:head /
%-- The Javascript will simply multiply the HTML code generated
by Struts for us, and the identical fieldnames
 will cause Struts to see the form as working with indexed
properties. 
 See DocumentUploadAction.java --%
script language=JavaScript
var fileCount = 1;
var clonedNode = null;
var insertLoc = null;

function addFileToForm() {
if(fileCount = 5) {
alert(Please upload files in batches of
five or less, in order to maintain reasonable response times.);
return;
}
clonedNode =
document.getElementById('cloneTarget').cloneNode(true);
clonedNode.style.display = ''; // The clone
target has display none; drop that attribute.
insertLoc =
document.getElementById('documentSubmitButton');
insertLoc.parentNode.insertBefore(clonedNode ,
insertLoc);
fileCount = fileCount + 1;
}
/script
/head

body
div id=cloneTarget style=display: none
s:file name=documentFiles label=File/
s:select name=documentTypes label=Type
list=documentTypeChoices/
s:textfield name=documentNames label=Name/ (leave
blank to copy the name from the uploaded file)
/div
s:form id=docsForm method=POST
action=documentUpload_execute enctype=multipart/form-data
s:textfield name=policyId label=Upload for Policy
#/
hr/
s:file name=documentFiles label=File/
s:select name=documentTypes label=Type
list=documentTypeChoices/
s:textfield name=documentNames label=Name/ (leave
blank to copy the name from the uploaded file)
s:submit id=documentSubmitButton/
/s:form
br
hr
a href=javascript:addFileToForm()Click here/a to add more
files to the upload.
/body
/html

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



[S2] Upload file cannot be read

2008-03-18 Thread Allen, Daniel
Can anyone tell me where I can get some more in-depth details on the way
the file upload interceptor works? Is there any documentation between
the levels of how to use it and the source code?

I'm trying to take an uploaded document and then transfer it to a
backend in a different thread. But when I try to access the file in the
other thread, I get a FileNotFoundException. 

My suspicion is that I've transgressed beyond the bounds of the temp
in temp file. Whether that's in terms of time (because the thread
might not start until after the action has run to completion) or just
that one thread cannot access another's temp files, I'm not sure, but
considering the difficulty with reliably reproducing thread timing
issues, I was really hoping there's documentation around.

Thanks for any links/advice.
~Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: property in s:* not interpreted

2008-03-13 Thread Allen, Daniel
I actually thought you couldn't nest s:* tags. You can nest them in
regular HTML tags because the JSP and the HTML are interpreted at
different steps, so from the separate perspectives of the two parsers
there's not really any nesting going on (the JSP parser on the server
only cares about JSP tags, and the HTML parser on the browser only sees
the output).

Perhaps instead you could use an OGNL expression to concatenate the ID
onto the end of a string constant?

~DVA


-Original Message-
From: matthieu martin [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 13, 2008 10:20 AM
To: user@struts.apache.org
Subject: s:property in s:* not interpreted

Hi all !

I have a little issue and I find no clues on the web, so i'm turning
myself
to you.

I have a piece of code like this :


div id=menu_image_galleryss:property value='id'/

  s:property id=s:property value='id'/ value=id/

  s:a theme=ajax href=%{EditImageGallery}
targets=dataImageDivs:property value='id'/Edit/s:a

  s:a theme=ajax href=%{MoveImageGallery}
targets=dataImageDivs:property value='id'/Move/s:a

  s:a theme=ajax href=%{copyImageGallery}
targets=dataImageDivs:property value='id'/Copy/s:a

/div

div id=dataImageDivs:property value='id'/ /



this piece of code is placed in a loop, and creates a small menu for
each
images I have in galleries. The dataImageDiv is used to contain whatever
form I need.

The problem is that my s:property tags contained in my s:a tags
aren't
interpreted. After few manipulations, I observed that the s:property
tag
is interpreted only if it's not contained in a struts tag. For instance
:

div id=dataImageDivs:property value='id'/ /

produces

div id=dataImageDiv1 /

BUT

s:div id=dataImageDivs:property value='id'/ /

produces

div id=dataImageDivs:property value='id'/ /



Thus, my piece of code produces :

div id=menu_image_gallerys1

  1

  s:a theme=ajax href=%{EditImageGallery}
targets=dataImageDivs:property value='id'/Edit/s:a

  s:a theme=ajax href=%{MoveImageGallery}
targets=dataImageDivs:property value='id'/Move/s:a

  s:a theme=ajax href=%{copyImageGallery}
targets=dataImageDivs:property value='id'/Copy/s:a

/div

div id=dataImageDiv1/



As I'm using this in a loop, it's obviously not working, the targets and
the
divs not matching.

This is driving me nuts. Do I do something wrong ? Would you have an
idea ?
The s:head theme=ajax/ is well included in my header.

Thanks in advance,



Matthieu

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



[s2] IndexedProperties set via forms

2008-03-06 Thread Allen, Daniel
Hi, all.

I have a question about using indexed properties. I need to have the
user upload some arbitrary (to be dynamically increased via Javascript
while the user is on the form page) number of files as part of a form. I
figured it makes sense to create an indexed property so that then I have
a ListFile in my action whose elements I can then store as needed. I
can't find anything in the documents about how to get Struts to fill in
indexed properties from forms, though. (Well, plenty of Struts1 results
come up, which is why I assume this is possible, but no Struts2
examples.)

So, the question is: what syntax do I need to use to tell Struts2 that
some form elements will all be part of the same property in the action?
Also, are there any inconsistencies between File upload form elements
and others (aside from the need to have the FileUploadInterceptor on
your stack)?

(I also thought maybe I could just implement RequestAware and then get
them all out of the map, but this seems cleaner if it's possible.)

~Dan Allen



___
The action which would receive the files:
public class DocumentUploadAction extends MidasAction implements
Validateable {

private ListFile docContents = new ArrayListFile();


public void setDocumentFiles(ListFile files) {
this.docContents = files;
}
public ListFile getDocumentFiles() {
return this.docContents;
}

public String execute() {
// Do some stuff with the files.
}
}

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: [s2] IndexedProperties set via forms

2008-03-06 Thread Allen, Daniel
Wow, in the FAQs, even. My Google-fu is miserable.

Thanks/sorry.
~DVA 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 06, 2008 6:02 PM
To: Struts Users Mailing List
Subject: Re: [s2] IndexedProperties set via forms

--- Allen, Daniel [EMAIL PROTECTED] wrote:
 I have a question about using indexed properties. I need to have the
 user upload some arbitrary (to be dynamically increased via Javascript
 while the user is on the form page) number of files as part of a form.
I
 figured it makes sense to create an indexed property so that then I
have
 a ListFile in my action whose elements I can then store as needed. I
 can't find anything in the documents about how to get Struts to fill
in
 indexed properties from forms, though.

http://struts.apache.org/2.x/docs/how-do-we-upload-files.html should
cover
what you're asking here, I believe.

Dave



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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Struts serving both HTML requests and web service?

2008-02-29 Thread Allen, Daniel
Ok, thanks. As long as I know I'm not going in a completely ridiculous
direction, I'll make it work.

~Dan 

-Original Message-
From: Randy Burgess [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 28, 2008 6:18 PM
To: Struts Users Mailing List
Subject: Re: Struts serving both HTML requests and web service?

If you have shared functionality then it sounds like a good candidate
for
web services. I wouldn't do the shared JAR deal.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



 From: Allen, Daniel [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Thu, 28 Feb 2008 16:59:03 -0500
 To: Struts Users Mailing List user@struts.apache.org
 Subject: RE: Struts serving both HTML requests and web service?
 
 Well, the same application is now expected to talk to the public at
 large via a web site and also provide updates about their interactions
 to an internal web site. So, I do need to expose some sort of web
 service. It will actually be different business logic, but it will
refer
 to a lot of the same classes, the same database access, etc. Are you
 saying that you think it would make more sense to just refactor that
 into a separate shared JAR and then have three projects, Struts,
Shared,
 and WebService (possibly running CXF on the last)?
 
 Thanks for the advice,
 ~Dan
 
 -Original Message-
 From: Randy Burgess [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 28, 2008 4:49 PM
 To: Struts Users Mailing List
 Subject: Re: Struts serving both HTML requests and web service?
 
 That thread was about exposing business logic used in a S2 app as web
 services for use in other applications. If you are interested in web
 services then the CXF site is a good place to start. Personally I
 wouldn't
 go to the trouble of creating web services just to use them in an S2
web
 app. 
 
 There is an STP Eclipse plugin that will work with CXF but AFAIK there
 is no
 direct integration between CXF and Struts 1/2.
 
 http://incubator.apache.org/cxf/
 
 Regards,
 Randy Burgess
 Sr. Web Applications Developer
 Nuvox Communications
 
 
 
 From: Allen, Daniel [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Thu, 28 Feb 2008 14:20:54 -0500
 To: Struts Users Mailing List user@struts.apache.org
 Subject: Struts serving both HTML requests and web service?
 
 I saw a thread go by while back about Struts and web services, and
 someone suggested Spring and CXF. I've got Spring integrated into my
 Struts (2.0.11) application, but I'm not familiar with CXF at all,
nor
 have I actually ever put together a web service before.
 
 Does anyone know of a good guide to integrating those, or an example?
 Is
 there a CXF struts plugin? I mostly need the really basic stuff, like
 the result type for a struts action that would be accessed as a web
 service. (Or should I just have a separate servlet running on the
same
 server?)
 
 I know this is a very general question, but anything will help.
 Thanks,
 ~Dan
 
 -- 
 This message may contain confidential, proprietary, or legally
 privileged
 information. No confidentiality or privilege is waived by any
 transmission to
 an unintended recipient. If you are not an intended recipient, please
 notify
 the sender and delete this message immediately. Any views expressed
in
 this
 message are those of the sender, not those of any entity within the
 KBC
 Financial Products group of companies (together referred to as KBC
 FP).
 
 This message does not create any obligation, contractual or
otherwise,
 on the
 part of KBC FP. It is not an offer (or solicitation of an offer) of,
 or a
 recommendation to buy or sell, any financial product. Any prices or
 other
 values included in this message are indicative only, and do not
 necessarily
 represent current market prices, prices at which KBC FP would enter
 into a
 transaction, or prices at which similar transactions may be carried
on
 KBC
 FP's own books. The information contained in this message is provided
 as is,
 without representations or warranties, express or implied, of any
 kind. Past
 performance is not indicative of future returns.
 
 
 
 
 This email and any attachments (Message) may contain legally
 privileged and/or confidential information.  If you are not the
 addressee, or if this Message has been addressed to you in error, you
 are not authorized to read, copy, or distribute it, and we ask that
you
 please delete it (including all copies) and notify the sender by
return
 email.  Delivery of this Message to any person other than the intended
 recipient(s) shall not be deemed a waiver of confidentiality and/or a
 privilege.
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -- 
 This message may contain confidential, proprietary, or legally
privileged
 information. No confidentiality or privilege is waived by any

Struts serving both HTML requests and web service?

2008-02-28 Thread Allen, Daniel
I saw a thread go by while back about Struts and web services, and
someone suggested Spring and CXF. I've got Spring integrated into my
Struts (2.0.11) application, but I'm not familiar with CXF at all, nor
have I actually ever put together a web service before. 

Does anyone know of a good guide to integrating those, or an example? Is
there a CXF struts plugin? I mostly need the really basic stuff, like
the result type for a struts action that would be accessed as a web
service. (Or should I just have a separate servlet running on the same
server?)

I know this is a very general question, but anything will help.
Thanks,
~Dan

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.



RE: Struts serving both HTML requests and web service?

2008-02-28 Thread Allen, Daniel
Well, the same application is now expected to talk to the public at
large via a web site and also provide updates about their interactions
to an internal web site. So, I do need to expose some sort of web
service. It will actually be different business logic, but it will refer
to a lot of the same classes, the same database access, etc. Are you
saying that you think it would make more sense to just refactor that
into a separate shared JAR and then have three projects, Struts, Shared,
and WebService (possibly running CXF on the last)?

Thanks for the advice,
~Dan

-Original Message-
From: Randy Burgess [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 28, 2008 4:49 PM
To: Struts Users Mailing List
Subject: Re: Struts serving both HTML requests and web service?

That thread was about exposing business logic used in a S2 app as web
services for use in other applications. If you are interested in web
services then the CXF site is a good place to start. Personally I
wouldn't
go to the trouble of creating web services just to use them in an S2 web
app. 

There is an STP Eclipse plugin that will work with CXF but AFAIK there
is no
direct integration between CXF and Struts 1/2.

http://incubator.apache.org/cxf/

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



 From: Allen, Daniel [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List user@struts.apache.org
 Date: Thu, 28 Feb 2008 14:20:54 -0500
 To: Struts Users Mailing List user@struts.apache.org
 Subject: Struts serving both HTML requests and web service?
 
 I saw a thread go by while back about Struts and web services, and
 someone suggested Spring and CXF. I've got Spring integrated into my
 Struts (2.0.11) application, but I'm not familiar with CXF at all, nor
 have I actually ever put together a web service before.
 
 Does anyone know of a good guide to integrating those, or an example?
Is
 there a CXF struts plugin? I mostly need the really basic stuff, like
 the result type for a struts action that would be accessed as a web
 service. (Or should I just have a separate servlet running on the same
 server?)
 
 I know this is a very general question, but anything will help.
 Thanks,
 ~Dan
 
 -- 
 This message may contain confidential, proprietary, or legally
privileged
 information. No confidentiality or privilege is waived by any
transmission to
 an unintended recipient. If you are not an intended recipient, please
notify
 the sender and delete this message immediately. Any views expressed in
this
 message are those of the sender, not those of any entity within the
KBC
 Financial Products group of companies (together referred to as KBC
FP).
 
 This message does not create any obligation, contractual or otherwise,
on the
 part of KBC FP. It is not an offer (or solicitation of an offer) of,
or a
 recommendation to buy or sell, any financial product. Any prices or
other
 values included in this message are indicative only, and do not
necessarily
 represent current market prices, prices at which KBC FP would enter
into a
 transaction, or prices at which similar transactions may be carried on
KBC
 FP's own books. The information contained in this message is provided
as is,
 without representations or warranties, express or implied, of any
kind. Past
 performance is not indicative of future returns.
 



This email and any attachments (Message) may contain legally
privileged and/or confidential information.  If you are not the
addressee, or if this Message has been addressed to you in error, you
are not authorized to read, copy, or distribute it, and we ask that you
please delete it (including all copies) and notify the sender by return
email.  Delivery of this Message to any person other than the intended
recipient(s) shall not be deemed a waiver of confidentiality and/or a
privilege.

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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided

RE: Need Help Creating a Custom Validator

2008-02-27 Thread Allen, Daniel
Try this:
http://opensource.atlassian.com/confluence/oss/download/attachments/4942
/validating-input.pdf?version=3

Basically, all you need to do for custom or complex validation is to
have the action in question implement Validateable, and then have a
public void validate() method that makes calls to
addActionError(String). Also check out the built-in validators that you
can apply with annotations. They're a real time-saver for simple
validations.

Is this what you were talking about?
~Dan

-Original Message-
From: Mano Dasanayaka [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 26, 2008 11:00 PM
To: 'Struts Users Mailing List'
Cc: [EMAIL PROTECTED]; 'Mano Dasanayaka'
Subject: Need Help Creating a Custom Validator

Hi all,

Can any one suggest me a good article that describes adding a custom
validator and how to configure.  Sample code along with required
configurations is also appreciated.

Thanks In Advance.

Mano

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



[s2] Validation, but not the first time

2008-02-22 Thread Allen, Daniel
I've set up a login page for my site, and I've used the ValidationAware
interface on LoginAction in order to display errors on the login form
when the user name or password is incorrect. However, this has one
unintended result: the first time the user navigates to
server.com/webapp/login.action, the page already displays errors for
missing fields. 

Is there a way to prevent the validation from firing unless the user is
coming back to it after attempting to log in? My first thought is to
have another action defined in struts.xml, whose result would just be a
redirect to login.jsp, but it seems like there should be a solution that
doesn't introduce extra actions into the config. (In general, it's a
personal preference to keep XML files as small and simple as possible.)

Thanks,
~Dan Allen

struts.xml excerpt: 
 action name=login class=loginAction !-- class is
instantiated by Spring, hence no qualified classname --
result name=input/jsp/login.jsp/result
result
name=success/jsp/redirect.jsp/result
/action

LoginAction.java

@SuppressWarnings(unchecked)
public class LoginAction extends ActionSupport implements
ValidationAware, Validateable, SessionAware {

private String userName = null;
private String password = null;
private String redirectDesintation = null;

public LoginChecker loginChecker = null;

private Map sessionAttributes = null;

@RequiredStringValidator(message=A valid user name is required
to log in.)
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserName() {
return this.userName;
}

@RequiredStringValidator(message=You must enter your password
to log in.)
public void setPassword(String password) {
this.password = password;
}
public String getPassword() {
return this.password;
}

// For Spring to provide us with the appropriate implementation.
public void setLoginChecker(LoginChecker checker) {
this.loginChecker = checker;
}


@Override
public void setSession(Map sessionAttributes) {
this.sessionAttributes = sessionAttributes;
}   


public String execute() {
// If we made it past the validation, then there's
really nothing else to do except
// send the user on to wherever s/he was going, via the
JSP.
// If we don't know where s/he was going, default to the
index.
if(redirectDesintation == null ||
redirectDesintation.equals())
redirectDesintation = index.action;

return SUCCESS;
}

@Override
public void validate() {
User result = loginChecker.checkLogin(userName,
password);
// If log-in failed, add the action error
if(result == null) {
addActionError(The submitted user name and
password combination was invalid.);
}
// If it succeeded, set the User object in the session.
else {

sessionAttributes.put(MidasUtils.USER_IN_SESSION, result);
}
}
}

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: [s2] Validation, but not the first time

2008-02-22 Thread Allen, Daniel
Yeah, I know, my spelling is terrible in code. All I can say in my
defense is that I go back and fix it with Eclipse's refactoring tools at
the end, before anyone else at the company has to see it. That doesn't
save you poor souls on the user list who are subjected to my interim
incompetence, though.

The reason I had the action created by Spring was that it has one field
that's populated by Spring: 
beans
bean id=loginChecker
class=com.kbcfp.midas.security.TokenDemoLoginChecker
singleton=true/

bean id=loginAction
class=com.kbcfp.midas.action.LoginAction singleton=false
property name=loginCheckerref local=loginChecker
//property
/bean
/beans 

I guess I could manually call Spring from Java code to fill in the
log-in checker class, but this way I can keep Spring entirely out of my
code's [direct] dependencies, which helps keep the Maven POM down to a
manageable size. If there's a simpler way to tell Struts to use Spring
on certain of an action's properties, feel free to enlighten me. I've
been doing Struts with Spring for a week, so I'm not set in my ways just
yet.

--[BACK ON TOPIC]--
The wildcard worked like a charm. I changed the struts.xml to the
following:

action name=login_* class=loginAction method={1}
result name=input/jsp/login.jsp/result
result name=success/jsp/redirect.jsp/result
/action

and changed the form action in the JSP to go to login_execute, and it
didn't even require any more Java code. 

Thanks!
~Dan




--- Allen, Daniel [EMAIL PROTECTED] wrote:
 Is there a way to prevent the validation from firing unless the user
is
 coming back to it after attempting to log in? 

By default the validation interceptor won't check a set of action
methods,
including the input method. The easiest thing, IMO, is to create an
action
mapping for the action that specifies the method. One way to avoid
creating
an additional XML mapping is to use wildcarding.

 struts.xml excerpt: 
action name=login class=loginAction !-- class is
 instantiated by Spring, hence no qualified classname --

Declaring the action as a spring bean is optional, depending on how
you're
wiring things, but I'm guessing you already knew that one.

   result name=input/jsp/login.jsp/result
   result
 name=success/jsp/redirect.jsp/result

If everything is behind S2 then this is an un-necessary complication,
but I
don't know how your app is set up. Just FYI.

 @SuppressWarnings(unchecked)
 public class LoginAction extends ActionSupport implements
 ValidationAware, Validateable, SessionAware {

FYI, ActionSupport already implements ValidationAware and Validateable.

   private String userName = null;

null is the default, uninitialized value for member variables.

   if(redirectDesintation == null ||

Spelling :p

Dave

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Looping in Struts2

2008-02-22 Thread Allen, Daniel
You mean in JSPs, using the Struts taglib? There's an example that I
think is similar to what you're looking for at the bottom of the
s:iterator page[1]. For large n, it would be sort of ugly, though, so
definitely look into c:foreach like Dave said if you're going past
single-digit n.

~Dan Allen

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

-Original Message-
From: Jaarthy [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 22, 2008 4:52 PM
To: user@struts.apache.org
Subject: Looping in Struts2


Hello,

Is there any way in Struts2 to display values from i=1 to n.
Any help on this please?

Thanks,
Aarthy

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Redirecting to somewhere determined by previous page's parameters

2008-02-22 Thread Allen, Daniel
Hi, all.

I want to redirect a user somewhere based on a parameter that came in
from a previous page's form. The basic flow should be:

1. StartPage.jsp, contains a form that points to an SomeAction, and that
form includes the parameter NextPage
2. SomeAction performs some work and then gives back the result
RedirectPage.jsp
3. RedirectPage.jsp accesses the NextPage parameter that was given by
the form from StartPage.jsp.

Now, I know that you can use % response.sendRedirect(urlString); %
to send a redirect from a JSP, and I know that you can use OGNL to
access an action's properties a la s:property value=nextPage/ if
there's a method SomeAction.getNextPage(), but the two syntaxes aren't
compatible, so I'm not sure how to mix the two and get what I want.

Any ideas? Also, sorry if this is completely obvious to someone more
familiar with JSPs than I am.
Thanks in advance,
~Dan Allen


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: reflect.InvocationTargetException

2008-02-21 Thread Allen, Daniel
I've seen similar things working with other programs than Struts, but it
might be relevant to you. Reflection frameworks tend to give back null
rather than an exception when the method in question isn't found, so go
back and check for typos in your XML where you specify any method names.

Can't say with any more certainty than that without seeing code
(although I'm sort of new at Struts, so I might not be able to say with
any more certainty regardless :)

~Dan Allen

-Original Message-
From: Richard Sayre [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 20, 2008 9:51 AM
To: Struts Users Mailing List
Subject: reflect.InvocationTargetException

Hi All,

I am getting the following error in my Struts 2 application.   class
java.lang.reflect.InvocationTargetException : null

None of my classes are showing up in the stack trace.  But it is
happening at the same spot in my application.

Has anyone encountered this before?  Any suggestons on how to fix this?

Here is the beginning of the stack trace:

sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActi
onInvocation.java:404)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(Default
ActionInvocation.java:267)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:229)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInterce
pt(DefaultWorkflowInterceptor.java:221)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:221)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Vali
dationInterceptor.java:150)
org.apache.struts2.interceptor.validation.AnnotationValidationIntercepto
r.doIntercept(AnnotationValidationInterceptor.java:48)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:224)
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:223)
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)

Thank you,

Rich

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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Extending interceptor stacks

2008-02-21 Thread Allen, Daniel
Is there a way to have one interceptor stack defined in terms of
another? I created a log-in interceptor to check if a user is logged in
and redirect him/her to the log-in page if not, and it will be applied
to almost all pages, but there will be a few (index, etc.) that would
not need that. However, most other pages use the same basic
interceptors, just not the log-in one. So, given the below, is there a
way to change it so that it's two stacks, one missing the log-in, and
the other only declaring its parent and adding the log-in?

interceptor-stack name=defaultLoginStack
  interceptor-ref name=params /
  interceptor-ref name=login /
  interceptor-ref name=prepare /
  interceptor-ref name=fileUpload /
  interceptor-ref name=conversionError /
  interceptor-ref name=validation /
/interceptor-stack


I'm guessing it's not, since I didn't see anything that seemed likely in
the struts.xml documentation page,[1] but I thought I'd ask and make
sure, or find out if there's some non-XML way of doing an equivalent.
(Or possibly if there's a reason I shouldn't be doing this in the first
place?)

Thanks,
~Dan Allen

[1]http://struts.apache.org/2.x/docs/strutsxml-examples.html

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



[s2] Forward directly to JSP w/o processing

2008-02-13 Thread Allen, Daniel
Hi.

I have a few places in my web app where a URL goes to a page that is
more or less static. We still use JSPs for these static pages, since
we're looking to use Tiles to re-use header/footer code and so on.
Currently, though, my attempts to get Struts2 are just yielding no
response on the server, and I was wondering if perhaps this was because
I needed to do something else to describe the action for Struts to take.
If the below is incorrect, how can I forward a URL directly to a JSP
without any Action class in between? (I assume this must be possible,
since a) it was in Struts1, and b) 'class' is an option attribute for
action.)

Thanks for looking, 
~Dan Allen

___
My struts.xml:
struts
include file=struts-default.xml/

constant name=struts.devMode value=true /
constant name=struts.action.extension value=do /

package name=insurancederiv extends=struts-default

result-types
result-type name=tiles
class=org.apache.struts2.views.tiles.TilesResult/
/result-types

action name=home
result name=success
type=tileshome/result
/action

/package
/struts
_
My tiles-defs.xml:
tiles-definitions

definition name=home template=/home.jsp/

/tiles-definitions

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: [OT] RE: Beging in Strust 2 with Jdeveloper 10.1.3

2008-02-13 Thread Allen, Daniel
Have you, in fact, added the struts2 filter to your web.xml?

If not, drop the following in:
filter
filter-namestruts2/filter-name

filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-cla
ss
/filter

filter-mapping
filter-namestruts2/filter-name
url-pattern/*/url-pattern
/filter-mapping

~Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Logic tag library

2008-02-13 Thread Allen, Daniel
Is there any reason we shouldn't use the Logic tab library
(http://struts.apache.org/tags-logic) with Struts 2? If so, is there any
subsitute? I'm looking specifically for logic:redirect and
logic:messagesPresent (along with the old html: messages)

~Dan Allen

-Original Message-
From: Zheng, Xiahong [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 13, 2008 2:55 PM
To: Struts Users Mailing List
Subject: RE: [S2] : Help with annotated validation

That's indeed what I am missing. Thanks for your prompt help. 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 13, 2008 2:48 PM
To: Struts Users Mailing List
Subject: Re: [S2] : Help with annotated validation

--- Zheng, Xiahong [EMAIL PROTECTED] wrote:
 My annotated validation doesn't happen. The following are the code
 snippets for action class and config files. When I leave the SSN field
 blank and hit submit my action's execute method is called hence fails
 instead of redisplay of the login page again with validation error
 message. What am I missing here? 
 [...]
 action name=login class=my.pacakge.LoginAction
   resulthome/result
   result name=failedloginError/result
   interceptor-ref name=autowiring/
   interceptor-ref name=params/
   interceptor-ref name=validate/
   interceptor-ref name=workflow/
 /action

Do you have an input result defined?

If you have logging turned up you should see a reference to the
inability to
find an input result, which is where the workflow interceptor will
go to
when there are validation errors.

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]


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Logic tag library

2008-02-13 Thread Allen, Daniel
Keeping logic: tags actually renders perfectly well for me right now
(no exceptions, no apparent problems with the resulting page), but with
peculiar results for the actual logic it's supposed to be doing, so I
wasn't sure whether that was a configuration issue making it not
evaluate correctly, or a Struts1 configuration relic making it still
quasi-functional. I suppose the latter, then.

I didn't see the previous answer about MessagesPresent, but sometimes we
have brief e-mail outages here, so thanks for bearing with me (whether
that's our IT or just my fault).
~Dan



-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 13, 2008 3:36 PM
To: Struts Users Mailing List
Subject: Re: Logic tag library

--- Allen, Daniel [EMAIL PROTECTED] wrote:
 Is there any reason we shouldn't use the Logic tab library
 (http://struts.apache.org/tags-logic) with Struts 2? 

Because it won't work.

 If so, is there any subsitute?
 I'm looking specifically for logic:redirect and
 logic:messagesPresent (along with the old html: messages)

I thought I already answered the logic:messagesPresent.../ question:
expose
ActionSupport's ValidationAware stuff related to whether or not there
are
messages. AFAIK there is pre-built tag support for this, but it's a
simple
s:if... with exposed ValidationAware booleans.

W.r.t. html:messages/ see the s:actionerror.../ and
s:actionmessage.../
tags [1, 2]. The tag reference page [3] may also be of interest.

Not sure why the rest of the hijacked thread is still here; is it
related
somehow?

Dave

[1] http://struts.apache.org/2.x/docs/actionerror.html
[2] http://struts.apache.org/2.x/docs/actionmessage.html
[3] http://struts.apache.org/2.x/docs/tag-reference.html

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
Great. Thanks! 

-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 5:14 PM
To: Struts Users Mailing List
Subject: RE: Source for Struts Tiles Plugin?

--- Allen, Daniel [EMAIL PROTECTED] wrote:
 I downloaded this source code, but it's just the main Struts core, as
 far as I can tell. That's been helpful, but there are still gaps where
 control is passed to the Struts Tiles plug-in. 

http://svn.apache.org/viewvc/struts/struts2/tags/STRUTS_2_0_6/plugins/ti
les/

 Does anyone know where the source for the plug-in is? 
 
 I've hit a total dead-end on the Apache site:
 http://struts.apache.org/2.0.6/index.html
 Click Plugin Registry: http://cwiki.apache.org/S2PLUGINS/home.html
 Click Tiles Plugin:
http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
 And then I end up here:
 http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
 That has a link labelled downloads, but it just takes me back to the
 main Struts Downloads page in a loop. Honestly, in order to even get
the
 jar in the first place, I had to cheat and get Maven to download it
 for me from a repository, but those don't keep the source. 
 
 I also tried another path, and ended up in a framework site of
 documentation headers. That has this page:

http://struts.apache.org/struts-sandbox/tiles/tiles-api/source-repositor
 y.html
 But the URL its gives for the SVN repository responds with a 404.
 
 Does anyone know a valid URL for the SVN repository, or a link to a
 ZIP/TAR/whatever file?
 
 ~DVA
 
 
 -Original Message-
 From: Dave Newton [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, February 12, 2008 2:51 PM
 To: Struts Users Mailing List
 Subject: RE: Source for Struts Tiles Plugin?
 
 See http://struts.apache.org/dev/builds.html; releases are under
 /tags/STRUTS_2_n_n:
 
 Source distros are also available, see
 http://struts.apache.org/download.cgi
 and follow the archive link http://archive.apache.org/dist/struts/. I
 believe
 there is a S2.0.9 source distro there.
 
 Dave
 
 --- Allen, Daniel [EMAIL PROTECTED] wrote:
 
  PS: I'm looking for v2.0.9 specifically, if that makes any
difference.
  
  -Original Message-
  From: Allen, Daniel 
  Sent: Tuesday, February 12, 2008 2:44 PM
  To: Struts Users Mailing List
  Subject: Source for Struts Tiles Plugin?
  
  Hi. I'm trying to move a web app from Struts1/Tiles1 to
 Struts2/Tiles2.
  Unsurprisingly, quite a few things are going wrong.
  
  In particular, I have a tiles-def.xml file in WEB-INF/classes, and
 it's
  not being picked up, or at least not being read properly. I was able
 to
  trace through the definitions loading up to a point, and see that
the
  correct file path is being given to
  ServletTilesApplicationContext.getResource(), but within that method
  there's a call to servletContext.getResource() which goes into the
  ConfiguredServletContext class. That class is part of the Struts
Tiles
  Plugin jar, and I don't have the source to step inside and see what
  specifically is going wrong.  So, if anyone could give me a SVN or
CVS
  command or provide a link to download the source, that would really
  help.
  
  Thanks,
  ~Dan Allen
  
  -- 
  This message may contain confidential, proprietary, or legally
 privileged
  information. No confidentiality or privilege is waived by any
 transmission
  to an unintended recipient. If you are not an intended recipient,
 please
  notify the sender and delete this message immediately. Any views
 expressed
  in this message are those of the sender, not those of any entity
 within the
  KBC Financial Products group of companies (together referred to as
 KBC
  FP). 
  
  This message does not create any obligation, contractual or
otherwise,
 on
  the part of KBC FP. It is not an offer (or solicitation of an offer)
 of, or
  a recommendation to buy or sell, any financial product. Any prices
or
 other
  values included in this message are indicative only, and do not
 necessarily
  represent current market prices, prices at which KBC FP would enter
 into a
  transaction, or prices at which similar transactions may be carried
on
 KBC
  FP's own books. The information contained in this message is
provided
 as
  is, without representations or warranties, express or implied, of
any
  kind. Past performance is not indicative of future returns.
  
  
 
-
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -- 
 This message may contain confidential, proprietary, or legally
privileged
 information. No confidentiality or privilege is waived by any
transmission
 to an unintended recipient. If you are not an intended recipient,
please
 notify the sender and delete this message immediately. Any views
expressed

RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
Dave: 

I downloaded this source code, but it's just the main Struts core, as
far as I can tell. That's been helpful, but there are still gaps where
control is passed to the Struts Tiles plug-in. 

Does anyone know where the source for the plug-in is? 

I've hit a total dead-end on the Apache site:
http://struts.apache.org/2.0.6/index.html
Click Plugin Registry: http://cwiki.apache.org/S2PLUGINS/home.html
Click Tiles Plugin: http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
And then I end up here:
http://cwiki.apache.org/S2PLUGINS/tiles-plugin.html
That has a link labelled downloads, but it just takes me back to the
main Struts Downloads page in a loop. Honestly, in order to even get the
jar in the first place, I had to cheat and get Maven to download it
for me from a repository, but those don't keep the source. 

I also tried another path, and ended up in a framework site of
documentation headers. That has this page:
http://struts.apache.org/struts-sandbox/tiles/tiles-api/source-repositor
y.html
But the URL its gives for the SVN repository responds with a 404.

Does anyone know a valid URL for the SVN repository, or a link to a
ZIP/TAR/whatever file?

~DVA


-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 2:51 PM
To: Struts Users Mailing List
Subject: RE: Source for Struts Tiles Plugin?

See http://struts.apache.org/dev/builds.html; releases are under
/tags/STRUTS_2_n_n:

Source distros are also available, see
http://struts.apache.org/download.cgi
and follow the archive link http://archive.apache.org/dist/struts/. I
believe
there is a S2.0.9 source distro there.

Dave

--- Allen, Daniel [EMAIL PROTECTED] wrote:

 PS: I'm looking for v2.0.9 specifically, if that makes any difference.
 
 -Original Message-
 From: Allen, Daniel 
 Sent: Tuesday, February 12, 2008 2:44 PM
 To: Struts Users Mailing List
 Subject: Source for Struts Tiles Plugin?
 
 Hi. I'm trying to move a web app from Struts1/Tiles1 to
Struts2/Tiles2.
 Unsurprisingly, quite a few things are going wrong.
 
 In particular, I have a tiles-def.xml file in WEB-INF/classes, and
it's
 not being picked up, or at least not being read properly. I was able
to
 trace through the definitions loading up to a point, and see that the
 correct file path is being given to
 ServletTilesApplicationContext.getResource(), but within that method
 there's a call to servletContext.getResource() which goes into the
 ConfiguredServletContext class. That class is part of the Struts Tiles
 Plugin jar, and I don't have the source to step inside and see what
 specifically is going wrong.  So, if anyone could give me a SVN or CVS
 command or provide a link to download the source, that would really
 help.
 
 Thanks,
 ~Dan Allen
 
 -- 
 This message may contain confidential, proprietary, or legally
privileged
 information. No confidentiality or privilege is waived by any
transmission
 to an unintended recipient. If you are not an intended recipient,
please
 notify the sender and delete this message immediately. Any views
expressed
 in this message are those of the sender, not those of any entity
within the
 KBC Financial Products group of companies (together referred to as
KBC
 FP). 
 
 This message does not create any obligation, contractual or otherwise,
on
 the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or
 a recommendation to buy or sell, any financial product. Any prices or
other
 values included in this message are indicative only, and do not
necessarily
 represent current market prices, prices at which KBC FP would enter
into a
 transaction, or prices at which similar transactions may be carried on
KBC
 FP's own books. The information contained in this message is provided
as
 is, without representations or warranties, express or implied, of any
 kind. Past performance is not indicative of future returns.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do

RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
Actually, after all that, it turned out to be a stupid typo: my
context-param for DEFINITION_CONFIG pointed to tiles-def.xml and the
file was titlted tiles-defs.xml...

Thanks for the source link, though. That will no doubt continue to help.

~Dan Allen


-Original Message-
From: Lukasz Lenart [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 12, 2008 2:53 PM
To: Struts Users Mailing List
Subject: Re: Source for Struts Tiles Plugin?

Hi,

By default, Tiles2 use tiles.xml, you can add additional config files
via DEFINITIONS_CONFIG -
http://tiles.apache.org/config-reference.html
Please check also DTD for tiles.xml, it was changed.


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
PS: I'm looking for v2.0.9 specifically, if that makes any difference.

-Original Message-
From: Allen, Daniel 
Sent: Tuesday, February 12, 2008 2:44 PM
To: Struts Users Mailing List
Subject: Source for Struts Tiles Plugin?

Hi. I'm trying to move a web app from Struts1/Tiles1 to Struts2/Tiles2.
Unsurprisingly, quite a few things are going wrong.

In particular, I have a tiles-def.xml file in WEB-INF/classes, and it's
not being picked up, or at least not being read properly. I was able to
trace through the definitions loading up to a point, and see that the
correct file path is being given to
ServletTilesApplicationContext.getResource(), but within that method
there's a call to servletContext.getResource() which goes into the
ConfiguredServletContext class. That class is part of the Struts Tiles
Plugin jar, and I don't have the source to step inside and see what
specifically is going wrong.  So, if anyone could give me a SVN or CVS
command or provide a link to download the source, that would really
help.

Thanks,
~Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Source for Struts Tiles Plugin?

2008-02-12 Thread Allen, Daniel
Hi. I'm trying to move a web app from Struts1/Tiles1 to Struts2/Tiles2.
Unsurprisingly, quite a few things are going wrong.

In particular, I have a tiles-def.xml file in WEB-INF/classes, and it's
not being picked up, or at least not being read properly. I was able to
trace through the definitions loading up to a point, and see that the
correct file path is being given to
ServletTilesApplicationContext.getResource(), but within that method
there's a call to servletContext.getResource() which goes into the
ConfiguredServletContext class. That class is part of the Struts Tiles
Plugin jar, and I don't have the source to step inside and see what
specifically is going wrong.  So, if anyone could give me a SVN or CVS
command or provide a link to download the source, that would really
help.

Thanks,
~Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.



RE: Basic setup question (tiles 2)

2008-02-11 Thread Allen, Daniel
I replaced the dependency I had before with the dependency you gave, but
Maven's generated /lib directory still does not contain tiles-jsp.jar,
and the error message has not changed:


javax.servlet.ServletException: The absolute uri:
http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml
or the jar files deployed with this application

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:5
18)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:421)

org.apache.jasper.JasperException: The absolute uri:
http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml
or the jar files deployed with this application

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
tWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:375)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletD
ispatcherResult.java:139)

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:178)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:343)
.
.
.

Is that the correct URI? Is there some setup or XML file somewhere that
I need to edit before I can drop %@ taglib
uri=http://tiles.apache.org/tags-tiles; prefix=tiles % into my JSP
files and expect it to work?

~Dan Allen

-Original Message-
From: Lukasz Lenart [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 11, 2008 2:41 PM
To: Struts Users Mailing List
Subject: Re: Basic setup question (tiles 2)

It is better to add dependency for Tiles plugin, it will download all
needed jars for you:

dependency
groupIdorg.apache.struts/groupId
artifactIdstruts2-tiles-plugin/artifactId
version2.0.9/version
/dependency

Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Struts 2 equivalents?

2008-02-11 Thread Allen, Daniel
Hey.

I have to convert an application written with Struts and Tiles 1 to 2.
Could anyone tell me what the Struts2 equivalents for some of the old
Struts1 tag libraries are? 

I'm looking specifically for 
http://struts.apache.org/tags-html and 
http://struts.apache.org/tags-logic

Unfortunately, Google just brings me a lot of pages from Struts 1
documentation...
~DVA

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Basic setup question (tiles 2)

2008-02-11 Thread Allen, Daniel
Nevermind, I found the proper XML for the tiles-jsp jar. I'm curious as
to what exactly is in the plugin jar that you suggested, though. Is that
necessary to use Tiles 2 with Struts 2?

~Dan 

-Original Message-
From: Allen, Daniel 
Sent: Monday, February 11, 2008 2:53 PM
To: Struts Users Mailing List
Subject: RE: Basic setup question (tiles 2)

I replaced the dependency I had before with the dependency you gave, but
Maven's generated /lib directory still does not contain tiles-jsp.jar,
and the error message has not changed:


javax.servlet.ServletException: The absolute uri:
http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml
or the jar files deployed with this application

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:5
18)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:421)

org.apache.jasper.JasperException: The absolute uri:
http://tiles.apache.org/tags-tiles cannot be resolved in either web.xml
or the jar files deployed with this application

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
tWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:375)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletD
ispatcherResult.java:139)

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:178)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:343)
.
.
.

Is that the correct URI? Is there some setup or XML file somewhere that
I need to edit before I can drop %@ taglib
uri=http://tiles.apache.org/tags-tiles; prefix=tiles % into my JSP
files and expect it to work?

~Dan Allen

-Original Message-
From: Lukasz Lenart [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 11, 2008 2:41 PM
To: Struts Users Mailing List
Subject: Re: Basic setup question (tiles 2)

It is better to add dependency for Tiles plugin, it will download all
needed jars for you:

dependency
groupIdorg.apache.struts/groupId
artifactIdstruts2-tiles-plugin/artifactId
version2.0.9/version
/dependency

Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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


-- 
This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided as is, without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.


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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without

RE: Struts 2 equivalents?

2008-02-11 Thread Allen, Daniel
One more specific replacement question. In the Struts 1 app, we had some
actions that had no class, but simply forwarded to largely static JSPs:
action path=/home forward=/home.jsp /. 

In my new struts.xml, I tried: 
action name=home
result name=success type=tileshome.jsp/result
/action

(I've changed my struts.properties to make the suffix .do instead of
.action) When I try to go to localhost/appcontextname/home.do, I get the
following:
javax.servlet.ServletException: home.jsp

org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:5
18)

org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher
.java:421)
root cause

org.apache.tiles.definition.NoSuchDefinitionException: home.jsp

org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav
a:392)

org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.jav
a:368)

org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:10
4)

org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSu
pport.java:178)

com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:343)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:248)

com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doInterce
pt(DefaultWorkflowInterceptor.java:213)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:219)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:218)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:216)

com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(Vali
dationInterceptor.java:150)

org.apache.struts2.interceptor.validation.AnnotationValidationIntercepto
r.doIntercept(AnnotationValidationInterceptor.java:48)

com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(Me
thodFilterInterceptor.java:86)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:219)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:218)

com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerS
tack.java:455)

com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:216)

com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept
(ConversionErrorInterceptor.java:123)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:219)

com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultAct
ionInvocation.java:218)
.
.
.

Any ideas? It may well be something besides my struts.xml, but I didn't
want to just copy my entire webapp to the e-mail, so I took a guess. If
you think it's something else, I'll be happy to add more files'
contents.

Thanks
~Dan Allen

-Original Message-
From: Allen, Daniel 
Sent: Monday, February 11, 2008 5:08 PM
To: Struts Users Mailing List
Subject: RE: Struts 2 equivalents?

Ok, I found some documents that partly answer my question. However, I'm
still looking for a Struts2 equivalent to the old
logic:messagesPresent tag. Do we just use s:if with some special
test code now? 

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Struts 2 equivalents?

2008-02-11 Thread Allen, Daniel
Ok, I found some documents that partly answer my question. However, I'm
still looking for a Struts2 equivalent to the old
logic:messagesPresent tag. Do we just use s:if with some special
test code now? 

-Original Message-
From: Allen, Daniel 
Sent: Monday, February 11, 2008 3:48 PM
To: Struts Users Mailing List
Subject: Struts 2 equivalents?

Hey.

I have to convert an application written with Struts and Tiles 1 to 2.
Could anyone tell me what the Struts2 equivalents for some of the old
Struts1 tag libraries are? 

I'm looking specifically for 
http://struts.apache.org/tags-html and 
http://struts.apache.org/tags-logic

Unfortunately, Google just brings me a lot of pages from Struts 1
documentation...
~DVA

-- 
This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided as is, without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.


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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



RE: Basic setup question (tiles 2)

2008-02-11 Thread Allen, Daniel
No, I hadn't seen that. Thanks for pointing me to a useable tutorial
site. You have no idea how hard it is to find Struts 2 or Tiles 2
information in Google, since every Struts 1 and Tiles 1 page on
apache.org has a little text link to the new version that make the
search think it's relevant to the second version. I feel like just
getting started is always the hardest part of these things, because you
don't even know where the documents are, and your questions are too
general for a meaningful query.

Thanks,
~Dan

-Original Message-
From: Lukasz Lenart [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 11, 2008 4:28 PM
To: Struts Users Mailing List
Subject: Re: Basic setup question (tiles 2)

Did you follow docs configuration as in
http://struts.apache.org/2.x/docs/tiles-plugin.html ?


Regards
-- 
Lukasz

http://www.linkedin.com/in/lukaszlenart

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


-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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



Basic setup question (tiles 2)

2008-02-11 Thread Allen, Daniel
Hi. 

I'm completely new at Struts and Tiles, but was given the task of
converting an app that relied on the first versions of those to the the
newer version.

We build with Maven 2, and as instructed by the documentation at
http://tiles.apache.org/dev/snapshots.html, I added 

dependency
groupIdorg.apache.struts.tiles/groupId
artifactIdtiles-core/artifactId
version2.0-SNAPSHOT/version
/dependency

To my pom.xml file. This downloaded tiles-api.jar and tiles-core.jar.
However, at http://tiles.apache.org/migration/index.html, it says that
there are three jars needed (tiles-jsp.jar being the third). When I try
to access a site, I get an exception that
http://tiles.apache.org/tags-tiles; was not found, and it seems likely
that the missing JSP jar is the cause. Can anyone tell me where I can
find that jar, and what I need to give Maven as a dependency? I tried
copying the above and replacing the artifact ID with tiles-jar but
that gave me an error saying that the artifact was not found in the
repositor (which is set as per the snapshots link above).

Does anyone know what the dependency for tiles-jsp.jar is?

Thanks,
~Dan Allen

-- 
This message may contain confidential, proprietary, or legally privileged 
information. No confidentiality or privilege is waived by any transmission to 
an unintended recipient. If you are not an intended recipient, please notify 
the sender and delete this message immediately. Any views expressed in this 
message are those of the sender, not those of any entity within the KBC 
Financial Products group of companies (together referred to as KBC FP). 

This message does not create any obligation, contractual or otherwise, on the 
part of KBC FP. It is not an offer (or solicitation of an offer) of, or a 
recommendation to buy or sell, any financial product. Any prices or other 
values included in this message are indicative only, and do not necessarily 
represent current market prices, prices at which KBC FP would enter into a 
transaction, or prices at which similar transactions may be carried on KBC FP's 
own books. The information contained in this message is provided as is, 
without representations or warranties, express or implied, of any kind. Past 
performance is not indicative of future returns.


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