Re: ActionErrors deprecated?

2004-02-17 Thread Axel Groß
Hi Wendy!

On 2004-02-09 at 13:04:36 -0700, Wendy Smoak wrote:
... 
 I was trying to get it straight recently, and made this note to myself:
 
 In the Action: 
 
ActionMessages am = new ActionMessages();
am.add( ActionMessages.GLOBAL_MESSAGE, 
new ActionMessage( not.authorized.for.account ) );
saveErrors( request, am );

where does this come from? 
can't find it in struts 1.1

 
...

thx,
Axel

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



RE: ActionErrors deprecated?

2004-02-17 Thread Matthias Wessendorf
hi its code from
1.2-dev 
there is saveErrors with ActionErrors deprecated

and a new saveErrors with ActionMessages
http://jakarta.apache.org/struts/api/org/apache/struts/action/Action.htm
l

in 1.1 there is only
saveErrors() with ActionErros
(This will be removed after Struts 1.2)
and saveMassages with ActionMessages

btw. a new saveMessages() is also there
for saving in session

greetings
matthias

-Original Message-
From: Axel Groß [mailto:[EMAIL PROTECTED] On Behalf Of Axel Groß
Sent: Tuesday, February 17, 2004 1:28 PM
To: Struts Users Mailing List
Subject: Re: ActionErrors deprecated?


Hi Wendy!

On 2004-02-09 at 13:04:36 -0700, Wendy Smoak wrote:
...
 I was trying to get it straight recently, and made this note to
myself:
 
 In the Action:
 
ActionMessages am = new ActionMessages();
am.add( ActionMessages.GLOBAL_MESSAGE, 
new ActionMessage( not.authorized.for.account ) );
saveErrors( request, am );

where does this come from? 
can't find it in struts 1.1

 
...

thx,
Axel

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


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



Re: ActionErrors deprecated?

2004-02-09 Thread Hubert Rabago
Yes, we're supposed to use ActionMessage and ActionMessages now.  The one
place where we can't escape ActionError/s yet is ActionForm's validate
method.


--- Slattery, Tim - BLS [EMAIL PROTECTED] wrote:
 While refreshing my memory on the ActionErrors class, I noticed that the
 metho:
 
 void add (String, ActionError)
 
 Is deprecated, in favor of:
 
 void add(String, ActionMessage)
 
 with a note that this (first signature) method will be removed after Struts
 1.2. What exactly is this trying to tell us? Are we supposed to drop
 ActionError entirely in favor of ActionMessage? There's no deprecation note
 in the description of ActionError. What's happening here?
 
 --
 Tim Slattery
 [EMAIL PROTECTED]


__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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



RE: ActionErrors deprecated?

2004-02-09 Thread Wendy Smoak
 From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
 Yes, we're supposed to use ActionMessage and ActionMessages 
 now.  The one
 place where we can't escape ActionError/s yet is ActionForm's validate
 method.

I was trying to get it straight recently, and made this note to myself:

In the Action: 

   ActionMessages am = new ActionMessages();
   am.add( ActionMessages.GLOBAL_MESSAGE, 
   new ActionMessage( not.authorized.for.account ) );
   saveErrors( request, am );

In the JSP: 

   html-el:messages id=msg message=false
  c:out value=${msg}/
   /html-el:messages

http://wiki.wendysmoak.com/cgi-bin/wiki.pl?StrutsMessages

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



RE: ActionErrors deprecated?

2004-02-09 Thread Slattery, Tim - BLS
 Yes, we're supposed to use ActionMessage and ActionMessages 
 now.  The one place where we can't escape ActionError/s yet is 
 ActionForm's validate method.

Wait a minute!!! ActionError is marked as deprecated, but not ActionErrors.
It looks to me like we create an ActionMessage, add that to an ActionErrors
collection, and use html:errors/ to display the contents of that on the
JSP page.

--
Tim Slattery
[EMAIL PROTECTED]


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



RE: ActionErrors deprecated?

2004-02-09 Thread Matthias Wessendorf
Hi Tim,

yes only Error, not Errors, because of
validate()

in jsp use this:
html:text property=foo/
struts-html:messages id=error property=foo
   struts-bean:write name=error/
/struts-html:messages


cheers, !
matthias


-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 09, 2004 9:14 PM
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors deprecated?


 Yes, we're supposed to use ActionMessage and ActionMessages
 now.  The one place where we can't escape ActionError/s yet is 
 ActionForm's validate method.

Wait a minute!!! ActionError is marked as deprecated, but not
ActionErrors. It looks to me like we create an ActionMessage, add that
to an ActionErrors collection, and use html:errors/ to display the
contents of that on the JSP page.

--
Tim Slattery
[EMAIL PROTECTED]


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


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



RE: ActionErrors deprecated?

2004-02-09 Thread Slattery, Tim - BLS
 in jsp use this:
 html:text property=foo/
 struts-html:messages id=error property=foo
struts-bean:write name=error/
 /struts-html:messages

Maybe I'm dumb, but I can't make any sense of this. Use it for what?

--
Tim Slattery
[EMAIL PROTECTED]


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



RE: ActionErrors deprecated?

2004-02-09 Thread Hubert Rabago
There's one thing I forgot to mention.  That statement I made is for the
nightly build/Struts 1.2.  ActionError isn't marked as deprecated in 1.1.  

Are you talking about the ActionForm.validate() method?  For the nightly
build, yes, that looks about right.  The html:errors/ tag in the nightly
build doesn't even reference ActionError/s in the code -- it works with
ActionMessage/s objects.  I'm guessing they can't deprecate ActionErrors yet
because it's in validate()'s signature.

For errors in your Action class, try Wendy's suggestion.  

Wendy, are you using that code with 1.1?  I haven't tried it yet.  Now that I
think about it, I'll start asking my teammates to start using these in Action
classes.  If it works, then better to write new Action classes that way than
to add more soon-to-be-deprecated code.

--- Slattery, Tim - BLS [EMAIL PROTECTED] wrote:
  Yes, we're supposed to use ActionMessage and ActionMessages 
  now.  The one place where we can't escape ActionError/s yet is 
  ActionForm's validate method.
 
 Wait a minute!!! ActionError is marked as deprecated, but not ActionErrors.
 It looks to me like we create an ActionMessage, add that to an ActionErrors
 collection, and use html:errors/ to display the contents of that on the
 JSP page.
 
 --
 Tim Slattery
 [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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



RE: ActionErrors deprecated?

2004-02-09 Thread Hubert Rabago
It's the new and improved way to display messages on your pages. 
html:errors/ sometimes needed html markup on the message resources file to
format the messages properly.  The new html:messages tag gives the JSP full
control over formatting, which is where it should be.

--- Slattery, Tim - BLS [EMAIL PROTECTED] wrote:
  in jsp use this:
  html:text property=foo/
  struts-html:messages id=error property=foo
 struts-bean:write name=error/
  /struts-html:messages
 
 Maybe I'm dumb, but I can't make any sense of this. Use it for what?
 
 --
 Tim Slattery
 [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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



RE: ActionErrors deprecated?

2004-02-09 Thread Wendy Smoak
 From: Hubert Rabago [mailto:[EMAIL PROTECTED] 
 Wendy, are you using that code with 1.1?

I'm using a recent nightly build, so it's probably considered 1.2.

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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



RE: ActionErrors deprecated?

2004-02-09 Thread Larry Meadors
..instead of the html:errors tag.

The ActionError and ActionErrors classes are going away. 

Avoid creating more dependencies on them now (and thus more pain later)
by using ActionMessage/ActionMessages instead. :-)

Larry

 [EMAIL PROTECTED] 02/09/04 1:29 PM 
 in jsp use this:
 html:text property=foo/
 struts-html:messages id=error property=foo
struts-bean:write name=error/
 /struts-html:messages

Maybe I'm dumb, but I can't make any sense of this. Use it for what?

--
Tim Slattery
[EMAIL PROTECTED]


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



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



RE: ActionErrors deprecated?

2004-02-09 Thread Matthias Wessendorf
hi,
i use in in my form.jsp

to enter foo-property of my formBean
and the messages-tags to display error-messages,
that came up during validation.

//INPUT
FOO: html:text property=foo/

//DISPLAY ERRORS-MSG
struts-html:messages id=error property=foo
struts-bean:write name=error/
/struts-html:messages

i add an ActionMessage-object
to the action.errors.collection


cheers,


-Original Message-
From: Slattery, Tim - BLS [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 09, 2004 9:29 PM
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors deprecated?


 in jsp use this:
 html:text property=foo/
 struts-html:messages id=error property=foo
struts-bean:write name=error/
 /struts-html:messages

Maybe I'm dumb, but I can't make any sense of this. Use it for what?

--
Tim Slattery
[EMAIL PROTECTED]


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


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



Re: ActionErrors deprecated?

2004-02-09 Thread David Erickson
Can we expect to have struts 1.2 fully moved over to using solely
html:messages?  Including all the validate methods on actions etc?
-David

- Original Message - 
From: Hubert Rabago [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 09, 2004 1:32 PM
Subject: RE: ActionErrors deprecated?


 It's the new and improved way to display messages on your pages.
 html:errors/ sometimes needed html markup on the message resources file
to
 format the messages properly.  The new html:messages tag gives the JSP
full
 control over formatting, which is where it should be.

 --- Slattery, Tim - BLS [EMAIL PROTECTED] wrote:
   in jsp use this:
   html:text property=foo/
   struts-html:messages id=error property=foo
  struts-bean:write name=error/
   /struts-html:messages
 
  Maybe I'm dumb, but I can't make any sense of this. Use it for what?
 
  --
  Tim Slattery
  [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 __
 Do you Yahoo!?
 Yahoo! Finance: Get your refund fast by filing online.
 http://taxes.yahoo.com/filing.html

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




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



RE: ActionErrors deprecated?

2004-02-09 Thread Matthias Wessendorf
hi david,

if you mean validation.framework,

i think yes, they are using ActionMessages instead
ActionErrors.

http://jakarta.apache.org/struts/api/org/apache/struts/validator/FieldCh
ecks.html

ActionErrors is in 1.2 only used in
validate():ActionErrors

cheers,!

-Original Message-
From: David Erickson [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 09, 2004 9:41 PM
To: Struts Users Mailing List
Subject: Re: ActionErrors deprecated?


Can we expect to have struts 1.2 fully moved over to using solely
html:messages?  Including all the validate methods on actions etc?
-David

- Original Message - 
From: Hubert Rabago [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, February 09, 2004 1:32 PM
Subject: RE: ActionErrors deprecated?


 It's the new and improved way to display messages on your pages. 
 html:errors/ sometimes needed html markup on the message resources 
 file
to
 format the messages properly.  The new html:messages tag gives the 
 JSP
full
 control over formatting, which is where it should be.

 --- Slattery, Tim - BLS [EMAIL PROTECTED] wrote:
   in jsp use this:
   html:text property=foo/
   struts-html:messages id=error property=foo
  struts-bean:write name=error/ /struts-html:messages
 
  Maybe I'm dumb, but I can't make any sense of this. Use it for what?
 
  --
  Tim Slattery
  [EMAIL PROTECTED]
 
 
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 __
 Do you Yahoo!?
 Yahoo! Finance: Get your refund fast by filing online. 
 http://taxes.yahoo.com/filing.html

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




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


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



Re: ActionErrors display

2004-01-25 Thread John D. Hume
Looking at the source for the ErrorsTag, it definitely is designed only 
to output error messages. 

It seems you could pretty easily subclass ErrorsTag with a tag that uses 
the presence or absence of an error message for the given property to 
decide whether to return Tag.SKIP_BODY or Tag.EVAL_BODY_INCLUDE from 
doStartTag.  Then your warning image HTML could be nested inside your 
jamesBrown:errorsPresent tag.

You'll have to decide whether this feature is worth that effort, but 
there it is.

-john.

Brown, James wrote:

The desire is:
 1. All errors will appear in one place - the top of the page.
 2. Any field for which validation errors have been detected, would be further flagged 
in 1 of three potential ways:
a. changing the fields background colour;
b. marking it with an exclamation icon (thanks to eBay for the quick sample); or
c. including the error message (in this case Last Name is invalid.) in the title 
attribute of the input.
#1 is easily achieved; however, I have been struggling with #2 in any form.  The html:errors tag makes it very easy to output the message for a specific field, but I cannot seem to find a means to use it to flag that an error has occurred.
 

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


RE: ActionErrors display

2004-01-25 Thread Richard Hightower
check out logic:messagesPresent, it will do what you want for line item 2.

There is a good example of using this in the book Professional Struts.

I know... I wrote that example ;)

Rick Hightower
Developer

Struts/J2EE training -- http://www.arc-mind.com/strutsCourse.htm
Struts/J2EE consulting --
http://www.arc-mind.com/consulting.htm#StrutsMentoring

-Original Message-
From: Brown, James [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 25, 2004 4:33 AM
To: Struts Users Mailing List (E-mail)
Subject: ActionErrors display


Hi,

I have been trying to work through the display of ActionErrors - both global
and non-global (field level) - such that it would look something like the
following HTML sample:

html
headtitleSearch Form/title/head
body
  PstrongThe following errors have occurred:/strong/P
  UL
LIiA global error has been detected/i/LI
LIiLast Name is invalid./i/LI
  /UL
  pFields marked with a red background and a img
src=https://scgi.ebay.com/saw/pics/sitewide/warning_9x10.gif; width=9
height=10 hspace=3 vspace=2 border=0font face=Arial, Helvetica,
Verdana, sans-serif size=2 have failed validation./p
  form name=search method=POST action=search.do
  h3Please provide the following search criteria information./h3
  pYou must complete all of the fields marked with an asterisk font
color=red(*)/font./p
  pfont color=red*/fontLast Name:
input style=background: red type=text name=lastname
maxlength=25 size=25 value=Do! title=Last Name is invalid.
  img src=https://scgi.ebay.com/saw/pics/sitewide/warning_9x10.gif;
width=9 height=10 hspace=3 vspace=2 border=0/p
  pfont color=red*/fontFirst Name:
input type=text name=firstname maxlength=25 size=25
value=John/p
  input type=submit value=Continue
/body
/html

The desire is:
  1. All errors will appear in one place - the top of the page.
  2. Any field for which validation errors have been detected, would be
further flagged in 1 of three potential ways:
 a. changing the fields background colour;
 b. marking it with an exclamation icon (thanks to eBay for the quick
sample); or
 c. including the error message (in this case Last Name is invalid.)
in the title attribute of the input.

#1 is easily achieved; however, I have been struggling with #2 in any form.
The html:errors tag makes it very easy to output the message for a specific
field, but I cannot seem to find a means to use it to flag that an error
has occurred.

Any suggestions would be greatly appreciated.

  Cheers,
  James

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.

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



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



Re: ActionErrors without resource bundle.

2003-12-11 Thread Antony Paul
It worked. Thanks.

rgds
Antony Paul.

- Original Message -
From: Ted Husted [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Wednesday, December 10, 2003 11:17 PM
Subject: Re: ActionErrors without resource bundle.


 You can put a single entry in the bundle

 general.error={0}

 and use this with all your error messages.

 HTH, Ted.

 Antony Paul wrote:
  Hi,
  I want to display error messages saved in Action class using
saveErrors
  without looking at resource bundle. Instead of the key provide message.
  Possible ?
  Our app does not need internatilisation support and putting all
errors
  related to business logic in resource bundle is unnecessary. There will
be
  lot of entries int it. One have to use searching tools to find the error
  message in bundle.
 
  rgds
  Antony Paul
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



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



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



Re: ActionErrors without resource bundle.

2003-12-10 Thread Ted Husted
You can put a single entry in the bundle

general.error={0}

and use this with all your error messages.

HTH, Ted.

Antony Paul wrote:
Hi,
I want to display error messages saved in Action class using  saveErrors
without looking at resource bundle. Instead of the key provide message.
Possible ?
Our app does not need internatilisation support and putting all errors
related to business logic in resource bundle is unnecessary. There will be
lot of entries int it. One have to use searching tools to find the error
message in bundle.
rgds
Antony Paul
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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


Re: ActionErrors without resource bundle.

2003-12-10 Thread Derek Clarkson
Hi,
I don't think it's possible. I've been looking at issues with ActionErrors 
and ActionMessages and I could not find any constructors that wuld let you 
pass a message String rather than a key to use in a resource bundle. I have 
the problem where I an using more than one file with resources. To do this 
I've had to have multiple html:message tags in the web documents. 

I've been getting the impression over the last few months that there are a 
number of areas in struts that have only been coded with the minimal 
functionality as assumed by developers who wish to do things in a certain 
way. I.e. if you want to do things slightly differently you either can't or 
you will have to write your own JSP tags to do it.

I would suggest that if you really need to do this, then write your own JSP 
tag to replace html:errors. I would probably make it look for a LinkedList of 
text strings or something in a bean and display them. Then you could populate 
this list in any fashion you liked. If you haven't written a tag before it's 
not difficult to do once you understand the bits you need.

cio
Derek.


On Thursday 11 December 2003 01:19, Antony Paul wrote:
 Hi,
 I want to display error messages saved in Action class using 
 saveErrors without looking at resource bundle. Instead of the key provide
 message. Possible ?
 Our app does not need internatilisation support and putting all errors
 related to business logic in resource bundle is unnecessary. There will be
 lot of entries int it. One have to use searching tools to find the error
 message in bundle.

 rgds
 Antony Paul

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

-- 
Regards,
Derek Clarkson

.O. Analyst/Programmer
..O Waterwerks Pty Ltd
OOO Melbourne, Australia


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



Re: ActionErrors problem...

2003-11-18 Thread Brad Balmer
This may be a copy/paste issue, but this shouldn't even compile as it 
looks here.  You are missing a ) at the end.

Dominique de Waleffe wrote:

I have this in my code:
   errors.add(ActionErrors.GLOBAL_ERROR,
  new 
ActionError(error.key.invalid-value.dummy,keyname,value,expected); 

I have this in application.properties:
error.key.invalid-value.dummy=DUMMY: key:{0} Value:{1} expected:{2}
However,  using html:errors/ in my page, the only thing that gets 
displayed is:
DUMMY: key: Value: expected:

i.e. the replacement values I give are swallowed.

Any idea on what I am doing wrong? I tried calling new 
ActionError(..,a) where a is an Object[] with the values I want. This 
did not work either.

I imagine I must be missing something obvious...

Thanks for any hint...
D.


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


Re: ActionErrors problem...

2003-11-18 Thread Dominique de Waleffe
Brad Balmer wrote:

This may be a copy/paste issue, but this shouldn't even compile as it 
looks here.  You are missing a ) at the end.
Cut-n-paste error. The code compiles. Only the replacements do not appear.
When I put an extra placeholder {3} and give 3 args only, the {3} 
appears in the message. The {0} to {2} are swallowed...

D.
--
Dominique de Waleffe   Email: [EMAIL PROTECTED] [No HTML please]
Mission Critical, Drève Richelle 161 Bât N, B-1410 Waterloo, Belgium  
Phone: +32 2 757 10 15  Fax: +32 2 759 27 60



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


Re: ActionErrors problem...

2003-11-18 Thread Susan Bradeen

On 11/18/2003 07:29:41 AM Dominique de Waleffe wrote:

 I have this in my code:
 errors.add(ActionErrors.GLOBAL_ERROR,
 new

ActionError(error.key.invalid-value.dummy,keyname,value,expected);



Are keyname, value, expected evaluated or literal values? Do you mean
to have the quotes around them? Can you print out the values in statements
to make sure they are not blank values?

Susan

 I have this in application.properties:
 error.key.invalid-value.dummy=DUMMY: key:{0} Value:{1} expected:{2}

 However,  using html:errors/ in my page, the only thing that gets
 displayed is:
 DUMMY: key: Value: expected:

 i.e. the replacement values I give are swallowed.

 Any idea on what I am doing wrong? I tried calling new ActionError(..,a)
 where a is an Object[] with the values I want. This did not work either.

 I imagine I must be missing something obvious...

 Thanks for any hint...
 D.

 --
 Dominique de Waleffe   Email: [EMAIL PROTECTED] [No HTML please]
 Mission Critical, Drève Richelle 161 Bât N, B-1410 Waterloo, Belgium
 Phone: +32 2 757 10 15  Fax: +32 2 759 27 60



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




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



Re: ActionErrors problem...

2003-11-18 Thread Dominique de Waleffe
Susan Bradeen wrote:

On 11/18/2003 07:29:41 AM Dominique de Waleffe wrote:

 

I have this in my code:
errors.add(ActionErrors.GLOBAL_ERROR,
new
   

ActionError(error.key.invalid-value.dummy,keyname,value,expected);

Are keyname, value, expected evaluated or literal values? Do you mean
to have the quotes around them? Can you print out the values in statements
to make sure they are not blank values?
 

They are just String values I  want to be included in my message...
This was just a test to see if the thing works, I expect:
DUMMY: key:keyname Value:value expected:expected

Of course in the rest of the code I have other strings to put
D.
--
Dominique de Waleffe   Email: [EMAIL PROTECTED] [No HTML please]
Mission Critical, Drève Richelle 161 Bât N, B-1410 Waterloo, Belgium  
Phone: +32 2 757 10 15  Fax: +32 2 759 27 60



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


Re: ActionErrors problem...

2003-11-18 Thread Caroline Lauferon
I've just made a little test writing DUMMY: key:keyname Value:value
expected:expected in an html document.. and i got DUMMY: key: Value:
expected: 
the problem is that  is a special html symbol explorer thinks its an
unknown tag and outputs nothing.
if you look in the HTML source of your document, i think you'll see what you
were expecting.
to output  , use lt;

hope it helps

Caroline



Caroline LAUFERON
 Cap Gemini Telecom Media  Networks France
 Skill Center VASN - RENNES

02 99 27 61 92
[EMAIL PROTECTED]




- Original Message -
From: Dominique de Waleffe [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Tuesday, November 18, 2003 1:29 PM
Subject: ActionErrors problem...


I have this in my code:
errors.add(ActionErrors.GLOBAL_ERROR,
   new
ActionError(error.key.invalid-value.dummy,keyname,value,expected
);

I have this in application.properties:
error.key.invalid-value.dummy=DUMMY: key:{0} Value:{1} expected:{2}

However,  using html:errors/ in my page, the only thing that gets
displayed is:
DUMMY: key: Value: expected:

i.e. the replacement values I give are swallowed.

Any idea on what I am doing wrong? I tried calling new ActionError(..,a)
where a is an Object[] with the values I want. This did not work either.

I imagine I must be missing something obvious...

Thanks for any hint...
D.

--
Dominique de Waleffe   Email: [EMAIL PROTECTED] [No HTML please]
Mission Critical, Drève Richelle 161 Bât N, B-1410 Waterloo, Belgium
Phone: +32 2 757 10 15  Fax: +32 2 759 27 60



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


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



Re: ActionErrors problem...

2003-11-18 Thread Dominique de Waleffe
Caroline Lauferon wrote:

I've just made a little test writing DUMMY: key:keyname Value:value
expected:expected in an html document.. and i got DUMMY: key: Value:
expected: 
the problem is that  is a special html symbol explorer thinks its an
unknown tag and outputs nothing.
if you look in the HTML source of your document, i think you'll see what you
were expecting.
to output  , use lt;
 

Of course. Completely missed that one... I was really looking for 
something else..l
Thanks a lot,
D.

--
Dominique de Waleffe   Email: [EMAIL PROTECTED] [No HTML please]
Mission Critical, Drève Richelle 161 Bât N, B-1410 Waterloo, Belgium  
Phone: +32 2 757 10 15  Fax: +32 2 759 27 60



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


RE: ActionErrors are not displayed after page is refreshed.

2003-11-06 Thread Christine Gerstenmayer
Hi,
I think the problem is that you define a new Event when going to top of your
page. Try this: make a simple javascript, that sets the focus to an element
at the top of the page (that leads the browser to go to the focused
element and therefore to the top of the page), then your Error-Messages
should remain.
Regards
Christine

-Ursprüngliche Nachricht-
Von: deepaksawdekar [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 06. November 2003 19:51
An: Struts Users Mailing List
Betreff: ActionErrors are not displayed after page is refreshed.

Hi,
I have a jsp in which i have written the following code to display the
errors,

logic:messagesPresent
p CLASS=errorsHeader
bean:message key=errors.validation.header/
/p
html:messages id=error
  lic:out value=${error}//li
/html:messages
 hr SIZE=1 NOSHADE WIDTH=620 ALIGN=left
/logic:messagesPresent


Along with that i have a code to at the bottom of page to go to top of the
pages as follows,
TD ALIGN=center COLSPAN=10A HREF=#tophtml:img
page=/images/IcoGoTop.gif width=17 height=17 border=0 alt=Top of
Page/html:img/A
/TD


Now the problem i am facing is that when i click on top image the page gets
refreshed and errors messages goes off.
Is there any way i can provide a code to goto top along with keeping the
error messages.


Thanks and Regards
Deepak.

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




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



Re: ActionErrors configuration

2003-11-03 Thread Mikael Eriksson - Swedish Connection
You should have the name of the jsp with the form (or possible the
action that leads to the form page, with the .do extension) as the input.
So your action would have input=/systemDetails.jsp  if that is the
name of your jsp page.
Regards

At 13:10 2003-11-03 -0800, you wrote:
Hi,



I am trying to configure my app so that when some of the text fields are
not populated, I show errors and redisplay the same page. The
configuration I have is:


action path=/systemDetails
type=com.paycycle.profile.actions.SystemDetailsAction
name=systemDetailForm scope=request input=/systemDetails
.

/action



When I try to run the app with this configuration and there are errors,
I get:


The requested resource (/profile/systemDetails) is not available.



Can you help me out here?



Thanks,



Ramesh.


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


RE: ActionErrors configuration

2003-11-03 Thread Ramesh Bobba
Hi,

Turns out that even though the documentation says I should use
ActionErrors.add(String, ActionMessage), using (String, ActionError)
solved the problem! Any ideas why?

Ramesh.

-Original Message-
From: Mikael Eriksson - Swedish Connection [mailto:[EMAIL PROTECTED]

Sent: Monday, November 03, 2003 1:11 PM
To: Struts Users Mailing List
Subject: Re: ActionErrors configuration


You should have the name of the jsp with the form (or possible the
action that leads to the form page, with the .do extension) as the
input.
So your action would have input=/systemDetails.jsp  if that is the
name of your jsp page.

Regards

At 13:10 2003-11-03 -0800, you wrote:
Hi,



I am trying to configure my app so that when some of the text fields
are
not populated, I show errors and redisplay the same page. The
configuration I have is:



 action path=/systemDetails
type=com.paycycle.profile.actions.SystemDetailsAction
name=systemDetailForm scope=request input=/systemDetails

 .

 /action



When I try to run the app with this configuration and there are errors,
I get:



The requested resource (/profile/systemDetails) is not available.



Can you help me out here?



Thanks,



Ramesh.



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




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



RE: ActionErrors configuration

2003-11-03 Thread Mikael Eriksson - Swedish Connection
Hi

That sound like another problem than what you wrote about first :-)
But anyway
ActionErrors has both an add(String, ActionMessage), defined in the
superclass ActionMessages, and an  add(String,ActionError) ,
defined in ActionErrors class which just calls the superclass version.
That call works fine sinse ActionError inherits from ActionMessage.
Regards

At 13:28 2003-11-03 -0800, you wrote:
Hi,

Turns out that even though the documentation says I should use
ActionErrors.add(String, ActionMessage), using (String, ActionError)
solved the problem! Any ideas why?
Ramesh.

-Original Message-
From: Mikael Eriksson - Swedish Connection [mailto:[EMAIL PROTECTED]
Sent: Monday, November 03, 2003 1:11 PM
To: Struts Users Mailing List
Subject: Re: ActionErrors configuration
You should have the name of the jsp with the form (or possible the
action that leads to the form page, with the .do extension) as the
input.
So your action would have input=/systemDetails.jsp  if that is the
name of your jsp page.
Regards

At 13:10 2003-11-03 -0800, you wrote:
Hi,



I am trying to configure my app so that when some of the text fields
are
not populated, I show errors and redisplay the same page. The
configuration I have is:



 action path=/systemDetails
type=com.paycycle.profile.actions.SystemDetailsAction
name=systemDetailForm scope=request input=/systemDetails

 .

 /action



When I try to run the app with this configuration and there are errors,
I get:



The requested resource (/profile/systemDetails) is not available.



Can you help me out here?



Thanks,



Ramesh.


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


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


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


RE: ActionErrors configuration

2003-11-03 Thread Syed, Nazeer
Try this


action path=/profile/systemDetails
type=com.paycycle.profile.actions.SystemDetailsAction
name=systemDetailForm scope=request input=/systemDetails



Thanks
Nazeer


-Original Message-
From: Ramesh Bobba [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 03, 2003 4:10 PM
To: [EMAIL PROTECTED]
Subject: ActionErrors configuration

Hi,

 

I am trying to configure my app so that when some of the text fields are
not populated, I show errors and redisplay the same page. The
configuration I have is:

 

action path=/systemDetails
type=com.paycycle.profile.actions.SystemDetailsAction
name=systemDetailForm scope=request input=/systemDetails

.

/action

 

When I try to run the app with this configuration and there are errors,
I get: 

 

The requested resource (/profile/systemDetails) is not available.

 

Can you help me out here?

 

Thanks,

 

Ramesh.


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



Re: ActionErrors/ActionMessages

2003-10-28 Thread Keld Hansen
I tried your suggestion, and sad to say: it didn't work.
I see that you're using EL - do I have to specify anything special in my jsp page to 
make it work? 
Apart from the usual taglibs.

/Keld
- Original Message -

DATE: Mon, 27 Oct 2003 14:56:08
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: 

On 10/27/2003 12:47 PM Keld Hansen wrote:
 Thanx, I'll try it, but I read your suggestion as this:
 
 write out all global messages in the ActionMessages queue
 
 so I'll be surpised to see the messages from the Validator.

I'm just telling you what I'm doing :) - there's no reason why it 
shouldn't work for you.

-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9

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






Enter for a chance to win one year's supply of allergy relief!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda3.com/1/c/563632/125699/307982/307982
This offer applies to U.S. Residents Only

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



Re: ActionErrors/ActionMessages

2003-10-28 Thread Adam Hardy
On 10/28/2003 08:17 AM Keld Hansen wrote:
I tried your suggestion, and sad to say: it didn't work. I see that
you're using EL - do I have to specify anything special in my jsp
page to make it work? Apart from the usual taglibs.
/Keld - Original Message -

DATE: Mon, 27 Oct 2003 14:56:08 From: Adam Hardy
[EMAIL PROTECTED] To: Struts Users Mailing List
[EMAIL PROTECTED] Cc:

On 10/27/2003 12:47 PM Keld Hansen wrote:

Thanx, I'll try it, but I read your suggestion as this:

write out all global messages in the ActionMessages queue

so I'll be surpised to see the messages from the Validator.
I'm just telling you what I'm doing :) - there's no reason why it 
shouldn't work for you.
OK so I was wrong, there is a reason why it shouldn't work for you :(

I am using DynaValidator - but I can't imagine that it would cause this 
difference.

Actually I've just discovered that there are pages in my app where the 
validator messages are not showing up - but there are pages, e.g. the 
one I checked yesterday before I answered your question, where the 
validator messages do turn up.

I'll see what on earth is going on  let you know.

Adam



--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ActionErrors/ActionMessages

2003-10-28 Thread Keld Hansen
Great Adam,
I really appreciate your info.
BTW: I saw in the struts-dev newsgroup that there are some discussions about how to 
get rid of ActionErrors, and apparantly it's not crystal clear what will happen. 
Anyway I didn't find useful information about the Validator. 
I've given up experimenting, and must -- until new ideas pop up -- stick to the old 
ActionErrors class. [I don't like the name of the class--it's supposed to hold any 
type of message - right? :-) ]
/Keld

--

- Original Message -

DATE: Tue, 28 Oct 2003 09:03:26
From: Adam Hardy [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Cc: 

On 10/28/2003 08:17 AM Keld Hansen wrote:
 I tried your suggestion, and sad to say: it didn't work. I see that
 you're using EL - do I have to specify anything special in my jsp
 page to make it work? Apart from the usual taglibs.
 
 /Keld - Original Message -
 
 DATE: Mon, 27 Oct 2003 14:56:08 From: Adam Hardy
 [EMAIL PROTECTED] To: Struts Users Mailing List
 [EMAIL PROTECTED] Cc:
 
 
 On 10/27/2003 12:47 PM Keld Hansen wrote:
 
 Thanx, I'll try it, but I read your suggestion as this:
 
 write out all global messages in the ActionMessages queue
 
 so I'll be surpised to see the messages from the Validator.
 
 I'm just telling you what I'm doing :) - there's no reason why it 
 shouldn't work for you.

OK so I was wrong, there is a reason why it shouldn't work for you :(

I am using DynaValidator - but I can't imagine that it would cause this 
difference.

Actually I've just discovered that there are pages in my app where the 
validator messages are not showing up - but there are pages, e.g. the 
one I checked yesterday before I answered your question, where the 
validator messages do turn up.

I'll see what on earth is going on  let you know.

Adam



-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9

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






Enter for a chance to win one year's supply of allergy relief!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda3.com/1/c/563632/125699/307982/307982
This offer applies to U.S. Residents Only

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



Re: ActionErrors/ActionMessages

2003-10-28 Thread Adam Hardy
On 10/28/2003 10:16 AM Keld Hansen wrote:
Great Adam, I really appreciate your info. BTW: I saw in the
struts-dev newsgroup that there are some discussions about how to get
rid of ActionErrors, and apparantly it's not crystal clear what will
happen. Anyway I didn't find useful information about the Validator.
 I've given up experimenting, and must -- until new ideas pop up --
stick to the old ActionErrors class. [I don't like the name of the
class--it's supposed to hold any type of message - right? :-) ] /Keld
I am using DynaValidator - but I can't imagine that it would cause
this difference.
Actually I've just discovered that there are pages in my app where
the validator messages are not showing up - but there are pages,
e.g. the one I checked yesterday before I answered your question,
where the validator messages do turn up.
I'll see what on earth is going on  let you know.


Hi Keld,
I just discovered that I was in fact not showing any of my validator 
errors. It just goes to show that having javascript validation enabled 
means I had assumed it was working fine for x weeks - but anyway, I 
worked out I needed this taglib to show them:

html:messages id=validatorMsgs
  message=false
   header=errors.header
   footer=errors.footer
  c:out value=${validatorMsgs} /
/html:messages
Since I'm using Tiles though I only had to add this in one place and now 
it's fine again. (Guess I can turn javascript back on in my browser...)

Adam

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ActionErrors/ActionMessages

2003-10-27 Thread Adam Hardy
On 10/27/2003 08:21 AM Keld Hansen wrote:
I'd like to emphasize the importance of a mail recently added to the
newsgroup regarding the use of ActionErrors and/or ActionMessages.
The Validator uses the ActionErrors queue, so even if you'd like to
use the new ActionMessages queue you'd hesitate to do so since this
forces you to manage two queues in your jsp-pages.
So when ActionErrors(s) gets deprecated (in version 1.2?) then what
do you do?
I'd be very interested in an answer on this topic. Thanx.
I use the ActionMessages collection and not the ActionErrors, and I use 
the html:message/ taglib in my JSPs to display them. It works fine 
with the Validator.

If I remember correctly, the html:errors/ taglib will throw an 
exception if you give it an ActionMessages collection to display, but 
other than that caveat, you should be OK.

Regards
Adam
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ActionErrors/ActionMessages

2003-10-27 Thread Keld Hansen
Let me elaborate a little:

As I understand it the Validator uses the ActionErrors queue. This means that I'll 
have to code this in my jsp-page:

 html:messages id=error message=false 
 BRbean:write name=error/
 /html:messages 

If I use the ActionMessages queue for my own validation - or error handling in general 
- in my Action classes, then I'll also have to code this in my jsp-pages:

 html:messages id=error message=true 
 BRbean:write name=error/
 /html:messages 

So the net result is that my jps-pages becomes more clumsy. 

My question is really: is it possible to direct messages from the Validator to the 
ActionMessages queue?

If not: how is it then possible to deprecate the ActionErrors queue?
 




Enter for a chance to win one year's supply of allergy relief!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda3.com/1/c/563632/125699/307982/307982
This offer applies to U.S. Residents Only

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



Re: ActionErrors/ActionMessages

2003-10-27 Thread Adam Hardy
On 10/27/2003 09:59 AM Keld Hansen wrote:
Let me elaborate a little:

As I understand it the Validator uses the ActionErrors queue. This
means that I'll have to code this in my jsp-page:
html:messages id=error message=false BRbean:write
name=error/ /html:messages
If I use the ActionMessages queue for my own validation - or error
handling in general - in my Action classes, then I'll also have to
code this in my jsp-pages:
html:messages id=error message=true BRbean:write
name=error/ /html:messages
So the net result is that my jps-pages becomes more clumsy.

My question is really: is it possible to direct messages from the
Validator to the ActionMessages queue?
If not: how is it then possible to deprecate the ActionErrors queue?

This works to display the Validator messages and errors from the Actions 
if you save them like request.setAttribute(Globals.MESSAGE_KEY, messages)

html:messages id=errorMsgs
  message=true
 property=${GLOBAL_ERROR}
   header=errors.header
   footer=errors.footer
  c:out value=${errorMsgs} /
/html:messages
I'm afraid I don't remember the finer details but this will show both 
yours and Validator's errors.

Adam
--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ActionErrors/ActionMessages

2003-10-27 Thread Keld Hansen
Thanx, I'll try it, but I read your suggestion as this:

write out all global messages in the ActionMessages queue

so I'll be surpised to see the messages from the Validator.

/keld  

- Original Message -

This works to display the Validator messages and errors from the Actions 
if you save them like request.setAttribute(Globals.MESSAGE_KEY, messages)

html:messages id=errorMsgs
   message=true
  property=${GLOBAL_ERROR}
header=errors.header
footer=errors.footer
   c:out value=${errorMsgs} /
/html:messages

I'm afraid I don't remember the finer details but this will show both 
yours and Validator's errors.

Adam




Enter for a chance to win one year's supply of allergy relief!
http://ad.doubleclick.net/clk;6413623;3807821;f?http://mocda3.com/1/c/563632/125699/307982/307982
This offer applies to U.S. Residents Only

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



Re: ActionErrors/ActionMessages

2003-10-27 Thread Adam Hardy
On 10/27/2003 12:47 PM Keld Hansen wrote:
Thanx, I'll try it, but I read your suggestion as this:

write out all global messages in the ActionMessages queue

so I'll be surpised to see the messages from the Validator.
I'm just telling you what I'm doing :) - there's no reason why it 
shouldn't work for you.

--
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: ActionErrors and Servlet Filters

2003-09-27 Thread Manish Singla
you may use following
request.setAttribute(Globals.ERROR_KEY, errors);
to set global parameter of errors..

set action error as usual...

Nate Drake wrote:

 I have a Servlet Filter that checks that the user has permission to
 access the requested page.  If the user does not, I want to send them
 back to home.jsp.  In home.jsp, I want to use the html:errors tag to
 display an error message.

 In the filter I do this:

 ActionError error = new ActionError(Constants.ERRORS_PERMISSION_DENIED);

 ActionErrors errors = new ActionErrors();
 errors.add(ActionErrors.GLOBAL_ERROR, error);

 request.setAttribute(errparam, errors);

 RequestDispatcher rd = request.getRequestDispatcher(home.jsp);

 rd.forward(request, response);
 return;

 In home.jsp I've tried both:

 html:errors name=errparam/
 html:errors property=errparam/

 It forwards back to home.jsp, but the error messages are not displayed.
 Is it possible to use ActionErrors outside of an Action?

 Thanks,
 Nate

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


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



Re: ActionErrors and Servlet Filters

2003-09-27 Thread Manish Singla
In addition to below reply:
you may set  name in html:error and .
request.setAttribute(name, errors)
errors can be string, string[], ActionErrors, ErrorMesssages

Manish Singla wrote:

 you may use following
 request.setAttribute(Globals.ERROR_KEY, errors);
 to set global parameter of errors..

 set action error as usual...

 Nate Drake wrote:

  I have a Servlet Filter that checks that the user has permission to
  access the requested page.  If the user does not, I want to send them
  back to home.jsp.  In home.jsp, I want to use the html:errors tag to
  display an error message.
 
  In the filter I do this:
 
  ActionError error = new ActionError(Constants.ERRORS_PERMISSION_DENIED);
 
  ActionErrors errors = new ActionErrors();
  errors.add(ActionErrors.GLOBAL_ERROR, error);
 
  request.setAttribute(errparam, errors);
 
  RequestDispatcher rd = request.getRequestDispatcher(home.jsp);
 
  rd.forward(request, response);
  return;
 
  In home.jsp I've tried both:
 
  html:errors name=errparam/
  html:errors property=errparam/
 
  It forwards back to home.jsp, but the error messages are not displayed.
  Is it possible to use ActionErrors outside of an Action?
 
  Thanks,
  Nate
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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


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



RE: ActionErrors

2003-09-12 Thread Yuan, Saul (TOR-ML)
Hi,

You can use the placeholder ({0}, {1} ..) feature in message resource
something like this:

In property file:

errors.your_runtime_msg.key = {0}


In Action or form bean:

new ActionError(errors.your_runtime_msg.key, your runtime message,
blah, blah..);

 your runtime message, blah, blah.. will replace {0}



Saul


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
 Sent: Friday, September 12, 2003 11:45 AM
 To: [EMAIL PROTECTED]
 Subject: ActionErrors
 
 
 
 
 
 Hello,
 
 This works fine:
 errors.add(ActionErrors.GLOBAL_ERROR,new
 ActionError(errors.createkunde.float));
 
 but i want to define the message at runtime, i want to put a string
into
 the
 ActionError that is not defined in .properties file.
 
 Is that possible ?
 if yes, could u give me a example ?
 
 
 thnx for help
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


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



RE: ActionErrors cannot be resolved

2003-06-09 Thread Brandon Goodin
ActionErrors aes = (ActionErrors);-- where is the object you are casting?

Where is your ActionErrors object? You're casting nothing to aes.

Brandon Goodin
 

-Original Message-
From: Carlos Saraiva [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 12:22 PM
To: Struts Users Mailing List
Subject: ActionErrors cannot be resolved


Would someone please tell me what I'm doing wrong here? This same code
compiled well yesterday, and is giving me the error ActionErrors cannot be
resolved today.

..
%@ page import=org.apache.struts.action.*,java.util.*%
..
%

ActionErrors aes = (ActionErrors);
if (aes != null) {

..

Thanks in advance,

--
Best regards,
Carlos Saraiva
Raleigh, NC



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



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



RE: ActionErrors cannot be resolved

2003-06-09 Thread Mike Jasnowski
Are you sure this compiled? It looks like your trying to cast something to
the ActionErrors type but that something is missing:

ActionErrors aes = (ActionErrors)something;

Maybe??
Mike

-Original Message-
From: Carlos Saraiva [mailto:[EMAIL PROTECTED]
Sent: Monday, June 09, 2003 2:22 PM
To: Struts Users Mailing List
Subject: ActionErrors cannot be resolved


Would someone please tell me what I'm doing wrong here? This same code
compiled well yesterday, and is giving me the error ActionErrors cannot be
resolved today.

..
%@ page import=org.apache.struts.action.*,java.util.*%
..
%

ActionErrors aes = (ActionErrors);
if (aes != null) {

..

Thanks in advance,

--
Best regards,
Carlos Saraiva
Raleigh, NC



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



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



RE: ActionErrors cannot be resolved

2003-06-09 Thread Carlos Saraiva

 ActionErrors aes = (ActionErrors);-- where is the object you are casting?

 Where is your ActionErrors object? You're casting nothing to aes.

 Brandon Goodin


Thanks blushing/. I guess it's time to take a break and go swimming or
something. It did compile yesterday. I must have erased the rest of the
statement inadvertently, and then added the ;

--
Best regards,
Carlos Saraiva
Raleigh, NC



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



RE: ActionErrors

2003-02-13 Thread Theodas, Jacques
Diego,

I think you're missing a / before login.jsp where you specify the input page.
When the ActionServlet finds ActionErrors to contain error objects, it will forward 
directly back to the input page you specify.
I don't think input is correct, so that's why you're getting a blank page.

Jacques

-Original Message-
From: Diego Bursztyn [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 5:18 PM
To: Struts Mailing
Subject: ActionErrors


I'm having a problem with an action error.
I have the following config:

action path=/action/logon
type=com.blah.actions.LogonAction
name=logonForm
scope=request
validate=true
input=login.jsp
forward name=success path=/main_menu.jsp/
forward name=failure path=/login.jsp/
/action

action form
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
{
ActionErrors errors = new ActionErrors();
if ((username == null) || (username.length()  1))
errors.add(username, new 
ActionError(error.username.required));
if ((password == null) || (password.length()  1))
errors.add(password, new 
ActionError(error.password.required));

return errors;
}

if the username or the password is omitted when submitting the form,
login.jsp should display on the browser with the error message, instead I
get a blank browser with http://./action/logon.do on the url.
What am I missing?

Thanks,

Diego.


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




Re: ActionErrors

2003-02-12 Thread David Graham
Try using /login.jsp as your input value.

David




From: Diego Bursztyn [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Mailing [EMAIL PROTECTED]
Subject: ActionErrors
Date: Wed, 12 Feb 2003 17:17:51 -0500

I'm having a problem with an action error.
I have the following config:

action path=/action/logon
	type=com.blah.actions.LogonAction
	name=logonForm
	scope=request
	validate=true
	input=login.jsp
	forward name=success path=/main_menu.jsp/
	forward name=failure path=/login.jsp/
/action

action form
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
	{
		ActionErrors errors = new ActionErrors();
		if ((username == null) || (username.length()  1))
			errors.add(username, new ActionError(error.username.required));
		if ((password == null) || (password.length()  1))
			errors.add(password, new ActionError(error.password.required));

		return errors;
	}

if the username or the password is omitted when submitting the form,
login.jsp should display on the browser with the error message, instead I
get a blank browser with http://./action/logon.do on the url.
What am I missing?

Thanks,

Diego.


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



_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


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



RE: ActionErrors

2003-02-12 Thread Diego Bursztyn
I've tried using /login.jsp and still no luck.

Thanks,

Diego.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 5:39 PM
To: [EMAIL PROTECTED]
Subject: Re: ActionErrors


Try using /login.jsp as your input value.

David



From: Diego Bursztyn [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Mailing [EMAIL PROTECTED]
Subject: ActionErrors
Date: Wed, 12 Feb 2003 17:17:51 -0500

I'm having a problem with an action error.
I have the following config:

action path=/action/logon
   type=com.blah.actions.LogonAction
   name=logonForm
   scope=request
   validate=true
   input=login.jsp
   forward name=success path=/main_menu.jsp/
   forward name=failure path=/login.jsp/
/action

action form
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
   {
   ActionErrors errors = new ActionErrors();
   if ((username == null) || (username.length()  1))
   errors.add(username, new 
ActionError(error.username.required));
   if ((password == null) || (password.length()  1))
   errors.add(password, new 
ActionError(error.password.required));

   return errors;
   }

if the username or the password is omitted when submitting the form,
login.jsp should display on the browser with the error message, instead I
get a blank browser with http://./action/logon.do on the url.
What am I missing?

Thanks,

Diego.


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


_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail


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



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




RE: ActionErrors

2003-02-12 Thread Diego Bursztyn
I found the problem (newbie issues!)

I have a global forward for login.jsp forward name=logon
path=/login.jsp/
I've changed the input attribute in the action tag to logon and it worked.

Thanks,

Diego.

-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 12, 2003 5:39 PM
To: [EMAIL PROTECTED]
Subject: Re: ActionErrors


Try using /login.jsp as your input value.

David



From: Diego Bursztyn [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Mailing [EMAIL PROTECTED]
Subject: ActionErrors
Date: Wed, 12 Feb 2003 17:17:51 -0500

I'm having a problem with an action error.
I have the following config:

action path=/action/logon
   type=com.blah.actions.LogonAction
   name=logonForm
   scope=request
   validate=true
   input=login.jsp
   forward name=success path=/main_menu.jsp/
   forward name=failure path=/login.jsp/
/action

action form
public ActionErrors validate(ActionMapping mapping, HttpServletRequest
request)
   {
   ActionErrors errors = new ActionErrors();
   if ((username == null) || (username.length()  1))
   errors.add(username, new 
ActionError(error.username.required));
   if ((password == null) || (password.length()  1))
   errors.add(password, new 
ActionError(error.password.required));

   return errors;
   }

if the username or the password is omitted when submitting the form,
login.jsp should display on the browser with the error message, instead I
get a blank browser with http://./action/logon.do on the url.
What am I missing?

Thanks,

Diego.


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


_
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail


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



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




Re: ActionErrors

2003-02-12 Thread Arunachalam Jaisankar
I think you might be missing the following logic:messages tag in your jsp
file. Include the following on top of your jsp file. And set errors.header
in your application properties file.

%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic %
 logic:messagesPresent
 bean:message key=errors.header/
  html:messages id=error
bean:write name=error/
 /html:messages
 /logic:messagesPresent

regards
Jai

- Original Message -
From: David Graham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 13, 2003 11:38 AM
Subject: Re: ActionErrors


 Try using /login.jsp as your input value.

 David



 From: Diego Bursztyn [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Mailing [EMAIL PROTECTED]
 Subject: ActionErrors
 Date: Wed, 12 Feb 2003 17:17:51 -0500
 
 I'm having a problem with an action error.
 I have the following config:
 
 action path=/action/logon
  type=com.blah.actions.LogonAction
  name=logonForm
  scope=request
  validate=true
  input=login.jsp
  forward name=success path=/main_menu.jsp/
  forward name=failure path=/login.jsp/
 /action
 
 action form
 public ActionErrors validate(ActionMapping mapping, HttpServletRequest
 request)
  {
  ActionErrors errors = new ActionErrors();
  if ((username == null) || (username.length()  1))
  errors.add(username, new ActionError(error.username.required));
  if ((password == null) || (password.length()  1))
  errors.add(password, new ActionError(error.password.required));
 
  return errors;
  }
 
 if the username or the password is omitted when submitting the form,
 login.jsp should display on the browser with the error message, instead I
 get a blank browser with http://./action/logon.do on the url.
 What am I missing?
 
 Thanks,
 
 Diego.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 _
 Add photos to your messages with MSN 8. Get 2 months FREE*.
 http://join.msn.com/?page=features/featuredemail


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




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




Re: ActionErrors getting lost between action and JSP

2003-01-17 Thread Giri Alwar
When  you call the saveErrors(...) method in the Action class' execute
method, Struts will store the ActionErrors object under the default request
attribute name org.apache.struts.action.ERROR. In the JSP, when you add
the empty html:errors tag: html:errors/, Struts will look for this
attribute in the request and display the errors. There is generally no need
for you to save the errors under a different attribute name in the request
in your Action class or specify a name attribute in the html:errors tag.

You stated that you were saving the errors under the name errors in your
Action class but your earlier code snippet shows that you were just calling
saveErrors(...). Are you saving the errors yourself under a different
attribute name? If so, are you doing this in addition to or in place of
calling saveErrors()? It is not clear to me what your execute() method looks
like.

- Original Message -
From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 5:03 PM
Subject: RE: ActionErrors getting lost between action and JSP


 Hi there Giri

 I seem to have got this working... although not sure why it's doing what
it
 is. I've included my jsp.
 I basically traced though the SaveErrors method and saw that it appears to
 be changing the name of the actionErrors object on the request.
 - In my action i save it with the name : errors.
 - In the SaveMethod it seems to replace errors with:
 'org.apache.struts.action.ERROR'

 So now in my jsp, i just use that name in the name portion of the html
tag,
 like so:

 html:errors name=org.apache.struts.action.ERROR/

 Do you have any idea why this is happening ?

 I am using struts1.0.2. Our company will not go to 1.1 as it's still beta.
 :(



 ***
 Heres my overall jsp:


 ***
 %@ page language=java import=java.lang.*, java.util.* %

 %@ page import=org.apache.struts.action.Action %
 %@ page import=org.apache.struts.action.ActionErrors %

 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

 %
 response.setHeader(Cache-Control, no-cache);
 response.setHeader(Pragma, no-cache);
 response.setDateHeader(Expires, 0);
 %


 html
 head
 titleoops in gEm!/title
 script language=JavaScript
 src=../../static/js/rollUp.js/script
 link rel=stylesheet href=../../static/css/default.css
 type=text/css
 /head

 body bgcolor=#FF text=#00 leftmargin=0 topmargin=0
 marginwidth=0 marginheight=0

 html:form name=errors scope=request
 type=au.com.eclipsegroup.egem.valueObject.VOErrors
 action=/roleTypeCheck.do

 !-- Top error banner - got the link back to the homepage
 --
 jsp:include page=includes/99_errors_nav_top.jsp/


 table class=table border=0 cellspacing=0
 cellpadding=0 align=center
 tr
 td bgcolor=fed267 class=normal
 If you have come to this page - a critial system error has occured.
 Unfortunately your current changes will be lost. Please take note of the
 error message(s), and then click on the above 'myCareer' tag to return to
 your home page /td
 /tr

 trtdnbsp;/td/tr

 tr
 td bgcolor=fed267 class=error
 html:errors
 name=org.apache.struts.action.ERROR/
 /td

 /tr

 trtdnbsp;/td/tr
 trtd bgcolor=fed267 class=normalTake
 heart in knowing the issue will be resolved !/td/tr
 /table

 /div
 /html:form

 /body
 /html



 ***
 Here's my struts-config portion


 ***
 actionpath=/preCreateCareerPlan

 type=au.com.eclipsegroup.egem.actions.cde.cp.PreCreateCareerPlanAction
   scope=request
validate=true
   forward name=success
path=/jsp/cde/cp/createCP.jsp/
   forward name=failure  path=/jsp/errors.jsp/
 /action


 Any ideas why the object is getting renamed on the request ?

 Thanks Giri
 Giles



 -Original Message-
 From: Giri Alwar [mailto:[EMAIL PROTECTED]]
 Sent: Friday, 17 January 2003 5:55 AM
 To: Struts Users Mailing List
 Subject: Re: ActionErrors getting lost between action and JSP


 See my comments below.

 - Original Message -
 From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Wednesday, January 15, 2003 10:03 PM
 Subject: RE: ActionErrors getting lost between action and JSP


  Hi there Giri
 
  Thanks for your reply. The thing is... these are all the options I have
  tried.
 
  I've removed all the irrelevant code from my source for you to look at:
  
  log.error(Add some errors to check this working !!!);
 
  errors.add(test1, new ActionError(errors.moreThanOneEmployee));
  errors.add(test2, new ActionError(errors.XMLHydration));
 
 
  log.debug(Wot is the size of the actionErrors

Re: ActionErrors getting lost between action and JSP

2003-01-16 Thread Giri Alwar
See my comments below.

- Original Message -
From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 10:03 PM
Subject: RE: ActionErrors getting lost between action and JSP


 Hi there Giri

 Thanks for your reply. The thing is... these are all the options I have
 tried.

 I've removed all the irrelevant code from my source for you to look at:
 
 log.error(Add some errors to check this working !!!);

 errors.add(test1, new ActionError(errors.moreThanOneEmployee));
 errors.add(test2, new ActionError(errors.XMLHydration));


 log.debug(Wot is the size of the actionErrors:  + errors.size());
 saveErrors(request, errors);

 return (mapping.findForward(failure));


This part looks ok.

 ...

 - As i said before... the logging statement shows two errors in the
 actionErrors object.
 - Tracing through the SaveErrors method the errors are still there...
 - It's on leaving the action, and entering into the html:errors tag that
it
 appears empty.


Can you post the JSP portion where you are trying to display the errors?
Also, can you post the action mapping including the forward element for
failure? Which version of Struts are you using?


 - I don't need to use the property names, as I want ALL the errors to
appear
 on the page.

 This is kinda driving me nuts -  not sure where else I can trace ! Is
there
 anything I need in my struts.config?

 Am i right is assuming that you DON'T need a form bean for the errors
page.
 ie - can i just put the errors on the request, and forward ?


Yes, you are right. Errors have nothing to do with form beans.


 Cheers
 Giles

 PS: ohhh... and both (errors.morethanoneEmployee and errrors.XMLHy...) are
 defined in my app.resources


 -Original Message-
 From: Giri Alwar [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, 16 January 2003 1:49 PM
 To: Struts Users Mailing List
 Subject: Re: ActionErrors getting lost between action and JSP


 You need to save the ActionErrors object in the request in order to access
 it from the JSP. The simplest way to do this is as follows:

 In your Action class,
 ActionErrors errors = new ActionErrors();

 errors.add(some property name, new ActionError(some.key));

 // The next step is important if you will use the default attribute
name
 saveErrors(request, errors);

 return mapping.findForward(failure);

 In your JSP,
 html:errors/

 This should output all the errors regardless of property name.

 - Original Message -
 From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Wednesday, January 15, 2003 6:57 PM
 Subject: ActionErrors getting lost between action and JSP


  Hi there guys
 
  Wonder if you can help. I am trying to get the struts actionErrors to
 appear
  on my error page.
  I can get them working when I use the html:errors tag and specify the
 exact
  error I'm after, however I am now trying to output ALL the errors...
with
  zero luck so far.
 
  I have added two errors to the actionErrors object in my action like so:
 
  if (true)
  {
 
  log.error(MAJOR DEBUGGING !!!);
  actionErrors.add(careerPlan.help,
  new ActionError
  (errors.updatingError, fingers,
 CareerPlan));
 
  actionErrors.add(careerPlan.help,
  new ActionError
  (errors.XMLHydration ));
 
  //request.setAttribute(errors, errors);
 
  VOErrors errors = new VOErrors(actionErrors);
  request.setAttribute(errors,errors);
  log.debug(Wot is the size of the actionErrors:

 +
  actionErrors.size());
  // XXX this always comes back as 2
 
  // Try just place a string array on request
 
  /*
  String a = this is my first error;
  String b = this is my second error;
  String c = this is my third error;
 
  errors.add(a);
  errors.add(b);
  errors.add(c);
 
  request.setAttribute(errors, errors);
  //XXX this didn't work either XXX
  */
 
  return (mapping.findForward(failure));
  }
 
  The options i've tryed so far are:
 a)creating actionErrors, adding it to the request, and then
forwarding
 to
  my error page
  b)creating a VOErrors, adding the actionErrors to the VO and
 forwarding
  this VO to my error page
   c)creating an arrayList of strings called errors, and forwarding to
 my
  error page
 
  When tracing through my action, on leaving the action I can see that
there
  are two errors

Re: ActionErrors getting lost between action and JSP

2003-01-16 Thread James Mitchell
Sorry if this was mentioned, but are you using redirect=true for that
action-mapping?


--
James Mitchell





- Original Message -
From: Giri Alwar [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 1:55 PM
Subject: Re: ActionErrors getting lost between action and JSP


 See my comments below.

 - Original Message -
 From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
 To: 'Struts Users Mailing List' [EMAIL PROTECTED]
 Sent: Wednesday, January 15, 2003 10:03 PM
 Subject: RE: ActionErrors getting lost between action and JSP


  Hi there Giri
 
  Thanks for your reply. The thing is... these are all the options I have
  tried.
 
  I've removed all the irrelevant code from my source for you to look at:
  
  log.error(Add some errors to check this working !!!);
 
  errors.add(test1, new ActionError(errors.moreThanOneEmployee));
  errors.add(test2, new ActionError(errors.XMLHydration));
 
 
  log.debug(Wot is the size of the actionErrors:  + errors.size());
  saveErrors(request, errors);
 
  return (mapping.findForward(failure));
 

 This part looks ok.

  ...
 
  - As i said before... the logging statement shows two errors in the
  actionErrors object.
  - Tracing through the SaveErrors method the errors are still
there...
  - It's on leaving the action, and entering into the html:errors tag that
 it
  appears empty.
 

 Can you post the JSP portion where you are trying to display the errors?
 Also, can you post the action mapping including the forward element for
 failure? Which version of Struts are you using?


  - I don't need to use the property names, as I want ALL the errors to
 appear
  on the page.
 
  This is kinda driving me nuts -  not sure where else I can trace ! Is
 there
  anything I need in my struts.config?
 
  Am i right is assuming that you DON'T need a form bean for the errors
 page.
  ie - can i just put the errors on the request, and forward ?
 

 Yes, you are right. Errors have nothing to do with form beans.


  Cheers
  Giles
 
  PS: ohhh... and both (errors.morethanoneEmployee and errrors.XMLHy...)
are
  defined in my app.resources
 
 
  -Original Message-
  From: Giri Alwar [mailto:[EMAIL PROTECTED]]
  Sent: Thursday, 16 January 2003 1:49 PM
  To: Struts Users Mailing List
  Subject: Re: ActionErrors getting lost between action and JSP
 
 
  You need to save the ActionErrors object in the request in order to
access
  it from the JSP. The simplest way to do this is as follows:
 
  In your Action class,
  ActionErrors errors = new ActionErrors();
 
  errors.add(some property name, new ActionError(some.key));
 
  // The next step is important if you will use the default attribute
 name
  saveErrors(request, errors);
 
  return mapping.findForward(failure);
 
  In your JSP,
  html:errors/
 
  This should output all the errors regardless of property name.
 
  - Original Message -
  From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Sent: Wednesday, January 15, 2003 6:57 PM
  Subject: ActionErrors getting lost between action and JSP
 
 
   Hi there guys
  
   Wonder if you can help. I am trying to get the struts actionErrors to
  appear
   on my error page.
   I can get them working when I use the html:errors tag and specify the
  exact
   error I'm after, however I am now trying to output ALL the errors...
 with
   zero luck so far.
  
   I have added two errors to the actionErrors object in my action like
so:
  
   if (true)
   {
  
   log.error(MAJOR DEBUGGING !!!);
   actionErrors.add(careerPlan.help,
   new ActionError
   (errors.updatingError, fingers,
  CareerPlan));
  
   actionErrors.add(careerPlan.help,
   new ActionError
   (errors.XMLHydration ));
  
   //request.setAttribute(errors, errors);
  
   VOErrors errors = new VOErrors(actionErrors);
   request.setAttribute(errors,errors);
   log.debug(Wot is the size of the
actionErrors:
 
  +
   actionErrors.size());
   // XXX this always comes back as 2
  
   // Try just place a string array on request
  
   /*
   String a = this is my first error;
   String b = this is my second error;
   String c = this is my third error;
  
   errors.add(a);
   errors.add(b);
   errors.add(c);
  
   request.setAttribute(errors, errors);
   //XXX this didn't work either XXX
   */
  
   return

Re: ActionErrors getting lost between action and JSP

2003-01-16 Thread Giri Alwar
This was what I was looking for as well when I requested that he provide the
action mapping (specifically the forward element) in my reply below.

- Original Message -
From: James Mitchell [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Thursday, January 16, 2003 1:10 PM
Subject: Re: ActionErrors getting lost between action and JSP


 Sorry if this was mentioned, but are you using redirect=true for that
 action-mapping?


 --
 James Mitchell





 - Original Message -
 From: Giri Alwar [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Thursday, January 16, 2003 1:55 PM
 Subject: Re: ActionErrors getting lost between action and JSP


  See my comments below.
 
  - Original Message -
  From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
  To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  Sent: Wednesday, January 15, 2003 10:03 PM
  Subject: RE: ActionErrors getting lost between action and JSP
 
 
   Hi there Giri
  
   Thanks for your reply. The thing is... these are all the options I
have
   tried.
  
   I've removed all the irrelevant code from my source for you to look
at:
   
   log.error(Add some errors to check this working !!!);
  
   errors.add(test1, new ActionError(errors.moreThanOneEmployee));
   errors.add(test2, new ActionError(errors.XMLHydration));
  
  
   log.debug(Wot is the size of the actionErrors:  + errors.size());
   saveErrors(request, errors);
  
   return (mapping.findForward(failure));
  
 
  This part looks ok.
 
   ...
  
   - As i said before... the logging statement shows two errors in the
   actionErrors object.
   - Tracing through the SaveErrors method the errors are still
 there...
   - It's on leaving the action, and entering into the html:errors tag
that
  it
   appears empty.
  
 
  Can you post the JSP portion where you are trying to display the errors?
  Also, can you post the action mapping including the forward element for
  failure? Which version of Struts are you using?
 
 
   - I don't need to use the property names, as I want ALL the errors to
  appear
   on the page.
  
   This is kinda driving me nuts -  not sure where else I can trace ! Is
  there
   anything I need in my struts.config?
  
   Am i right is assuming that you DON'T need a form bean for the errors
  page.
   ie - can i just put the errors on the request, and forward ?
  
 
  Yes, you are right. Errors have nothing to do with form beans.
 
 
   Cheers
   Giles
  
   PS: ohhh... and both (errors.morethanoneEmployee and errrors.XMLHy...)
 are
   defined in my app.resources
  
  
   -Original Message-
   From: Giri Alwar [mailto:[EMAIL PROTECTED]]
   Sent: Thursday, 16 January 2003 1:49 PM
   To: Struts Users Mailing List
   Subject: Re: ActionErrors getting lost between action and JSP
  
  
   You need to save the ActionErrors object in the request in order to
 access
   it from the JSP. The simplest way to do this is as follows:
  
   In your Action class,
   ActionErrors errors = new ActionErrors();
  
   errors.add(some property name, new ActionError(some.key));
  
   // The next step is important if you will use the default
attribute
  name
   saveErrors(request, errors);
  
   return mapping.findForward(failure);
  
   In your JSP,
   html:errors/
  
   This should output all the errors regardless of property name.
  
   - Original Message -
   From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
   To: 'Struts Users Mailing List' [EMAIL PROTECTED]
   Sent: Wednesday, January 15, 2003 6:57 PM
   Subject: ActionErrors getting lost between action and JSP
  
  
Hi there guys
   
Wonder if you can help. I am trying to get the struts actionErrors
to
   appear
on my error page.
I can get them working when I use the html:errors tag and specify
the
   exact
error I'm after, however I am now trying to output ALL the errors...
  with
zero luck so far.
   
I have added two errors to the actionErrors object in my action like
 so:
   
if (true)
{
   
log.error(MAJOR DEBUGGING !!!);
actionErrors.add(careerPlan.help,
new ActionError
(errors.updatingError, fingers,
   CareerPlan));
   
actionErrors.add(careerPlan.help,
new ActionError
(errors.XMLHydration ));
   
//request.setAttribute(errors, errors);
   
VOErrors errors = new
VOErrors(actionErrors);
request.setAttribute(errors,errors);
log.debug(Wot is the size of the
 actionErrors:
  
   +
actionErrors.size());
// XXX this always comes back as 2
   
// Try just place a string array on request

RE: ActionErrors getting lost between action and JSP

2003-01-16 Thread Parnell, Giles (AU - Sydney)
Hi there Giri

I seem to have got this working... although not sure why it's doing what it
is. I've included my jsp.
I basically traced though the SaveErrors method and saw that it appears to
be changing the name of the actionErrors object on the request. 
- In my action i save it with the name : errors. 
- In the SaveMethod it seems to replace errors with:
'org.apache.struts.action.ERROR'

So now in my jsp, i just use that name in the name portion of the html tag,
like so:

html:errors name=org.apache.struts.action.ERROR/

Do you have any idea why this is happening ?

I am using struts1.0.2. Our company will not go to 1.1 as it's still beta.
:(


***
Heres my overall jsp:

***
%@ page language=java import=java.lang.*, java.util.* %

%@ page import=org.apache.struts.action.Action % 
%@ page import=org.apache.struts.action.ActionErrors %

%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

%  
response.setHeader(Cache-Control, no-cache);
response.setHeader(Pragma, no-cache);
response.setDateHeader(Expires, 0);
%


html
head
titleoops in gEm!/title
script language=JavaScript
src=../../static/js/rollUp.js/script
link rel=stylesheet href=../../static/css/default.css
type=text/css
/head

body bgcolor=#FF text=#00 leftmargin=0 topmargin=0
marginwidth=0 marginheight=0

html:form name=errors scope=request
type=au.com.eclipsegroup.egem.valueObject.VOErrors
action=/roleTypeCheck.do

!-- Top error banner - got the link back to the homepage
-- 
jsp:include page=includes/99_errors_nav_top.jsp/


table class=table border=0 cellspacing=0
cellpadding=0 align=center 
tr
td bgcolor=fed267 class=normal
If you have come to this page - a critial system error has occured.
Unfortunately your current changes will be lost. Please take note of the
error message(s), and then click on the above 'myCareer' tag to return to
your home page /td
/tr

trtdnbsp;/td/tr

tr
td bgcolor=fed267 class=error
html:errors
name=org.apache.struts.action.ERROR/
/td

/tr

trtdnbsp;/td/tr
trtd bgcolor=fed267 class=normalTake
heart in knowing the issue will be resolved !/td/tr
/table

/div
/html:form

/body 
/html


***
Here's my struts-config portion

***
actionpath=/preCreateCareerPlan
 
type=au.com.eclipsegroup.egem.actions.cde.cp.PreCreateCareerPlanAction
  scope=request
   validate=true
  forward name=success  path=/jsp/cde/cp/createCP.jsp/
  forward name=failure  path=/jsp/errors.jsp/
/action


Any ideas why the object is getting renamed on the request ?

Thanks Giri
Giles



-Original Message-
From: Giri Alwar [mailto:[EMAIL PROTECTED]]
Sent: Friday, 17 January 2003 5:55 AM
To: Struts Users Mailing List
Subject: Re: ActionErrors getting lost between action and JSP


See my comments below.

- Original Message -
From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 10:03 PM
Subject: RE: ActionErrors getting lost between action and JSP


 Hi there Giri

 Thanks for your reply. The thing is... these are all the options I have
 tried.

 I've removed all the irrelevant code from my source for you to look at:
 
 log.error(Add some errors to check this working !!!);

 errors.add(test1, new ActionError(errors.moreThanOneEmployee));
 errors.add(test2, new ActionError(errors.XMLHydration));


 log.debug(Wot is the size of the actionErrors:  + errors.size());
 saveErrors(request, errors);

 return (mapping.findForward(failure));


This part looks ok.

 ...

 - As i said before... the logging statement shows two errors in the
 actionErrors object.
 - Tracing through the SaveErrors method the errors are still there...
 - It's on leaving the action, and entering into the html:errors tag that
it
 appears

Re: ActionErrors getting lost between action and JSP

2003-01-15 Thread Giri Alwar
You need to save the ActionErrors object in the request in order to access
it from the JSP. The simplest way to do this is as follows:

In your Action class,
ActionErrors errors = new ActionErrors();

errors.add(some property name, new ActionError(some.key));

// The next step is important if you will use the default attribute name
saveErrors(request, errors);

return mapping.findForward(failure);

In your JSP,
html:errors/

This should output all the errors regardless of property name.

- Original Message -
From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 6:57 PM
Subject: ActionErrors getting lost between action and JSP


 Hi there guys

 Wonder if you can help. I am trying to get the struts actionErrors to
appear
 on my error page.
 I can get them working when I use the html:errors tag and specify the
exact
 error I'm after, however I am now trying to output ALL the errors... with
 zero luck so far.

 I have added two errors to the actionErrors object in my action like so:

 if (true)
 {

 log.error(MAJOR DEBUGGING !!!);
 actionErrors.add(careerPlan.help,
 new ActionError
 (errors.updatingError, fingers,
CareerPlan));

 actionErrors.add(careerPlan.help,
 new ActionError
 (errors.XMLHydration ));

 //request.setAttribute(errors, errors);

 VOErrors errors = new VOErrors(actionErrors);
 request.setAttribute(errors,errors);
 log.debug(Wot is the size of the actionErrors: 
+
 actionErrors.size());
 // XXX this always comes back as 2

 // Try just place a string array on request

 /*
 String a = this is my first error;
 String b = this is my second error;
 String c = this is my third error;

 errors.add(a);
 errors.add(b);
 errors.add(c);

 request.setAttribute(errors, errors);
 //XXX this didn't work either XXX
 */

 return (mapping.findForward(failure));
 }

 The options i've tryed so far are:
a)creating actionErrors, adding it to the request, and then forwarding
to
 my error page
 b)creating a VOErrors, adding the actionErrors to the VO and
forwarding
 this VO to my error page
  c)creating an arrayList of strings called errors, and forwarding to
my
 error page

 When tracing through my action, on leaving the action I can see that there
 are two errors in the actionErrors object. However on hitting the jsp
page,
 and tracing through the html:errors tag - the errors object is always
empty.

 Heres my jsp:
 %@ page language=java import=org.apache.struts.action.ActionErrors,
 java.lang.*, java.util.*, au.com.eclipsegroup.egem.valueObject.VOErrors
%

 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

 %
 response.setHeader(Cache-Control, no-cache);
 response.setHeader(Pragma, no-cache);
 response.setDateHeader(Expires, 0);
 %

 html
 head
 titleoops in gEm!/title
 script language=JavaScript
 src=../../static/js/rollUp.js/script
 link rel=stylesheet href=../../static/css/default.css
 type=text/css
 /head

 body bgcolor=#FF text=#00 leftmargin=0
topmargin=0
 marginwidth=0 marginheight=0

 ! DO i even need a form been? ... or can i just place the
 actionErrors in the request and then use the html:errors tag ???
 html:form name=errors scope=request
 type=au.com.eclipsegroup.egem.valueObject.VOErrors
 action=/roleTypeCheck.do

 !-- Top error banner - got the link back to the homepage
 --
 jsp:include page=includes/99_errors_nav_top.jsp/


 table class=table border=0 cellspacing=0
 cellpadding=0 align=center
 tr
 td bgcolor=fed267
class=normal
 The following error(s) have occured - please fix or contact the system
 administrator for help. /td

 /tr
 tr

 td bgcolor=fed267
class=error
 !-- XXX debuggin --
 % if
 (request.getAttribute(errors) != null)
 {

ActionErrors
 e = (ActionErrors) request.getAttribute(errors);


   

RE: ActionErrors getting lost between action and JSP

2003-01-15 Thread Parnell, Giles (AU - Sydney)
Hi there Giri

Thanks for your reply. The thing is... these are all the options I have
tried.

I've removed all the irrelevant code from my source for you to look at:

log.error(Add some errors to check this working !!!);

errors.add(test1, new ActionError(errors.moreThanOneEmployee));
errors.add(test2, new ActionError(errors.XMLHydration));


log.debug(Wot is the size of the actionErrors:  + errors.size());
saveErrors(request, errors);

return (mapping.findForward(failure));

...

- As i said before... the logging statement shows two errors in the
actionErrors object.
- Tracing through the SaveErrors method the errors are still there...
- It's on leaving the action, and entering into the html:errors tag that it
appears empty.

- I don't need to use the property names, as I want ALL the errors to appear
on the page.

This is kinda driving me nuts -  not sure where else I can trace ! Is there
anything I need in my struts.config?

Am i right is assuming that you DON'T need a form bean for the errors page.
ie - can i just put the errors on the request, and forward ?

Cheers
Giles

PS: ohhh... and both (errors.morethanoneEmployee and errrors.XMLHy...) are
defined in my app.resources


-Original Message-
From: Giri Alwar [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 16 January 2003 1:49 PM
To: Struts Users Mailing List
Subject: Re: ActionErrors getting lost between action and JSP


You need to save the ActionErrors object in the request in order to access
it from the JSP. The simplest way to do this is as follows:

In your Action class,
ActionErrors errors = new ActionErrors();

errors.add(some property name, new ActionError(some.key));

// The next step is important if you will use the default attribute name
saveErrors(request, errors);

return mapping.findForward(failure);

In your JSP,
html:errors/

This should output all the errors regardless of property name.

- Original Message -
From: Parnell, Giles (AU - Sydney) [EMAIL PROTECTED]
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Wednesday, January 15, 2003 6:57 PM
Subject: ActionErrors getting lost between action and JSP


 Hi there guys

 Wonder if you can help. I am trying to get the struts actionErrors to
appear
 on my error page.
 I can get them working when I use the html:errors tag and specify the
exact
 error I'm after, however I am now trying to output ALL the errors... with
 zero luck so far.

 I have added two errors to the actionErrors object in my action like so:

 if (true)
 {

 log.error(MAJOR DEBUGGING !!!);
 actionErrors.add(careerPlan.help,
 new ActionError
 (errors.updatingError, fingers,
CareerPlan));

 actionErrors.add(careerPlan.help,
 new ActionError
 (errors.XMLHydration ));

 //request.setAttribute(errors, errors);

 VOErrors errors = new VOErrors(actionErrors);
 request.setAttribute(errors,errors);
 log.debug(Wot is the size of the actionErrors: 
+
 actionErrors.size());
 // XXX this always comes back as 2

 // Try just place a string array on request

 /*
 String a = this is my first error;
 String b = this is my second error;
 String c = this is my third error;

 errors.add(a);
 errors.add(b);
 errors.add(c);

 request.setAttribute(errors, errors);
 //XXX this didn't work either XXX
 */

 return (mapping.findForward(failure));
 }

 The options i've tryed so far are:
a)creating actionErrors, adding it to the request, and then forwarding
to
 my error page
 b)creating a VOErrors, adding the actionErrors to the VO and
forwarding
 this VO to my error page
  c)creating an arrayList of strings called errors, and forwarding to
my
 error page

 When tracing through my action, on leaving the action I can see that there
 are two errors in the actionErrors object. However on hitting the jsp
page,
 and tracing through the html:errors tag - the errors object is always
empty.

 Heres my jsp:
 %@ page language=java import=org.apache.struts.action.ActionErrors,
 java.lang.*, java.util.*, au.com.eclipsegroup.egem.valueObject.VOErrors
%

 %@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
 %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %

 %
 response.setHeader(Cache-Control, no-cache);
 response.setHeader(Pragma, no-cache

RE: ActionErrors question

2003-01-10 Thread Alvarado, Juan (c)
It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
html:errors... I suggest you move those keys to the default message
resource file in your app.

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...
html:errors /

However, this displays nothing _unless_ I do html:errors bundle=key/

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



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




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




RE: ActionErrors question

2003-01-10 Thread Andy Kriger
So the bundle that holds the errors depends on the bundle that the keys come
from? Is there any way to separate this so that all errors always go to one
bundle regardless of where the message keys are stored? (that design seems
out-of-line with the rest of Struts which usually has good

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 15:32
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors question


It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
html:errors... I suggest you move those keys to the default message
resource file in your app.

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...
html:errors /

However, this displays nothing _unless_ I do html:errors bundle=key/

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



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




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



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




RE: ActionErrors question

2003-01-10 Thread Andy Kriger
(oops - sloppy fingers on a friday afternoon - ignore that last message)

So the bundle that holds the errors depends on the bundle that the keys come
from? Is there any way to separate this so that all errors always go to one
bundle regardless of where the message keys are stored? (that design seems
out-of-line with the rest of Struts which usually has good separation of
functionality)

thx

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 15:32
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors question


It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
html:errors... I suggest you move those keys to the default message
resource file in your app.

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...
html:errors /

However, this displays nothing _unless_ I do html:errors bundle=key/

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



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




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



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




RE: ActionErrors question

2003-01-10 Thread Alvarado, Juan (c)
I am not aware of any way to do what you propose.  As far as I know all an
ActionError object does is hold the key you want to use. If bundle is not
specified in your JSP, then it defaults to the default resource bundle. In
this case that key has to exist in that bundle. Otherwise you have to
specify in html:errors which bundle your keys are stored under.

If anyone else has a way to do what you propose I'd like to hear it.

Thanks

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:52 PM
To: Struts Users Mailing List
Subject: RE: ActionErrors question


(oops - sloppy fingers on a friday afternoon - ignore that last message)

So the bundle that holds the errors depends on the bundle that the keys come
from? Is there any way to separate this so that all errors always go to one
bundle regardless of where the message keys are stored? (that design seems
out-of-line with the rest of Struts which usually has good separation of
functionality)

thx

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 15:32
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors question


It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
html:errors... I suggest you move those keys to the default message
resource file in your app.

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...
html:errors /

However, this displays nothing _unless_ I do html:errors bundle=key/

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



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




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



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




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




RE: ActionErrors question

2003-01-10 Thread pqin
html:errors bundle=yourbundle/

Regards,
 
 
PQ
 
This Guy Thinks He Knows Everything
This Guy Thinks He Knows What He Is Doing

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]] 
Sent: January 10, 2003 3:51 PM
To: Struts Users Mailing List
Subject: RE: ActionErrors question

So the bundle that holds the errors depends on the bundle that the keys come
from? Is there any way to separate this so that all errors always go to one
bundle regardless of where the message keys are stored? (that design seems
out-of-line with the rest of Struts which usually has good

-Original Message-
From: Alvarado, Juan (c) [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 15:32
To: 'Struts Users Mailing List'
Subject: RE: ActionErrors question


It sounds to me like the keys that you are using in your action errors are
in the non-default message resource file in your application; the one with
the key defined.

If you don't want to use the bundle attribute in your call to
html:errors... I suggest you move those keys to the default message
resource file in your app.

-Original Message-
From: Andy Kriger [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 10, 2003 3:34 PM
To: Struts Users Mailing List
Subject: ActionErrors question


I have 2 message-resources defined in my webapp (one has a key defined the
other does not). In one action, I am getting messages from the non-default
message-resource (the one with a key defined). In that action I also create
an errors object and add errors to it...

getResource(request, key)
ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(key, val1, val2);
saveErrors(request, errors);
mapping.findForward(...);

In the JSP I display the errors...
html:errors /

However, this displays nothing _unless_ I do html:errors bundle=key/

Why are the errors added in the 'key' bundle instead of the default bundle?

This is with Struts 1.1b2.

thx
andy



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




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



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



RE: ActionErrors - html:errors/

2002-12-23 Thread Arnaud HERITIER
You can use the property attribute of html:errors/

In your Action or in your FormBean you save your errors under an appropriate
key :

In an action :

ActionErrors errors = new ActionErrors();

errors.add(Constants.FATAL_LEVEL, new ActionError());
or
errors.add(Constants.ERROR_LEVEL, new ActionError());
or
errors.add(Constants.WARN_LEVEL, new ActionError());
or
errors.add(Constants.INFO_LEVEL, new ActionError());

saveErrors(request,errors);


In a FormBean validation method :

ActionErrors errors = new ActionErrors();

errors.add(Constants.FATAL_LEVEL, new ActionError());
or
errors.add(Constants.ERROR_LEVEL, new ActionError());
or
errors.add(Constants.WARN_LEVEL, new ActionError());
or
errors.add(Constants.INFO_LEVEL, new ActionError());

return errors;

And in your JSP you retreives errors with :

My Fatal errors :
html:errors property=Constants.FATAL_LEVEL/
My Infos :
html:errors property=Constants.INFO_LEVEL/

For your problem with the pop-up window I saw in the mailing list several
month ago someone who done it.
Try to search in the archives.

Arnaud


 -Message d'origine-
 De : Puneet Agarwal [mailto:[EMAIL PROTECTED]]
 Envoyé : lundi 23 décembre 2002 11:45
 À : [EMAIL PROTECTED]
 Objet : ActionErrors - html:errors/


 In our application we have to show the errors, warnings, and
 informative messages to the users in a separate pop-up
 modal-window.
 (This is not for logging purpose as provided by Log4J).

 If we use ActionErrors, for this purpose, we shall have two
 problems

 1. How to categories them as Fatal, Errors, Warnings,
 Information.
 2. html:errors/, shows all of them in the same window, how to
 segragate them into different types.

 Any help in this regard may help me in getting Struts used in our
 project.

 Also if any of the developers, who read this mail, think that
 this features can be developed into struts, I shall be more than
 ready to do this.

 I have been working on Struts for past 4-5 months, and have been
 into software industry for only 5 years.

 Thanks in Advance
 Puneet



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



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




Re: ActionErrors = Null

2002-12-13 Thread Gemes Tibor
2002. december 13. 11:12 dátummal Jordan Thomas ezt írtad:
 Hi,

 If I call

 ActionErrors errors = languageForm.validate( mapping, request );

Because if you receive the execute method of your Action, you will be ensured 
that there was no validating error in the Form. If there were any error, the 
struts framework would have forwarded back to the input page before even the 
Action would have been reached.

Hth,

Tib

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




RE: ActionErrors = Null

2002-12-13 Thread Jordan Thomas
OK, thanks for that.

cheers

Jordan

-Original Message-
From: Gemes Tibor [mailto:[EMAIL PROTECTED]]
Sent: Friday, 13 December 2002 11:31 AM
To: Struts Users Mailing List
Subject: Re: ActionErrors = Null


2002. december 13. 11:12 dátummal Jordan Thomas ezt írtad:
 Hi,

 If I call

 ActionErrors errors = languageForm.validate( mapping, request );

Because if you receive the execute method of your Action, you will be
ensured
that there was no validating error in the Form. If there were any error, the
struts framework would have forwarded back to the input page before even the
Action would have been reached.

Hth,

Tib

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


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




Re: ActionErrors = Null

2002-12-13 Thread David Graham
null is a valid return from the validate method.  It indicates there were no 
errors.  An empty ActionErrors object also indicates that.  See the javadoc 
for details.

David






From: Jordan Thomas [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts-User [EMAIL PROTECTED]
Subject: ActionErrors = Null
Date: Fri, 13 Dec 2002 11:12:08 +0100

Hi,

If I call

ActionErrors errors = languageForm.validate( mapping, request );

How can be errors null?

thanks

Jordan

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


_
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
http://join.msn.com/?page=features/virus


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



Re: ActionErrors

2002-10-09 Thread Dave Derry

Another solution is to define a generic message key in the properties file.
Something like error.generic={0}.
Then create your ActionError as new ActionError( error.generic, My
specific error message );

Dave Derry

- Original Message -
From: Andrew Hill [EMAIL PROTECTED]
 2.) Ah, now this is a real question!
 I had a glance at the source for the errors tag and it is here that the
key
 of the error object is used to look up the i18n message from the bundle
(ie:
 its not done in the error object itself).
 I presume your aim is to be able mix normal errors and your custom errors
 together?
 If this is the case, your best bet may well be ( there are probably
better
 ways) to create your own tag (based on errors tag) that displays both your
 custom errors and normal ones, and create your own error objects that
extend
 ActionError (and that your error tag will recognise as a custom error).

 -Original Message-
 From: Maizatulakmam Ali [mailto:[EMAIL PROTECTED]]


 I want to know how :
 1. To display errors at specific location . Not such the normal one
 which we display the errors in a bundle.
 2. To add custom errors instead of reading the errors from
 ApplicationResource.properties

 I need the answer as soon a possible.




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




RE: ActionErrors

2002-10-08 Thread Andrew Hill

1.) Alamak! Didnt you so much as glance at the docs for the html:errors tag?
Im sure you can find all the information you require at this link (Warning:
contains rude language):
http://altgeek.org/methuselah/rtfm/
;-)
hehe if that one is no help can also try the struts manual:
http://jakarta.apache.org/struts/doc-1.0.2/api/org/apache/struts/taglib/html
/package-summary.html#package_description
and
http://jakarta.apache.org/struts/doc-1.0.2/struts-html.html#errors
(look at the property attribute)

2.) Ah, now this is a real question!
I had a glance at the source for the errors tag and it is here that the key
of the error object is used to look up the i18n message from the bundle (ie:
its not done in the error object itself).
I presume your aim is to be able mix normal errors and your custom errors
together?
If this is the case, your best bet may well be ( there are probably better
ways) to create your own tag (based on errors tag) that displays both your
custom errors and normal ones, and create your own error objects that extend
ActionError (and that your error tag will recognise as a custom error).

-Original Message-
From: Maizatulakmam Ali [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, October 09, 2002 08:50
To: [EMAIL PROTECTED]
Subject: ActionErrors


I want to know how :
1. To display errors at specific location . Not such the normal one
which we display the errors in a bundle.
2. To add custom errors instead of reading the errors from
ApplicationResource.properties

I need the answer as soon a possible.




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


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




Re: ActionErrors - where to get it from

2002-10-02 Thread Craig R. McClanahan



On Wed, 2 Oct 2002, Thomas Eichberger wrote:

 Date: Wed, 02 Oct 2002 21:35:08 +0200
 From: Thomas Eichberger [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Subject: ActionErrors - where to get it from

 Hi,

 sorry for that question but I cannot find it in the docs or even in the
 sources:

 Where is the current ActionErrors object stored? In the session or in the
 request? I cannot find it. I was looking in the request parameters, the
 request attributes, and the session attributes.


By default, it's stored as a request attribute under the key
Action.ERROR_KEY, but there won't be an object there unless an error
actually did occur.


 I have to access it directly, because I have two forms in the same jsp
 file, and the errors of form 1 are shown in form 2, too, and vice versa.


 Ciao

 Thomas


Craig


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




Re: ActionErrors for General Messages

2002-10-01 Thread David Graham

I think this is why struts added the ActionMessages class to 1.1.  You might 
look into this and how it works with the tags.

Dave


From: Mark Silva [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: ActionErrors for General Messages
Date: Tue, 1 Oct 2002 14:21:54 -0700

I am thinking of using ActionErrors for general messaging on my pages.  
Since I have the hrml:errors tag, placed well for messages to the user, I 
would like to pass messages such as Operation Successful, or Item Added

Is it ok to use the ActionErrors this way?  Any reason to call it bad 
practice?  Seems very convenient... for more than just errors.

thanks,
mark

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




_
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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




RE: ActionErrors for General Messages

2002-10-01 Thread Mark Silva

ah,

i am still using Struts 1.02, and am not plannig on upgrading yet.  I really don't 
need most of the new functionality yet.  Does anybody know if this will be easy to 
port to when i do upgrade?

thanks,
mark


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 2:28 PM
To: [EMAIL PROTECTED]
Subject: Re: ActionErrors for General Messages


I think this is why struts added the ActionMessages class to 1.1.  You might 
look into this and how it works with the tags.

Dave


From: Mark Silva [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: ActionErrors for General Messages
Date: Tue, 1 Oct 2002 14:21:54 -0700

I am thinking of using ActionErrors for general messaging on my pages.  
Since I have the hrml:errors tag, placed well for messages to the user, I 
would like to pass messages such as Operation Successful, or Item Added

Is it ok to use the ActionErrors this way?  Any reason to call it bad 
practice?  Seems very convenient... for more than just errors.

thanks,
mark

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




_
Join the world's largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


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


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




RE: ActionErrors for General Messages

2002-10-01 Thread David Graham

I had a fairly easy port to 1.1 but I did it mid project so I didn't have as 
much code to move.  I think the new messages tag is the equivalent to the 
errors tag but more general purpose.

Dave


From: Mark Silva [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: ActionErrors for General Messages
Date: Tue, 1 Oct 2002 14:33:28 -0700

ah,

i am still using Struts 1.02, and am not plannig on upgrading yet.  I 
really don't need most of the new functionality yet.  Does anybody know if 
this will be easy to port to when i do upgrade?

thanks,
mark


-Original Message-
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 2:28 PM
To: [EMAIL PROTECTED]
Subject: Re: ActionErrors for General Messages


I think this is why struts added the ActionMessages class to 1.1.  You 
might
look into this and how it works with the tags.

Dave


 From: Mark Silva [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: ActionErrors for General Messages
 Date: Tue, 1 Oct 2002 14:21:54 -0700
 
 I am thinking of using ActionErrors for general messaging on my pages.
 Since I have the hrml:errors tag, placed well for messages to the user, I
 would like to pass messages such as Operation Successful, or Item 
Added
 
 Is it ok to use the ActionErrors this way?  Any reason to call it bad
 practice?  Seems very convenient... for more than just errors.
 
 thanks,
 mark
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]




_
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com


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


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




_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


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




RE: ActionErrors in ActionForm and JSP not showing up...

2002-08-01 Thread wbchmura

Okay, so it behaves more like a package then...  I see...

Thanks!

-Original Message-
From: developer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 6:57 PM
To: struts-user
Subject: Re: ActionErrors in ActionForm and JSP not showing up...


Well actually you could have a resources directory under 
WEB-INF/classes
but you have to set it up like this:
message-resources parameter=resources.ApplicationResources 
null=false
/

and you'll be ready to go.



- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 31, 2002 4:39 PM
Subject: RE: ActionErrors in ActionForm and JSP not showing up...



 Nope, never knew that existed...   Okay, it did do something...
 I get:

 ???en_US.error.requestform.company.required???

 Which is what you were talking about...

 For the 33rd time I checked my config for my resources and the file is
 where the config says it should be  I also checked for the 50th 
time
 that the key was what I was looking for...

 error.requestform.company.required=You must select a company

 (I am cutting and pasting here)

 message-resources
 parameter=/WEB-INF/resources/applicationresources.properties
 null=false/

 I also tried moving it back into my classes directory and not 
specifying
 an alternate location...

 No dice, same errors...
 Nothing in the log files...

 So now I know its either not finding the whole resources file or the
 keys dont match for that error...  If I make it a bad filename, I dont
 see any errors also...

 AAARHH












 -Original Message-
 From: martin.cooper [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 3:38 PM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...


 Have you tried setting 'null=false' in your message-resources 
entry
 in
 struts-config.xml? That would at least tell you whether the problem is
 related to picking up the resource string or is something else.

 If the resource string wasn't picked up for some reason, you'll see
 those
 odd ???.key.??? strings where your resource string should be, 
instead
 of
 nothing at all. Horrible for production, but an invaluable debugging
 tool.
 :-)

 --
 Martin Cooper


  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 31, 2002 6:35 AM
  To: [EMAIL PROTECTED]
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 
  Yes, the page that displays them is the same one that the errant
  information is missing from.
  Yes, I am also using Tiles on all these pages...
 
 
  The logic:messagesPresent tag works fine and activates when
  an error
  should be appearing, but the html:errors tag seems awry.
  Or I am.  Or
  both of us...
 
  Any help would be greatly appreciated ...
 
  This is my form-beans and action from the struts-config.xml
 
  form-beans
  form-bean name=FormPremadeReport
  type=com.ebind.twizard.reports.struts.FormPremadeReport /
  /form-beans
 
  action path=/premadeReport
  type=com.ebind.twizard.reports.struts.ActionPremadeReport
  parameter=reportType
  name=FormPremadeReport
  scope=request
  validate=true
  input=twizard.premade
  forward name=continue path=twizard.premade redirect=false /
  forward name=displayRedReport path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=displayYellowReport
  path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=displayGreenReport
  path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=success path=twizard.reportdisplay.ranged
  redirect=false /
  /action
 
 
  logic:messagesPresent
  !-- Errors detected --
  font color=Red
  Reported Errors:br
  html:errors property=company/
  /font
  /logic:messagesPresent
 
  html:form action=/premadeReport.do
  name=FormPremadeReport
  type=com.ebind.twizard.reports.struts.FormPremadeReport
  scope=request
 
 
 
 
 
 
 
 
  -Original Message-
  From: martin.cooper [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 9:22 PM
  To: struts-user
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
  Is the page that's supposed to display the errors returned
  from the same
  request that found them? This may not be the case if you are using
  frames,
  redirect or Tiles. The errors are saved as a request attribute, so 
if
  it's
  not the same request, the errors will be gone.
 
  --
  Martin Cooper
 
 
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, July 30, 2002 7:21 AM
   To: [EMAIL PROTECTED]
   Subject: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  
  if (this.companySelection == null ||
   this.companySelection.equals()) {
  System.out.println(FormPremadeReport:validate 
   No Company
   Selected);
  errors.add(ActionErrors.GLOBAL_ERROR, new
   ActionError(error.requestform.company.required

RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-31 Thread Homer, Christopher

I know it sounds obvious, but are you sure you have placed
error.requestform.company.required in your ApplicationResources.properties
file?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 31 July 2002 14:24
To: [EMAIL PROTECTED]
Subject: RE: ActionErrors in ActionForm and JSP not showing up...



I did not think you needed a saveErrors in an actionForms validate 
method... You return the error list from there... 

-Original Message-
From: emr [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 5:58 PM
To: struts-user
Subject: Re: ActionErrors in ActionForm and JSP not showing up...


On Tue, Jul 30, 2002 at 03:47:10PM -0400, 
[EMAIL PROTECTED] wrote:
 
 Yep... I've got that tag in there...  Also, I started off with setting 
a 
 specific a field, but had no luck (I even just tried setting it in 
 specifically on both ends...)
 
 Sigh.

You should add a

saveErrors(request, errors);

before returning.

Hope this helps,
Erich

 I have fixed every other part of my app that needs fixing avoiding 
this 
 problem...
 
 
 
 -Original Message-
 From: AKulp [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 3:18 PM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
   Just a thought, but have you remembered to define the tag libary 
 for
 HTML?  I had a similiar error once.  I think with that you would see
 html:errors/ show up in the final HTML though.  The other thing, is 
 the
 use of ActionErrors.GLOBAL_ERROR.  I haven't used it so it may just be 

 my
 ignorance, but you may want to change it to reference a specific field 

 on
 the form and see if it comes through.
 
   -Arian
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 10:29 AM
  To: [EMAIL PROTECTED]
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  Hey Keith,
  
  I know about the logic tag, I just added it there so I could get an 
 idea 
  if the errors were making it into the page...
  
  When I started on this, it was just the font and error tags...
  
  PS. I am on a nightly build dated the 29th
  
  -Original Message-
  From: kkamholz [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 10:15 AM
  To: struts-user
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
  
  
  You don't need the logic:messagesPresent.  It automatically checks 

 to 
  see
  if errors are present, so you can just use the font tag and the
  html:errors/.  If there are no errors, it won't write anything 
out.  
 I
  don't know if this would solve your issue, but maybe it has 
something 
 to 
  do
  with it.
  
  ~ Keith
  http://www.buffalo.edu/~kkamholz
  
  
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 10:21 AM
  To: [EMAIL PROTECTED]
  Subject: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  
 if (this.companySelection == null || 
  this.companySelection.equals()) {
 System.out.println(FormPremadeReport:validate  No 
Company 
 
  Selected);
 errors.add(ActionErrors.GLOBAL_ERROR, new 
  ActionError(error.requestform.company.required));
 }
 return errors;
  
  
  I have the above code in my ActionFormValidate...  When I submit the 

  form it passes the IF (as it should) and returns me to the HTML form 

  page.  BUT my JSP for:
  
  logic:messagesPresent
  !-- Errors detected --
  font color=Redhtml:errors//font
  /logic:messagesPresent
  
  Sends back the comment and font tags, but nothing after that...
  
  Any ideas?  I do have the application properties for all the 
settings, 
 
  plus the shown resource above...
  
  
  
  
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
mailto:[EMAIL PROTECTED]
 

-- 
Dr. Erich Meier, Software Process Improvement
method park Software AG, Wetterkreuz 19a, 91058 Erlangen, Germany
phone: +49-9131-97206-316  mailto:[EMAIL PROTECTED]
fax:   +49-9131-97206-200  http://www.methodpark.de/

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



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

RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-31 Thread wbchmura


Yes, the page that displays them is the same one that the errant 
information is missing from.
Yes, I am also using Tiles on all these pages...  


The logic:messagesPresent tag works fine and activates when an error 
should be appearing, but the html:errors tag seems awry.  Or I am.  Or 
both of us...

Any help would be greatly appreciated ...

This is my form-beans and action from the struts-config.xml

form-beans
form-bean name=FormPremadeReport 
type=com.ebind.twizard.reports.struts.FormPremadeReport /
/form-beans

action path=/premadeReport
type=com.ebind.twizard.reports.struts.ActionPremadeReport
parameter=reportType
name=FormPremadeReport
scope=request
validate=true
input=twizard.premade
forward name=continue path=twizard.premade redirect=false /
forward name=displayRedReport path=twizard.reportdisplay.ranged 
redirect=false /
forward name=displayYellowReport path=twizard.reportdisplay.ranged 
redirect=false /
forward name=displayGreenReport path=twizard.reportdisplay.ranged 
redirect=false /
forward name=success path=twizard.reportdisplay.ranged 
redirect=false /
/action


logic:messagesPresent
!-- Errors detected --
font color=Red
Reported Errors:br
html:errors property=company/
/font
/logic:messagesPresent

html:form action=/premadeReport.do
name=FormPremadeReport
type=com.ebind.twizard.reports.struts.FormPremadeReport
scope=request








-Original Message-
From: martin.cooper [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 9:22 PM
To: struts-user
Subject: RE: ActionErrors in ActionForm and JSP not showing up...


Is the page that's supposed to display the errors returned from the same
request that found them? This may not be the case if you are using 
frames,
redirect or Tiles. The errors are saved as a request attribute, so if 
it's
not the same request, the errors will be gone.

--
Martin Cooper


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 7:21 AM
 To: [EMAIL PROTECTED]
 Subject: ActionErrors in ActionForm and JSP not showing up...
 
 
 
 
if (this.companySelection == null || 
 this.companySelection.equals()) {
System.out.println(FormPremadeReport:validate  
 No Company 
 Selected);
errors.add(ActionErrors.GLOBAL_ERROR, new 
 ActionError(error.requestform.company.required));
}
return errors;
 
 
 I have the above code in my ActionFormValidate...  When I submit the 
 form it passes the IF (as it should) and returns me to the HTML form 
 page.  BUT my JSP for:
 
   logic:messagesPresent
   !-- Errors detected --
   font color=Redhtml:errors//font
   /logic:messagesPresent
 
 Sends back the comment and font tags, but nothing after that...
 
 Any ideas?  I do have the application properties for all the 
 settings, 
 plus the shown resource above...
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



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



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




RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-31 Thread wbchmura


It may sound obvious, but I did check that over and over again!  Same 
thought I had.  I even went as far as to copy and paste it over the 
existing one just in case my cursed eyes were missing a mis-spelling!




-Original Message-
From: Christopher.Homer [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 9:16 AM
To: struts-user
Subject: RE: ActionErrors in ActionForm and JSP not showing up...


I know it sounds obvious, but are you sure you have placed
error.requestform.company.required in your 
ApplicationResources.properties
file?

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 31 July 2002 14:24
To: [EMAIL PROTECTED]
Subject: RE: ActionErrors in ActionForm and JSP not showing up...



I did not think you needed a saveErrors in an actionForms validate 
method... You return the error list from there... 

-Original Message-
From: emr [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 5:58 PM
To: struts-user
Subject: Re: ActionErrors in ActionForm and JSP not showing up...


On Tue, Jul 30, 2002 at 03:47:10PM -0400, 
[EMAIL PROTECTED] wrote:
 
 Yep... I've got that tag in there...  Also, I started off with setting 

a 
 specific a field, but had no luck (I even just tried setting it in 
 specifically on both ends...)
 
 Sigh.

You should add a

saveErrors(request, errors);

before returning.

Hope this helps,
Erich

 I have fixed every other part of my app that needs fixing avoiding 
this 
 problem...
 
 
 
 -Original Message-
 From: AKulp [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 3:18 PM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
   Just a thought, but have you remembered to define the tag libary 
 for
 HTML?  I had a similiar error once.  I think with that you would see
 html:errors/ show up in the final HTML though.  The other thing, is 
 the
 use of ActionErrors.GLOBAL_ERROR.  I haven't used it so it may just be 


 my
 ignorance, but you may want to change it to reference a specific field 


 on
 the form and see if it comes through.
 
   -Arian
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 10:29 AM
  To: [EMAIL PROTECTED]
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  Hey Keith,
  
  I know about the logic tag, I just added it there so I could get an 
 idea 
  if the errors were making it into the page...
  
  When I started on this, it was just the font and error tags...
  
  PS. I am on a nightly build dated the 29th
  
  -Original Message-
  From: kkamholz [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 10:15 AM
  To: struts-user
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
  
  
  You don't need the logic:messagesPresent.  It automatically checks 


 to 
  see
  if errors are present, so you can just use the font tag and the
  html:errors/.  If there are no errors, it won't write anything 
out.  
 I
  don't know if this would solve your issue, but maybe it has 
something 
 to 
  do
  with it.
  
  ~ Keith
  http://www.buffalo.edu/~kkamholz
  
  
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 10:21 AM
  To: [EMAIL PROTECTED]
  Subject: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  
 if (this.companySelection == null || 
  this.companySelection.equals()) {
 System.out.println(FormPremadeReport:validate  No 
Company 
 
  Selected);
 errors.add(ActionErrors.GLOBAL_ERROR, new 
  ActionError(error.requestform.company.required));
 }
 return errors;
  
  
  I have the above code in my ActionFormValidate...  When I submit the 


  form it passes the IF (as it should) and returns me to the HTML form 


  page.  BUT my JSP for:
  
  logic:messagesPresent
  !-- Errors detected --
  font color=Redhtml:errors//font
  /logic:messagesPresent
  
  Sends back the comment and font tags, but nothing after that...
  
  Any ideas?  I do have the application properties for all the 
settings, 
 
  plus the shown resource above...
  
  
  
  
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
mailto:[EMAIL PROTECTED

Re: ActionErrors in ActionForm and JSP not showing up...

2002-07-31 Thread Erich Meier

On Wed, Jul 31, 2002 at 09:23:34AM -0400, [EMAIL PROTECTED] wrote:
 
 I did not think you needed a saveErrors in an actionForms validate 
 method... You return the error list from there... 

You're absolutely right. The saveErrors() call is only needed in an Action,
not in an ActioForm's validate method.

I did not read your first mail accurately enough.

Sorry,
Erich

 On Tue, Jul 30, 2002 at 03:47:10PM -0400, 
 [EMAIL PROTECTED] wrote:
  
  Yep... I've got that tag in there...  Also, I started off with setting 
 a 
  specific a field, but had no luck (I even just tried setting it in 
  specifically on both ends...)
  
  Sigh.
 
 You should add a
 
   saveErrors(request, errors);
 
 before returning.
 
 Hope this helps,
 Erich
 
  I have fixed every other part of my app that needs fixing avoiding 
 this 
  problem...
  
  
  
  -Original Message-
  From: AKulp [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 3:18 PM
  To: struts-user
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
  
  
  Just a thought, but have you remembered to define the tag libary 
  for
  HTML?  I had a similiar error once.  I think with that you would see
  html:errors/ show up in the final HTML though.  The other thing, is 
  the
  use of ActionErrors.GLOBAL_ERROR.  I haven't used it so it may just be 
 
  my
  ignorance, but you may want to change it to reference a specific field 
 
  on
  the form and see if it comes through.
  
  -Arian
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, July 30, 2002 10:29 AM
   To: [EMAIL PROTECTED]
   Subject: RE: ActionErrors in ActionForm and JSP not showing up...
   
   
   
   Hey Keith,
   
   I know about the logic tag, I just added it there so I could get an 
  idea 
   if the errors were making it into the page...
   
   When I started on this, it was just the font and error tags...
   
   PS. I am on a nightly build dated the 29th
   
   -Original Message-
   From: kkamholz [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, July 30, 2002 10:15 AM
   To: struts-user
   Subject: RE: ActionErrors in ActionForm and JSP not showing up...
   
   
   You don't need the logic:messagesPresent.  It automatically checks 
 
  to 
   see
   if errors are present, so you can just use the font tag and the
   html:errors/.  If there are no errors, it won't write anything 
 out.  
  I
   don't know if this would solve your issue, but maybe it has 
 something 
  to 
   do
   with it.
   
   ~ Keith
   http://www.buffalo.edu/~kkamholz
   
   
   
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, July 30, 2002 10:21 AM
   To: [EMAIL PROTECTED]
   Subject: ActionErrors in ActionForm and JSP not showing up...
   
   
   
   
  if (this.companySelection == null || 
   this.companySelection.equals()) {
  System.out.println(FormPremadeReport:validate  No 
 Company 
  
   Selected);
  errors.add(ActionErrors.GLOBAL_ERROR, new 
   ActionError(error.requestform.company.required));
  }
  return errors;
   
   
   I have the above code in my ActionFormValidate...  When I submit the 
 
   form it passes the IF (as it should) and returns me to the HTML form 
 
   page.  BUT my JSP for:
   
 logic:messagesPresent
 !-- Errors detected --
 font color=Redhtml:errors//font
 /logic:messagesPresent
   
   Sends back the comment and font tags, but nothing after that...
   
   Any ideas?  I do have the application properties for all the 
 settings, 
  
   plus the shown resource above...
   
   
   
   
   
   
   
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
   
   --
   To unsubscribe, e-mail:   
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail: 
   mailto:[EMAIL PROTECTED]
   
   
   
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
   
   --
   To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
  
 
 -- 
 Dr. Erich Meier, Software Process Improvement
 method park Software AG, Wetterkreuz 19a, 91058 Erlangen, Germany
 phone: +49-9131-97206-316  mailto:[EMAIL PROTECTED]
 fax:   +49-9131-97206-200  http://www.methodpark.de/
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 

-- 
Dr. Erich Meier, Software Process Improvement

RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-31 Thread Martin Cooper

Have you tried setting 'null=false' in your message-resources entry in
struts-config.xml? That would at least tell you whether the problem is
related to picking up the resource string or is something else.

If the resource string wasn't picked up for some reason, you'll see those
odd ???.key.??? strings where your resource string should be, instead of
nothing at all. Horrible for production, but an invaluable debugging tool.
:-)

--
Martin Cooper


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 6:35 AM
 To: [EMAIL PROTECTED]
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 
 Yes, the page that displays them is the same one that the errant 
 information is missing from.
 Yes, I am also using Tiles on all these pages...  
 
 
 The logic:messagesPresent tag works fine and activates when 
 an error 
 should be appearing, but the html:errors tag seems awry.  
 Or I am.  Or 
 both of us...
 
 Any help would be greatly appreciated ...
 
 This is my form-beans and action from the struts-config.xml
 
 form-beans
 form-bean name=FormPremadeReport 
 type=com.ebind.twizard.reports.struts.FormPremadeReport /
 /form-beans
 
 action path=/premadeReport
 type=com.ebind.twizard.reports.struts.ActionPremadeReport
 parameter=reportType
 name=FormPremadeReport
 scope=request
 validate=true
 input=twizard.premade
 forward name=continue path=twizard.premade redirect=false /
 forward name=displayRedReport path=twizard.reportdisplay.ranged 
 redirect=false /
 forward name=displayYellowReport 
 path=twizard.reportdisplay.ranged 
 redirect=false /
 forward name=displayGreenReport 
 path=twizard.reportdisplay.ranged 
 redirect=false /
 forward name=success path=twizard.reportdisplay.ranged 
 redirect=false /
 /action
 
 
 logic:messagesPresent
 !-- Errors detected --
 font color=Red
 Reported Errors:br
 html:errors property=company/
 /font
 /logic:messagesPresent
 
 html:form action=/premadeReport.do
 name=FormPremadeReport
 type=com.ebind.twizard.reports.struts.FormPremadeReport
 scope=request
 
 
 
 
 
 
 
 
 -Original Message-
 From: martin.cooper [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 9:22 PM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 Is the page that's supposed to display the errors returned 
 from the same
 request that found them? This may not be the case if you are using 
 frames,
 redirect or Tiles. The errors are saved as a request attribute, so if 
 it's
 not the same request, the errors will be gone.
 
 --
 Martin Cooper
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 7:21 AM
  To: [EMAIL PROTECTED]
  Subject: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  
 if (this.companySelection == null || 
  this.companySelection.equals()) {
 System.out.println(FormPremadeReport:validate  
  No Company 
  Selected);
 errors.add(ActionErrors.GLOBAL_ERROR, new 
  ActionError(error.requestform.company.required));
 }
 return errors;
  
  
  I have the above code in my ActionFormValidate...  When I 
 submit the 
  form it passes the IF (as it should) and returns me to the 
 HTML form 
  page.  BUT my JSP for:
  
  logic:messagesPresent
  !-- Errors detected --
  font color=Redhtml:errors//font
  /logic:messagesPresent
  
  Sends back the comment and font tags, but nothing after that...
  
  Any ideas?  I do have the application properties for all the 
  settings, 
  plus the shown resource above...
  
  
  
  
  
  
  
  --
  To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



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




RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-31 Thread wbchmura


Nope, never knew that existed...   Okay, it did do something...
I get:

???en_US.error.requestform.company.required??? 

Which is what you were talking about...

For the 33rd time I checked my config for my resources and the file is 
where the config says it should be  I also checked for the 50th time 
that the key was what I was looking for...

error.requestform.company.required=You must select a company

(I am cutting and pasting here)

message-resources 
parameter=/WEB-INF/resources/applicationresources.properties 
null=false/

I also tried moving it back into my classes directory and not specifying 
an alternate location...

No dice, same errors...
Nothing in the log files...

So now I know its either not finding the whole resources file or the 
keys dont match for that error...  If I make it a bad filename, I dont 
see any errors also...

AAARHH












-Original Message-
From: martin.cooper [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 3:38 PM
To: struts-user
Subject: RE: ActionErrors in ActionForm and JSP not showing up...


Have you tried setting 'null=false' in your message-resources entry 
in
struts-config.xml? That would at least tell you whether the problem is
related to picking up the resource string or is something else.

If the resource string wasn't picked up for some reason, you'll see 
those
odd ???.key.??? strings where your resource string should be, instead 
of
nothing at all. Horrible for production, but an invaluable debugging 
tool.
:-)

--
Martin Cooper


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 6:35 AM
 To: [EMAIL PROTECTED]
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 
 Yes, the page that displays them is the same one that the errant 
 information is missing from.
 Yes, I am also using Tiles on all these pages...  
 
 
 The logic:messagesPresent tag works fine and activates when 
 an error 
 should be appearing, but the html:errors tag seems awry.  
 Or I am.  Or 
 both of us...
 
 Any help would be greatly appreciated ...
 
 This is my form-beans and action from the struts-config.xml
 
 form-beans
 form-bean name=FormPremadeReport 
 type=com.ebind.twizard.reports.struts.FormPremadeReport /
 /form-beans
 
 action path=/premadeReport
 type=com.ebind.twizard.reports.struts.ActionPremadeReport
 parameter=reportType
 name=FormPremadeReport
 scope=request
 validate=true
 input=twizard.premade
 forward name=continue path=twizard.premade redirect=false /
 forward name=displayRedReport path=twizard.reportdisplay.ranged 
 redirect=false /
 forward name=displayYellowReport 
 path=twizard.reportdisplay.ranged 
 redirect=false /
 forward name=displayGreenReport 
 path=twizard.reportdisplay.ranged 
 redirect=false /
 forward name=success path=twizard.reportdisplay.ranged 
 redirect=false /
 /action
 
 
 logic:messagesPresent
 !-- Errors detected --
 font color=Red
 Reported Errors:br
 html:errors property=company/
 /font
 /logic:messagesPresent
 
 html:form action=/premadeReport.do
 name=FormPremadeReport
 type=com.ebind.twizard.reports.struts.FormPremadeReport
 scope=request
 
 
 
 
 
 
 
 
 -Original Message-
 From: martin.cooper [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 9:22 PM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 Is the page that's supposed to display the errors returned 
 from the same
 request that found them? This may not be the case if you are using 
 frames,
 redirect or Tiles. The errors are saved as a request attribute, so if 
 it's
 not the same request, the errors will be gone.
 
 --
 Martin Cooper
 
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 7:21 AM
  To: [EMAIL PROTECTED]
  Subject: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  
 if (this.companySelection == null || 
  this.companySelection.equals()) {
 System.out.println(FormPremadeReport:validate  
  No Company 
  Selected);
 errors.add(ActionErrors.GLOBAL_ERROR, new 
  ActionError(error.requestform.company.required));
 }
 return errors;
  
  
  I have the above code in my ActionFormValidate...  When I 
 submit the 
  form it passes the IF (as it should) and returns me to the 
 HTML form 
  page.  BUT my JSP for:
  
  logic:messagesPresent
  !-- Errors detected --
  font color=Redhtml:errors//font
  /logic:messagesPresent
  
  Sends back the comment and font tags, but nothing after that...
  
  Any ideas?  I do have the application properties for all the 
  settings, 
  plus the shown resource above...
  
  
  
  
  
  
  
  --
  To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail

RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-31 Thread James Mitchell

Here's the problem...

 message-resources
 parameter=/WEB-INF/resources/applicationresources.properties
 ^^
 null=false/


this should have been in your /WEB-INF/classes folder
and you don't need to put '.properties'

try this
1. move the applicationresources.properties file to /WEB-INF/classes
2. change your struts-config.xml entry to this...

 message-resources parameter=applicationresources null=false/


BTWcase matters so if applicationresources is actually
ApplicationResources, then be sure to change it...

HTH

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the Open Minded Developer Network
http://www.open-tools.org/struts-atlanta




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 4:40 PM
 To: [EMAIL PROTECTED]
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...



 Nope, never knew that existed...   Okay, it did do something...
 I get:

 ???en_US.error.requestform.company.required???

 Which is what you were talking about...

 For the 33rd time I checked my config for my resources and the file is
 where the config says it should be  I also checked for the 50th time
 that the key was what I was looking for...

 error.requestform.company.required=You must select a company

 (I am cutting and pasting here)

 message-resources
 parameter=/WEB-INF/resources/applicationresources.properties
 null=false/

 I also tried moving it back into my classes directory and not specifying
 an alternate location...

 No dice, same errors...
 Nothing in the log files...

 So now I know its either not finding the whole resources file or the
 keys dont match for that error...  If I make it a bad filename, I dont
 see any errors also...

 AAARHH












 -Original Message-
 From: martin.cooper [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 3:38 PM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...


 Have you tried setting 'null=false' in your message-resources entry
 in
 struts-config.xml? That would at least tell you whether the problem is
 related to picking up the resource string or is something else.

 If the resource string wasn't picked up for some reason, you'll see
 those
 odd ???.key.??? strings where your resource string should be, instead
 of
 nothing at all. Horrible for production, but an invaluable debugging
 tool.
 :-)

 --
 Martin Cooper


  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 31, 2002 6:35 AM
  To: [EMAIL PROTECTED]
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 
  Yes, the page that displays them is the same one that the errant
  information is missing from.
  Yes, I am also using Tiles on all these pages...
 
 
  The logic:messagesPresent tag works fine and activates when
  an error
  should be appearing, but the html:errors tag seems awry.
  Or I am.  Or
  both of us...
 
  Any help would be greatly appreciated ...
 
  This is my form-beans and action from the struts-config.xml
 
  form-beans
  form-bean name=FormPremadeReport
  type=com.ebind.twizard.reports.struts.FormPremadeReport /
  /form-beans
 
  action path=/premadeReport
  type=com.ebind.twizard.reports.struts.ActionPremadeReport
  parameter=reportType
  name=FormPremadeReport
  scope=request
  validate=true
  input=twizard.premade
  forward name=continue path=twizard.premade redirect=false /
  forward name=displayRedReport path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=displayYellowReport
  path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=displayGreenReport
  path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=success path=twizard.reportdisplay.ranged
  redirect=false /
  /action
 
 
  logic:messagesPresent
  !-- Errors detected --
  font color=Red
  Reported Errors:br
  html:errors property=company/
  /font
  /logic:messagesPresent
 
  html:form action=/premadeReport.do
  name=FormPremadeReport
  type=com.ebind.twizard.reports.struts.FormPremadeReport
  scope=request
 
 
 
 
 
 
 
 
  -Original Message-
  From: martin.cooper [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 9:22 PM
  To: struts-user
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
  Is the page that's supposed to display the errors returned
  from the same
  request that found them? This may not be the case if you are using
  frames,
  redirect or Tiles. The errors are saved as a request attribute, so if
  it's
  not the same request, the errors will be gone.
 
  --
  Martin Cooper
 
 
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, July 30, 2002 7:21 AM
   To: [EMAIL PROTECTED]
   Subject: ActionErrors in ActionForm and JSP not showing up

RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-31 Thread wbchmura


And a resources directory seemed like such a good idea at the time...

This worked!  I have error messages again...

Thanks for the fix, 
Thanks Martin for that null=false thing - that will come in handy
Thanks everyone else that suggested

Finally all the bugs are out!



-Original Message-
From: jmitchtx [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 31, 2002 4:42 PM
To: struts-user
Subject: RE: ActionErrors in ActionForm and JSP not showing up...


Here's the problem...

 message-resources
 parameter=/WEB-INF/resources/applicationresources.properties
 ^^
 null=false/


this should have been in your /WEB-INF/classes folder
and you don't need to put '.properties'

try this
1. move the applicationresources.properties file to /WEB-INF/classes
2. change your struts-config.xml entry to this...

 message-resources parameter=applicationresources null=false/


BTWcase matters so if applicationresources is actually
ApplicationResources, then be sure to change it...

HTH

James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the Open Minded Developer Network
http://www.open-tools.org/struts-atlanta




 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 4:40 PM
 To: [EMAIL PROTECTED]
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...



 Nope, never knew that existed...   Okay, it did do something...
 I get:

 ???en_US.error.requestform.company.required???

 Which is what you were talking about...

 For the 33rd time I checked my config for my resources and the file is
 where the config says it should be  I also checked for the 50th 
time
 that the key was what I was looking for...

 error.requestform.company.required=You must select a company

 (I am cutting and pasting here)

 message-resources
 parameter=/WEB-INF/resources/applicationresources.properties
 null=false/

 I also tried moving it back into my classes directory and not 
specifying
 an alternate location...

 No dice, same errors...
 Nothing in the log files...

 So now I know its either not finding the whole resources file or the
 keys dont match for that error...  If I make it a bad filename, I dont
 see any errors also...

 AAARHH












 -Original Message-
 From: martin.cooper [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 3:38 PM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...


 Have you tried setting 'null=false' in your message-resources 
entry
 in
 struts-config.xml? That would at least tell you whether the problem is
 related to picking up the resource string or is something else.

 If the resource string wasn't picked up for some reason, you'll see
 those
 odd ???.key.??? strings where your resource string should be, 
instead
 of
 nothing at all. Horrible for production, but an invaluable debugging
 tool.
 :-)

 --
 Martin Cooper


  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 31, 2002 6:35 AM
  To: [EMAIL PROTECTED]
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 
  Yes, the page that displays them is the same one that the errant
  information is missing from.
  Yes, I am also using Tiles on all these pages...
 
 
  The logic:messagesPresent tag works fine and activates when
  an error
  should be appearing, but the html:errors tag seems awry.
  Or I am.  Or
  both of us...
 
  Any help would be greatly appreciated ...
 
  This is my form-beans and action from the struts-config.xml
 
  form-beans
  form-bean name=FormPremadeReport
  type=com.ebind.twizard.reports.struts.FormPremadeReport /
  /form-beans
 
  action path=/premadeReport
  type=com.ebind.twizard.reports.struts.ActionPremadeReport
  parameter=reportType
  name=FormPremadeReport
  scope=request
  validate=true
  input=twizard.premade
  forward name=continue path=twizard.premade redirect=false /
  forward name=displayRedReport path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=displayYellowReport
  path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=displayGreenReport
  path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=success path=twizard.reportdisplay.ranged
  redirect=false /
  /action
 
 
  logic:messagesPresent
  !-- Errors detected --
  font color=Red
  Reported Errors:br
  html:errors property=company/
  /font
  /logic:messagesPresent
 
  html:form action=/premadeReport.do
  name=FormPremadeReport
  type=com.ebind.twizard.reports.struts.FormPremadeReport
  scope=request
 
 
 
 
 
 
 
 
  -Original Message-
  From: martin.cooper [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 9:22 PM
  To: struts-user
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
  Is the page that's supposed to display the errors returned
  from the same
  request

Re: ActionErrors in ActionForm and JSP not showing up...

2002-07-31 Thread Developer

Well actually you could have a resources directory under WEB-INF/classes
but you have to set it up like this:
message-resources parameter=resources.ApplicationResources null=false
/

and you'll be ready to go.



- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 31, 2002 4:39 PM
Subject: RE: ActionErrors in ActionForm and JSP not showing up...



 Nope, never knew that existed...   Okay, it did do something...
 I get:

 ???en_US.error.requestform.company.required???

 Which is what you were talking about...

 For the 33rd time I checked my config for my resources and the file is
 where the config says it should be  I also checked for the 50th time
 that the key was what I was looking for...

 error.requestform.company.required=You must select a company

 (I am cutting and pasting here)

 message-resources
 parameter=/WEB-INF/resources/applicationresources.properties
 null=false/

 I also tried moving it back into my classes directory and not specifying
 an alternate location...

 No dice, same errors...
 Nothing in the log files...

 So now I know its either not finding the whole resources file or the
 keys dont match for that error...  If I make it a bad filename, I dont
 see any errors also...

 AAARHH












 -Original Message-
 From: martin.cooper [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 31, 2002 3:38 PM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...


 Have you tried setting 'null=false' in your message-resources entry
 in
 struts-config.xml? That would at least tell you whether the problem is
 related to picking up the resource string or is something else.

 If the resource string wasn't picked up for some reason, you'll see
 those
 odd ???.key.??? strings where your resource string should be, instead
 of
 nothing at all. Horrible for production, but an invaluable debugging
 tool.
 :-)

 --
 Martin Cooper


  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, July 31, 2002 6:35 AM
  To: [EMAIL PROTECTED]
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 
  Yes, the page that displays them is the same one that the errant
  information is missing from.
  Yes, I am also using Tiles on all these pages...
 
 
  The logic:messagesPresent tag works fine and activates when
  an error
  should be appearing, but the html:errors tag seems awry.
  Or I am.  Or
  both of us...
 
  Any help would be greatly appreciated ...
 
  This is my form-beans and action from the struts-config.xml
 
  form-beans
  form-bean name=FormPremadeReport
  type=com.ebind.twizard.reports.struts.FormPremadeReport /
  /form-beans
 
  action path=/premadeReport
  type=com.ebind.twizard.reports.struts.ActionPremadeReport
  parameter=reportType
  name=FormPremadeReport
  scope=request
  validate=true
  input=twizard.premade
  forward name=continue path=twizard.premade redirect=false /
  forward name=displayRedReport path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=displayYellowReport
  path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=displayGreenReport
  path=twizard.reportdisplay.ranged
  redirect=false /
  forward name=success path=twizard.reportdisplay.ranged
  redirect=false /
  /action
 
 
  logic:messagesPresent
  !-- Errors detected --
  font color=Red
  Reported Errors:br
  html:errors property=company/
  /font
  /logic:messagesPresent
 
  html:form action=/premadeReport.do
  name=FormPremadeReport
  type=com.ebind.twizard.reports.struts.FormPremadeReport
  scope=request
 
 
 
 
 
 
 
 
  -Original Message-
  From: martin.cooper [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 9:22 PM
  To: struts-user
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
  Is the page that's supposed to display the errors returned
  from the same
  request that found them? This may not be the case if you are using
  frames,
  redirect or Tiles. The errors are saved as a request attribute, so if
  it's
  not the same request, the errors will be gone.
 
  --
  Martin Cooper
 
 
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, July 30, 2002 7:21 AM
   To: [EMAIL PROTECTED]
   Subject: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  
  if (this.companySelection == null ||
   this.companySelection.equals()) {
  System.out.println(FormPremadeReport:validate 
   No Company
   Selected);
  errors.add(ActionErrors.GLOBAL_ERROR, new
   ActionError(error.requestform.company.required));
  }
  return errors;
  
  
   I have the above code in my ActionFormValidate...  When I
  submit the
   form it passes the IF (as it should) and returns me to the
  HTML form
   page.  BUT my JSP for:
  
   logic:messagesPresent
   !-- Errors detected --
   font color

RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-30 Thread Kamholz, Keith (corp-staff) USX

You don't need the logic:messagesPresent.  It automatically checks to see
if errors are present, so you can just use the font tag and the
html:errors/.  If there are no errors, it won't write anything out.  I
don't know if this would solve your issue, but maybe it has something to do
with it.

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 10:21 AM
To: [EMAIL PROTECTED]
Subject: ActionErrors in ActionForm and JSP not showing up...




   if (this.companySelection == null || 
this.companySelection.equals()) {
   System.out.println(FormPremadeReport:validate  No Company 
Selected);
   errors.add(ActionErrors.GLOBAL_ERROR, new 
ActionError(error.requestform.company.required));
   }
   return errors;


I have the above code in my ActionFormValidate...  When I submit the 
form it passes the IF (as it should) and returns me to the HTML form 
page.  BUT my JSP for:

logic:messagesPresent
!-- Errors detected --
font color=Redhtml:errors//font
/logic:messagesPresent

Sends back the comment and font tags, but nothing after that...

Any ideas?  I do have the application properties for all the settings, 
plus the shown resource above...







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

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




RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-30 Thread wbchmura


Hey Keith,

I know about the logic tag, I just added it there so I could get an idea 
if the errors were making it into the page...

When I started on this, it was just the font and error tags...

PS. I am on a nightly build dated the 29th

-Original Message-
From: kkamholz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 10:15 AM
To: struts-user
Subject: RE: ActionErrors in ActionForm and JSP not showing up...


You don't need the logic:messagesPresent.  It automatically checks to 
see
if errors are present, so you can just use the font tag and the
html:errors/.  If there are no errors, it won't write anything out.  I
don't know if this would solve your issue, but maybe it has something to 
do
with it.

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 10:21 AM
To: [EMAIL PROTECTED]
Subject: ActionErrors in ActionForm and JSP not showing up...




   if (this.companySelection == null || 
this.companySelection.equals()) {
   System.out.println(FormPremadeReport:validate  No Company 
Selected);
   errors.add(ActionErrors.GLOBAL_ERROR, new 
ActionError(error.requestform.company.required));
   }
   return errors;


I have the above code in my ActionFormValidate...  When I submit the 
form it passes the IF (as it should) and returns me to the HTML form 
page.  BUT my JSP for:

logic:messagesPresent
!-- Errors detected --
font color=Redhtml:errors//font
/logic:messagesPresent

Sends back the comment and font tags, but nothing after that...

Any ideas?  I do have the application properties for all the settings, 
plus the shown resource above...







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

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



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




RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-30 Thread wbchmura


Sorry, the rest of the page displays fine...  Just nothing where the 
errors tag was...

I have other applications that are working with this...  This is 
frusterating...





-Original Message-
From: kkamholz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 10:54 AM
To: struts-user
Subject: RE: ActionErrors in ActionForm and JSP not showing up...


Hmmm.
I'm not sure what to tell you, it was just a thought I had.  I've just
finished my first struts app, so I'm not exactly an expert or anything.
When you say it doesn't display anything after the font tag, do you mean 
it
doesn't display the html:errors/ or the whole rest of the JSP?

~ Keith
http://www.buffalo.edu/~kkamholz


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 10:29 AM
To: [EMAIL PROTECTED]
Subject: RE: ActionErrors in ActionForm and JSP not showing up...



Hey Keith,

I know about the logic tag, I just added it there so I could get an idea 

if the errors were making it into the page...

When I started on this, it was just the font and error tags...

PS. I am on a nightly build dated the 29th

-Original Message-
From: kkamholz [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 10:15 AM
To: struts-user
Subject: RE: ActionErrors in ActionForm and JSP not showing up...


You don't need the logic:messagesPresent.  It automatically checks to 
see
if errors are present, so you can just use the font tag and the
html:errors/.  If there are no errors, it won't write anything out.  I
don't know if this would solve your issue, but maybe it has something to 

do
with it.

~ Keith
http://www.buffalo.edu/~kkamholz



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 10:21 AM
To: [EMAIL PROTECTED]
Subject: ActionErrors in ActionForm and JSP not showing up...




   if (this.companySelection == null || 
this.companySelection.equals()) {
   System.out.println(FormPremadeReport:validate  No Company 
Selected);
   errors.add(ActionErrors.GLOBAL_ERROR, new 
ActionError(error.requestform.company.required));
   }
   return errors;


I have the above code in my ActionFormValidate...  When I submit the 
form it passes the IF (as it should) and returns me to the HTML form 
page.  BUT my JSP for:

logic:messagesPresent
!-- Errors detected --
font color=Redhtml:errors//font
/logic:messagesPresent

Sends back the comment and font tags, but nothing after that...

Any ideas?  I do have the application properties for all the settings, 
plus the shown resource above...







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

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



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

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



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




RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-30 Thread Kulp, Arian

Just a thought, but have you remembered to define the tag libary for
HTML?  I had a similiar error once.  I think with that you would see
html:errors/ show up in the final HTML though.  The other thing, is the
use of ActionErrors.GLOBAL_ERROR.  I haven't used it so it may just be my
ignorance, but you may want to change it to reference a specific field on
the form and see if it comes through.

-Arian

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 10:29 AM
 To: [EMAIL PROTECTED]
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 
 Hey Keith,
 
 I know about the logic tag, I just added it there so I could get an idea 
 if the errors were making it into the page...
 
 When I started on this, it was just the font and error tags...
 
 PS. I am on a nightly build dated the 29th
 
 -Original Message-
 From: kkamholz [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 10:15 AM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 You don't need the logic:messagesPresent.  It automatically checks to 
 see
 if errors are present, so you can just use the font tag and the
 html:errors/.  If there are no errors, it won't write anything out.  I
 don't know if this would solve your issue, but maybe it has something to 
 do
 with it.
 
 ~ Keith
 http://www.buffalo.edu/~kkamholz
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 10:21 AM
 To: [EMAIL PROTECTED]
 Subject: ActionErrors in ActionForm and JSP not showing up...
 
 
 
 
if (this.companySelection == null || 
 this.companySelection.equals()) {
System.out.println(FormPremadeReport:validate  No Company 
 Selected);
errors.add(ActionErrors.GLOBAL_ERROR, new 
 ActionError(error.requestform.company.required));
}
return errors;
 
 
 I have the above code in my ActionFormValidate...  When I submit the 
 form it passes the IF (as it should) and returns me to the HTML form 
 page.  BUT my JSP for:
 
   logic:messagesPresent
   !-- Errors detected --
   font color=Redhtml:errors//font
   /logic:messagesPresent
 
 Sends back the comment and font tags, but nothing after that...
 
 Any ideas?  I do have the application properties for all the settings, 
 plus the shown resource above...
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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




RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-30 Thread wbchmura


Yep... I've got that tag in there...  Also, I started off with setting a 
specific a field, but had no luck (I even just tried setting it in 
specifically on both ends...)

Sigh.

I have fixed every other part of my app that needs fixing avoiding this 
problem...



-Original Message-
From: AKulp [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 3:18 PM
To: struts-user
Subject: RE: ActionErrors in ActionForm and JSP not showing up...


Just a thought, but have you remembered to define the tag libary 
for
HTML?  I had a similiar error once.  I think with that you would see
html:errors/ show up in the final HTML though.  The other thing, is 
the
use of ActionErrors.GLOBAL_ERROR.  I haven't used it so it may just be 
my
ignorance, but you may want to change it to reference a specific field 
on
the form and see if it comes through.

-Arian

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 10:29 AM
 To: [EMAIL PROTECTED]
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 
 Hey Keith,
 
 I know about the logic tag, I just added it there so I could get an 
idea 
 if the errors were making it into the page...
 
 When I started on this, it was just the font and error tags...
 
 PS. I am on a nightly build dated the 29th
 
 -Original Message-
 From: kkamholz [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 10:15 AM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
 You don't need the logic:messagesPresent.  It automatically checks 
to 
 see
 if errors are present, so you can just use the font tag and the
 html:errors/.  If there are no errors, it won't write anything out.  
I
 don't know if this would solve your issue, but maybe it has something 
to 
 do
 with it.
 
 ~ Keith
 http://www.buffalo.edu/~kkamholz
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 10:21 AM
 To: [EMAIL PROTECTED]
 Subject: ActionErrors in ActionForm and JSP not showing up...
 
 
 
 
if (this.companySelection == null || 
 this.companySelection.equals()) {
System.out.println(FormPremadeReport:validate  No Company 

 Selected);
errors.add(ActionErrors.GLOBAL_ERROR, new 
 ActionError(error.requestform.company.required));
}
return errors;
 
 
 I have the above code in my ActionFormValidate...  When I submit the 
 form it passes the IF (as it should) and returns me to the HTML form 
 page.  BUT my JSP for:
 
   logic:messagesPresent
   !-- Errors detected --
   font color=Redhtml:errors//font
   /logic:messagesPresent
 
 Sends back the comment and font tags, but nothing after that...
 
 Any ideas?  I do have the application properties for all the settings, 

 plus the shown resource above...
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]

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



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




Re: ActionErrors in ActionForm and JSP not showing up...

2002-07-30 Thread Erich Meier

On Tue, Jul 30, 2002 at 03:47:10PM -0400, [EMAIL PROTECTED] wrote:
 
 Yep... I've got that tag in there...  Also, I started off with setting a 
 specific a field, but had no luck (I even just tried setting it in 
 specifically on both ends...)
 
 Sigh.

You should add a

saveErrors(request, errors);

before returning.

Hope this helps,
Erich

 I have fixed every other part of my app that needs fixing avoiding this 
 problem...
 
 
 
 -Original Message-
 From: AKulp [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 3:18 PM
 To: struts-user
 Subject: RE: ActionErrors in ActionForm and JSP not showing up...
 
 
   Just a thought, but have you remembered to define the tag libary 
 for
 HTML?  I had a similiar error once.  I think with that you would see
 html:errors/ show up in the final HTML though.  The other thing, is 
 the
 use of ActionErrors.GLOBAL_ERROR.  I haven't used it so it may just be 
 my
 ignorance, but you may want to change it to reference a specific field 
 on
 the form and see if it comes through.
 
   -Arian
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 10:29 AM
  To: [EMAIL PROTECTED]
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  Hey Keith,
  
  I know about the logic tag, I just added it there so I could get an 
 idea 
  if the errors were making it into the page...
  
  When I started on this, it was just the font and error tags...
  
  PS. I am on a nightly build dated the 29th
  
  -Original Message-
  From: kkamholz [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 10:15 AM
  To: struts-user
  Subject: RE: ActionErrors in ActionForm and JSP not showing up...
  
  
  You don't need the logic:messagesPresent.  It automatically checks 
 to 
  see
  if errors are present, so you can just use the font tag and the
  html:errors/.  If there are no errors, it won't write anything out.  
 I
  don't know if this would solve your issue, but maybe it has something 
 to 
  do
  with it.
  
  ~ Keith
  http://www.buffalo.edu/~kkamholz
  
  
  
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, July 30, 2002 10:21 AM
  To: [EMAIL PROTECTED]
  Subject: ActionErrors in ActionForm and JSP not showing up...
  
  
  
  
 if (this.companySelection == null || 
  this.companySelection.equals()) {
 System.out.println(FormPremadeReport:validate  No Company 
 
  Selected);
 errors.add(ActionErrors.GLOBAL_ERROR, new 
  ActionError(error.requestform.company.required));
 }
 return errors;
  
  
  I have the above code in my ActionFormValidate...  When I submit the 
  form it passes the IF (as it should) and returns me to the HTML form 
  page.  BUT my JSP for:
  
  logic:messagesPresent
  !-- Errors detected --
  font color=Redhtml:errors//font
  /logic:messagesPresent
  
  Sends back the comment and font tags, but nothing after that...
  
  Any ideas?  I do have the application properties for all the settings, 
 
  plus the shown resource above...
  
  
  
  
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:   
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail: 
  mailto:[EMAIL PROTECTED]
  
  
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
  
  --
  To unsubscribe, e-mail:
  mailto:[EMAIL PROTECTED]
  For additional commands, e-mail:
  mailto:[EMAIL PROTECTED]
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 

-- 
Dr. Erich Meier, Software Process Improvement
method park Software AG, Wetterkreuz 19a, 91058 Erlangen, Germany
phone: +49-9131-97206-316  mailto:[EMAIL PROTECTED]
fax:   +49-9131-97206-200  http://www.methodpark.de/

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




RE: ActionErrors in ActionForm and JSP not showing up...

2002-07-30 Thread Martin Cooper

Is the page that's supposed to display the errors returned from the same
request that found them? This may not be the case if you are using frames,
redirect or Tiles. The errors are saved as a request attribute, so if it's
not the same request, the errors will be gone.

--
Martin Cooper


 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, July 30, 2002 7:21 AM
 To: [EMAIL PROTECTED]
 Subject: ActionErrors in ActionForm and JSP not showing up...
 
 
 
 
if (this.companySelection == null || 
 this.companySelection.equals()) {
System.out.println(FormPremadeReport:validate  
 No Company 
 Selected);
errors.add(ActionErrors.GLOBAL_ERROR, new 
 ActionError(error.requestform.company.required));
}
return errors;
 
 
 I have the above code in my ActionFormValidate...  When I submit the 
 form it passes the IF (as it should) and returns me to the HTML form 
 page.  BUT my JSP for:
 
   logic:messagesPresent
   !-- Errors detected --
   font color=Redhtml:errors//font
   /logic:messagesPresent
 
 Sends back the comment and font tags, but nothing after that...
 
 Any ideas?  I do have the application properties for all the 
 settings, 
 plus the shown resource above...
 
 
 
 
 
 
 
 --
 To unsubscribe, e-mail:   
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]



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




RE: ActionErrors not clearing

2002-06-27 Thread Andrew Hill

AFAIK if an object is in the session context, either you (or struts) would
have to explicitly remove it.
If you hit the back button or head off to some other page without invoking
the code in your action to clear it it isn't going to go away (unless you
overwrite it with some other object using same key).
Normally however the session will eventually time out (or be explicitly
invalidated as part of a logout) at which time the object will finally be
cleared. In the meantime of course, it (and many other likes it from all the
different sessions) will be cluttering up storage space...
You need to put some thought into how you can stop this sort of thing from
happening. The best way is to be using request context rather than session
context wherever you can, but sometimes this is just too much like hard work
to be worth the extra effort (for example: doing wizards).
For the ActionErrors object however, request context is the best bet, as
surely you would be wanting to create a new ActionErrors object with each
attempt the user makes to submit their form?

-Original Message-
From: Greg Lehane [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 28, 2002 06:23
To: Struts Users Mailing List
Subject: ActionErrors not clearing


Hey Folks,

  Anyone ever had problems with the ActionErrors object not clearing
itself? I've noticed that if you add an error, after which the user hits
the browsers back button to get off whatever validation error
notification page, the actionerror object doesn't clear. It just floats
about in the session until you clear it manually.

  This is potentially disasterous, as the only way to get rid of it is
to re-start the server. (If you haven't got a manual clearing mechanism
in your code)

  Is this a bug in struts or am I missing something?

  Thanks,

- Greg


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


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




RE: ActionErrors in validate()

2002-05-31 Thread Jon.Ridgway

Hi Hayri,

It's possible that you are missing some entries from your Struts
'application' (see web.xml) resource bundle. Check that you have the
following keys in this properties file:

errors.footer=/ulhr
errors.header=h3font color=redValidation Error/font/h3You must
correct the following error(s) before proceeding:ul

You can of course change the text, but I think they must be present as a
default is not provided (??)

Jon.

-Original Message-
From: Hayri Soenmez [mailto:[EMAIL PROTECTED]] 
Sent: 31 May 2002 10:27
To: [EMAIL PROTECTED]
Subject: ActionErrors in validate()

Hi, 

I try to write some error messages in a validate()-method of LoginForm:

errors.add(ActionErrors.GLOBAL_ERROR, new
ActionError(error.username.required))

If any errors occur, the message value of error.username.required
displays on web. But there is also null String at beginning and end of
the error message. 
Where is this String set? And where can I remove it?

Thanks
Hayri

Gruss
Hayri


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

The contents of this email are intended only for the named addressees and
may contain confidential and/or privileged material. If received in error
please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
e-mail from your system. Unauthorised review, distribution, disclosure or
other use of this information could constitute a breach of confidence. Your
co-operation in this matter is greatly appreciated. 

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




Re: ActionErrors - Customizing the display of?

2002-05-06 Thread Joe Lee

Brad,

I wish to place each action error next to the field
that it is assigned to.

You can do that with html:errors tag already. Read the
documentation (about the property attribute of the
errors tag).
e.g.
html:text property=firstnamehtml:errors
property=firstname

- Joe


__
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

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




Re: ActionErrors - Customizing the display of?

2002-05-06 Thread Rodney Epp

At 02:17 AM 5/6/2002 -0500, you wrote:
I want to customize the way errors are displayed on the JSP page.  For
example:  I wish to place each action error next to the field that it is
assigned to.  Is there a taglib out there that will help me do this.  I'm
able to access the key but I am unsure how to resolve the string to the
proper value in the ApplicationResources.properties file.  Thanks in advance
for your help.

Thanks,
Brad Gibs


http://www.javaworld.com/javaworld/jw-03-2000/jw-0331-ssj-forms.html
I recently came across this javaworld article about Advanced Form 
Processing which has a non-struts, bean-oriented solution to this question.

http://jsptags.com This is a good site with articles, tutorials, available 
tag libraries,...

Rod Epp
Chicago, IL




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




Re: actionerrors not showing up

2002-03-19 Thread Steven Dahlin

Templates are used for the main frameset, yes.

Steve


From: John Kroubalkian [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: actionerrors not showing up
Date: Tue, 19 Mar 2002 09:26:56 -0700

Just out of curiosity, are you using Templates?  [struts-template.tld]
- Original Message -
From: liudsm [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, March 18, 2002 6:27 PM
Subject: Re: actionerrors not showing up


  yes,you are right ! i cann't  find this fact .thank you !
  - Original Message -
  From: Yu, Yanhui [EMAIL PROTECTED]
  Newsgroups: Struts
  Sent: Tuesday, March 19, 2002 1:46 AM
  Subject: RE: actionerrors not showing up
 
 
   two cents:
   1. change an error message to an.error.message in your code.
   2. make sure you have an.error.message=some error message that you 
want
to
   show on jsp in the application.properties file.
  
   If you have these two things done and restart your server, it seems to
me
   you would see the some error message that you want to show on jsp on
the
   jsp page.
  
   Thanks,
   Yanhui
  
   -Original Message-
   From: liudsm [mailto:[EMAIL PROTECTED]]
   Sent: Sunday, March 17, 2002 10:02 PM
   To: Struts Users Mailing List
   Subject: Re: actionerrors not showing up
  
  
   Hi, good afternoon,i had saw your code,but i can not find any error.so
your
   question may focus on other program .
  
   - Original Message -
  
   From: Steven Dahlin [EMAIL PROTECTED]
  
   Newsgroups: Struts
  
   To: 'Struts Users Mailing List' [EMAIL PROTECTED]
  
   Sent: Monday, March 18, 2002 10:23 AM
  
   Subject: actionerrors not showing up
  
  
  
  
  
I am not getting any errors showing up with the jsp page.  I have 
the
  
following action code:
  
   
  
public class UserAction extends Action
  
{
  
  public ActionForward perform( ActionMapping   actMap,
  
   ActionFormactFrm,
  
   HttpServletRequest  hsReq,
  
   HttpServletResponse hsRsp )
  
throws  IOException,
  
ServletException
  
   {
  
   
  
  ActionErrors errors  = new ActionErrors();
  
   
  
   /* code of no consequence */
  
   
  
  ActionError actErr = new ActionError( an error message );
  
   
  
  errors.add( ActionErrors.GLOBAL_ERROR, actErr );
  
   
  
  saveErrors( hsReq, errors );
  
   
  
  return ( new ActionForward( actMap.getInput() ) );
  
   
  
   }
  
}
  
   
  
   
  
Then the jsp that is called looks for the errors with the tag:
  
   
  
   html:errors/
  
   
  
but no errors appear.  Can anyone tell me what I am doing wrong?
  
   
  
Thanks,
  
Steve
  
   
  
--
  
To unsubscribe, e-mail:
   mailto:[EMAIL PROTECTED]
  
For additional commands, e-mail:
   mailto:[EMAIL PROTECTED]
  
   
  
  
   --
   To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
   For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
  


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





_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


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




Re: actionerrors not showing up

2002-03-19 Thread John Kroubalkian

Can you show me your action tag [from struts-config.xml] for this action?

Are you doing something in your Action class such as return new
ActionForward(mapping.getInput()); ?

John

In my action  tag [ struts-config.xml] I had my input marked as the
portion of the entire template where the input was coming.  So, if the
action's input
- Original Message -
From: Steven Dahlin [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, March 19, 2002 9:56 AM
Subject: Re: actionerrors not showing up


 Templates are used for the main frameset, yes.

 Steve


 From: John Kroubalkian [EMAIL PROTECTED]
 Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Subject: Re: actionerrors not showing up
 Date: Tue, 19 Mar 2002 09:26:56 -0700
 
 Just out of curiosity, are you using Templates?  [struts-template.tld]
 - Original Message -
 From: liudsm [EMAIL PROTECTED]
 To: Struts Users Mailing List [EMAIL PROTECTED]
 Sent: Monday, March 18, 2002 6:27 PM
 Subject: Re: actionerrors not showing up
 
 
   yes,you are right ! i cann't  find this fact .thank you !
   - Original Message -
   From: Yu, Yanhui [EMAIL PROTECTED]
   Newsgroups: Struts
   Sent: Tuesday, March 19, 2002 1:46 AM
   Subject: RE: actionerrors not showing up
  
  
two cents:
1. change an error message to an.error.message in your code.
2. make sure you have an.error.message=some error message that you
 want
 to
show on jsp in the application.properties file.
   
If you have these two things done and restart your server, it seems
to
 me
you would see the some error message that you want to show on jsp
on
 the
jsp page.
   
Thanks,
Yanhui
   
-Original Message-
From: liudsm [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 17, 2002 10:02 PM
To: Struts Users Mailing List
Subject: Re: actionerrors not showing up
   
   
Hi, good afternoon,i had saw your code,but i can not find any
error.so
 your
question may focus on other program .
   
- Original Message -
   
From: Steven Dahlin [EMAIL PROTECTED]
   
Newsgroups: Struts
   
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
   
Sent: Monday, March 18, 2002 10:23 AM
   
Subject: actionerrors not showing up
   
   
   
   
   
 I am not getting any errors showing up with the jsp page.  I have
 the
   
 following action code:
   

   
 public class UserAction extends Action
   
 {
   
   public ActionForward perform( ActionMapping   actMap,
   
ActionFormactFrm,
   
HttpServletRequest  hsReq,
   
HttpServletResponse hsRsp )
   
 throws  IOException,
   
 ServletException
   
{
   

   
   ActionErrors errors  = new ActionErrors();
   

   
/* code of no consequence */
   

   
   ActionError actErr = new ActionError( an error message );
   

   
   errors.add( ActionErrors.GLOBAL_ERROR, actErr );
   

   
   saveErrors( hsReq, errors );
   

   
   return ( new ActionForward( actMap.getInput() ) );
   

   
}
   
 }
   

   

   
 Then the jsp that is called looks for the errors with the tag:
   

   
html:errors/
   

   
 but no errors appear.  Can anyone tell me what I am doing wrong?
   

   
 Thanks,
   
 Steve
   

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

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




 _
 Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp.


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


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




Re: actionerrors not showing up

2002-03-18 Thread liudsm

Hi, good afternoon,i had saw your code,but i can not find any error.so your question 
may focus on other program .
- Original Message - 
From: Steven Dahlin [EMAIL PROTECTED]
Newsgroups: Struts
To: 'Struts Users Mailing List' [EMAIL PROTECTED]
Sent: Monday, March 18, 2002 10:23 AM
Subject: actionerrors not showing up


 I am not getting any errors showing up with the jsp page.  I have the
 following action code:
 
 public class UserAction extends Action
 {
   public ActionForward perform( ActionMapping   actMap,
ActionFormactFrm,
HttpServletRequest  hsReq,
HttpServletResponse hsRsp )
 throws  IOException,
 ServletException
{
 
   ActionErrors errors  = new ActionErrors();
 
/* code of no consequence */
 
   ActionError actErr = new ActionError( an error message );
 
   errors.add( ActionErrors.GLOBAL_ERROR, actErr );
 
   saveErrors( hsReq, errors );
 
   return ( new ActionForward( actMap.getInput() ) );
 
}
 }
 
 
 Then the jsp that is called looks for the errors with the tag:
 
html:errors/
 
 but no errors appear.  Can anyone tell me what I am doing wrong?
 
 Thanks,
 Steve
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 



Subject: Re: actionerrors not showing up

2002-03-18 Thread @Basebeans.com

Subject: Subject: Re: actionerrors not showing up
8012:From: liudsm [EMAIL PROTECTED]
 ===

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




RE: actionerrors not showing up

2002-03-18 Thread Yu, Yanhui

two cents:
1. change an error message to an.error.message in your code.
2. make sure you have an.error.message=some error message that you want to
show on jsp in the application.properties file.

If you have these two things done and restart your server, it seems to me
you would see the some error message that you want to show on jsp on the
jsp page.

Thanks,
Yanhui 

-Original Message-
From: liudsm [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 17, 2002 10:02 PM
To: Struts Users Mailing List
Subject: Re: actionerrors not showing up


Hi, good afternoon,i had saw your code,but i can not find any error.so your
question may focus on other program .

- Original Message - 

From: Steven Dahlin [EMAIL PROTECTED]

Newsgroups: Struts

To: 'Struts Users Mailing List' [EMAIL PROTECTED]

Sent: Monday, March 18, 2002 10:23 AM

Subject: actionerrors not showing up





 I am not getting any errors showing up with the jsp page.  I have the

 following action code:

 

 public class UserAction extends Action

 {

   public ActionForward perform( ActionMapping   actMap,

ActionFormactFrm,

HttpServletRequest  hsReq,

HttpServletResponse hsRsp )

 throws  IOException,

 ServletException

{

 

   ActionErrors errors  = new ActionErrors();

 

/* code of no consequence */

 

   ActionError actErr = new ActionError( an error message );

 

   errors.add( ActionErrors.GLOBAL_ERROR, actErr );

 

   saveErrors( hsReq, errors );

 

   return ( new ActionForward( actMap.getInput() ) );

 

}

 }

 

 

 Then the jsp that is called looks for the errors with the tag:

 

html:errors/

 

 but no errors appear.  Can anyone tell me what I am doing wrong?

 

 Thanks,

 Steve

 

 --

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

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

 


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




Re: ActionErrors

2002-02-08 Thread Keith Bacon

Hi Steve,
For the ActionErrors collection, get() returns an iterator which will return 
ActionError objects,
not sure but hopefully their toString() will give the message you want. yuk!

Much better to use html:errors tag to display them!
I see the 'errors' tag only gets the collection from the request.
Hava you got a good reason for having the errors in the session? 
Keith.

--- Steve Earl [EMAIL PROTECTED] wrote:
 Hi,
 
 Can anyone give me a quick tip on how to store and subsequently display an
 ActionErrors object in session scope rather than within the request.
 
 At the moment my Action class copies the ActionErrors from the request to
 the session with:
 sess.setAttribute(org.apache.struts.action.ERROR,
   
 request.getAttribute(org.apache.struts.action.ERROR));
 
 And I then try to access this from within my jsp with:
   logic:present name=org.apache.struts.action.ERROR
 scope=session
   bean:write name=org.apache.struts.action.ERROR
 scope=session /'
   /logic:present
 
 Unfortunately the output I get on the page is:
   org.apache.struts.action.ActionErrors@2b3d53' 
 
 which seems to be the reference to the ActionErrors object rather than the
 text of an individual error contained within it.
 
 thanks in advance for any help
 
 regards,
 steve
 
 
 __ 
 Steve Earl
 
 InfoGain Limited
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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




RE: ActionErrors

2002-02-08 Thread Steve Earl

Hi Keith,

Ta for the response. The reason I'm having to put the ActionErrors object
onto the session is because the site I'm developing is using frames.
Basically, we have an input search window and a results window below it. The
only way I've been able to make this work is by putting the search form,
results form (if any) and errors (again, if any) onto the session when the
search is submitted. My action class then forwards back to the parent window
of the two frames and the jsp for the search and results/errors drag the
data from the session to rebuild the windows.

This was all working fine without putting errors onto the session when I
could use the meta-equiv tag Window-target to target the output jsp
(containing either errors or a set of results) to the results window.
Unfortunately this only seems to work within Netscape and not Mozilla or
IE

What I've done at present is clone the html:errors tag (and associated
class) to create an identical one which checks session scope rather than
request scope. It's nearly working (isn't that always the way!!) -
unfortunately I'm getting some null values coming out around the errors
which I don't yet understand - see below:
null
* Please pick an arrival city you muppet
* Please enter a fare
* Please pick a departure city
null

If I can sort this out (must be coming from the tag class somewhere) then I
think that may solve my problem.

However, if anyone knows a cleaner way of doing this (without hacking the
struts taglibs) then please let  me know!!

regards,
steve

__ 
Steve Earl

InfoGain Limited




-Original Message-
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 11:37 AM
To: Struts Users Mailing List
Subject: Re: ActionErrors


Hi Steve,
For the ActionErrors collection, get() returns an iterator which will return
ActionError objects,
not sure but hopefully their toString() will give the message you want. yuk!

Much better to use html:errors tag to display them!
I see the 'errors' tag only gets the collection from the request.
Hava you got a good reason for having the errors in the session? 
Keith.

--- Steve Earl [EMAIL PROTECTED] wrote:
 Hi,
 
 Can anyone give me a quick tip on how to store and subsequently display an
 ActionErrors object in session scope rather than within the request.
 
 At the moment my Action class copies the ActionErrors from the request to
 the session with:
 sess.setAttribute(org.apache.struts.action.ERROR,
   
 request.getAttribute(org.apache.struts.action.ERROR));
 
 And I then try to access this from within my jsp with:
   logic:present name=org.apache.struts.action.ERROR
 scope=session
   bean:write name=org.apache.struts.action.ERROR
 scope=session /'
   /logic:present
 
 Unfortunately the output I get on the page is:
   org.apache.struts.action.ActionErrors@2b3d53' 
 
 which seems to be the reference to the ActionErrors object rather than the
 text of an individual error contained within it.
 
 thanks in advance for any help
 
 regards,
 steve
 
 
 __ 
 Steve Earl
 
 InfoGain Limited
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 


__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

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

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




  1   2   >