Hi,
some strings in struts-config.xml and in java source code MUST be identical. Since your struts editor (great tool) has struts-config.xml under complete control, I suggest generating Java-Constants for these cases.
E.g. a success-connector in struts-config.xml:
<action
type=”….struts.action.LoginAction”>
<forward name=”success” path=”/LogonSuccess.jsp” />
would produce following constant in a full generated java class named “Tokens”
public class Tokens {
final class LoginAction {
public static final java.lang.String SUCCESS = “success” ;
The namespace of class “Tokens” has to be organized, because “success” is a name local to LoginAction.
It would also be fine, if the names of the JSP properties would be java constants, so one could use them in Java to access them, e.g.
request.setAttribute(Tokens.JSPProperty.userName , … );
But this seems to me a lot of work to implement, since the property names are only in the wizard properties of that page.
Klaus