Saturday, April 24, 2004 07:22 PM
That is a kind of strange requirement lol ... You should starting by assuming
that everything is OK on the server side and act upon the problem if
and when they raise rather than the other way around (that is assuming something might go wrong in the first place :-)
You have different ways to do this ...
What is usually done, and I think everybody here would agree with me, is to start off positive and ... simply rely on java exceptions in the event of a problem.
It is very easy with Struts to redirect to a predefined JSP in the case of an exception: you just have to define a global-exception in your struts-config.xml (read its DTD file for more info). You can define one for each exception (tragedy) that may happen, and also one for the class 'Exception' so you are sure to get your error page for any and all sort of exceptions (since the all inherite from Exception).
If you really feel insecure (and want to eat your server resources), you indeed can overload the Struts Dispatcher so you could check the connectivity with other servers, the tamperature of your CPU, the speed of your fan, and the number of running processes before each request :o)
Good luck with your migration, it sounds like a tough job to guess the ingredients of a cake just by looking at its picture!
Feel free to ask more questions if you need to (assuming that you have already seached for answers on this forum).