Re: How to Build error messages dynamically??

2002-08-26 Thread vivraji

Oops. I found where the problem is:


ActionErrors errors = new ActionErrors();
errors.add(ActionErrors.GLOBAL_ERROR,
 new ActionError("error.tablemessage", (String)"Pass My message"));
saveErrors(request, errors);

Pass the message as a String Object or Integer Object is what is 
expected :)

Thank you Phil.

- Vivek


--- In [EMAIL PROTECTED], Phil Steitz <[EMAIL PROTECTED]> wrote:
> Vivek Sundararaman wrote:
> 
> >Hello all
> >
> >I would appreciate any/ all help for my problem.
> >
> >We are storing all the errors & messages displayed to the users in 
a
> >database.
> >We are having a controller making the calls to the database and
> >returning the presentation layer asset of errors or messages to be
> >displayed.
> >
> >In my actionclass, after I make the call to the controller, based 
on the
> >success or failure of the call, I build the actionerrors with the
> >message sent back from controller call. These messages are not
> >maintained in the appresources.properties 
> >The code in my actionclass looks like:
> >
> >ActionErrors errors = new ActionErrors();
> >errors.add(ActionErrors.GLOBAL_ERROR,
> >   new ActionError
("error.tablemessage", "Pass
> >My message"));
> >saveErrors(request, errors);
> >
> >In my appresources.properties
> >error.tablemessage={0}
> >
> >In my jsp
> >
> >
> >This does not print the error message"Pass My message" on the page.
> >
> >How to make a dynamic error or message appear in the page?
> >
> >(I tried to look in the archives for answers, but couldn't find 
one. May
> >be I missed it too.)
> >
> >Thank you
> >Vivek
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:   
> >For additional commands, e-mail: 
> >
> Vivek,
> 
> I have used syntax nearly identical to yours successfully in Struts 
> 1.02.   Could be a problem with your jsp or control flow.   Do you 
see 
> the errors header and footer displayed or are you getting a blank 
page?
>  
> I would suggest the following:
> 
> 0.  Inspect your container logs
> 1.  Verify that you have the struts bean and html tag libs 
referenced in 
> your jsp and there are no other problems in the jsp
> 2.  Add some logging to verify that the ActionErrors constructor is 
> getting the actual parameters that you think it is getting
> 3.  Add logging to verify that the saveErrors is getting executed
> 
> 
> hth,
> 
> Phil
> 
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Struts in WSAD

2002-07-17 Thread vivraji

Hello All

This is my first time here.
I just started working with Struts with very min help from books. The 
thing is we are using WSAD. 

Can someone help me to understand how to start using struts - 
especially creating classes.

Thank you All




--
To unsubscribe, e-mail:   
For additional commands, e-mail: