Originally posted by Ernest Friedman-Hill:
This design makes me vaguely uncomfortable, and I think you feel the same way, or you wouldn't have written. This is one of those examples where extending a concrete class -- as opposed to extending an abstract one or implementing an interface -- leads you to write questionable code.
Originally posted by Artemesia Lakener:
1. what's the difference between <global-exception> and "local exception" (defined inside the <action> tag) ? Doesn't <global-exception> belong to some Actions ? Are they the exceptions that are *not* handled by Action ?
2. For <global-exception> should I always define the scope to "session" ? I guess "scope=request" won't work because it won't carry it all the way down. Right ?
3. If an exception is declared in the struts-config.xml, do I still have to write code like "ActionErrors erros = new ActionError(..); errors.add(new ..)" kind stuff ?
4. Is it true that if an exception IS caught and handled specifically in an Action, then it should *not* be declared in struts-config.xml any more (no matter global or local exception) ?
Originally posted by Merrill Higginson:
I encountered a similar problem a while back with French characters being displayed improperly. In my case, I was able to fix it by changing the <meta> tag in the header. Here is an example:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
Just make sure that the charset is one that supports Brazilian Portuguese.
Yes. If you want to pass some values, always use submit in some sort of way.
In your jsp page, the tag declaration should be
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>
The declaration in web.xml points to your local copy of the struts-bean.tld, and these tld files are placed in <web-root>/WEB-INF directory.