Hi, I am new to Struts and currently in the process of porting a JSP based Web Application to Struts and Velocity.
Personally I hate stupid error messages like 'Failed to process your order....' or 'Operation failed.... '. These type of messages are absolutely useless. For simple applications that simply store and retrieve data from a database it is possible do define possible error messages in advance and store them in a resource file. It is impossible in a distributed environment. When I look at samples and at the API I see that you offer ActionErrors and ActionError to process Errors. The real Error message is stored in a resource File and you pass a key to the ActionError class which then retrieves the message from the resource file. This is a nice feature in multi-language environments but in a distributed environment it is not possible know all possible error messages. I run a lot of CORBA stuff and have a lot of business logic implemented in various CORBA servers running on Windows and UNIX boxes. I have beans that wrap the CORBA clients and these beans are used in Action objects. There are many places where things can go wrong in a distributed application environment. I consequently use exeption handling and put all error messages in the exception itself. Since CORBA knows exceptions many exceptions are already defined on the IDL level. The server implementation (usually written in C++) fills human readable error messages in the exception object. Finally exactly these messages should be displayed on an end-users browser. I think the concept of displaying the error message on top of a form very good, since a user has a chance to correct the entries made if the error is caused by a typo. If there is a technical problem (such as a network beeing down, or a service such as a credit card validation or anything else on a remote location is not available) then I have at least a chance to return a meaningful error message. If I have to store messages in a resource file I could simply return something like "Operation failed". This is not very usefull for either the end-user nor any support staff. I don't know what the philosophy of Error handling in struts is, but for distributed applications it would be nice if there would be a possibility to simply add a string to the ActionError object and then add it to the array of errors. Are there any reasons why this functionality is not available? A workaround is simple, I can put error messages in a request or session context and then display it in a velocity macro. But I think that this feature is something that would well suite for the framework. Thanks Thomas -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>