Java Reference
In-Depth Information
Stripes also truncates a list of suffixes from the action bean class name.
Order is important here, because if a suffix is found at the end of the
name, it is removed, and the truncated name is used when checking
for the next suffix in the list. To understand this better, let's look at the
default list of suffixes:
1. "Bean"
2. "Action"
Stripes first removes "Bean" from the end of the class name or leaves the
name unchanged if it does not end in "Bean" . Next, it removes "Action"
from the end of the resulting name from the previous step. Again, the
name is left unchanged if it doesn't end in "Action" . So, for example:
"LoginActionBean" "Login" .
"LoginActionBean" becomes "LoginAction" (remove "Bean" ) and then
becomes "Login" (remove "Action" ).
"LoginBean" "Login" .
"LoginBean" becomes "Login" (remove "Bean" ) and then remains "Login"
(unchanged since it doesn't end in "Action" ).
"LoginBeanAction" "LoginBean" .
"LoginBeanAction" remains "LoginBeanAction" (unchanged since it
doesn't end in "Bean" ), then becomes "LoginBean" (remove "Action" ).
"LoginActionBeanTest" "LoginActionBeanTest" .
"LoginActionBeanTest" remains "LoginActionBeanTest" (unchanged
since it doesn't end in "Bean" ) and again remains "LoginActionBean-
Test" (unchanged since it doesn't end in "Action" ).
"LoginController" "LoginController" remains unchanged as in the
previous example.
So, you see how having "Bean" and "Action" , in that order, works to
remove just "Bean" , just "Action" , or "ActionBean" from the end of the
action bean class name. To change the list of suffixes, override the
getActionBeanSuffixes ( ) method of NameBasedActionResolver .
Clean URLs with a Prefix
“Clean” URLs have become popular, because they are more meaningful
to the user, hide some of your implementation details, are more search-
engine friendly, and are just plain better lookin'.
 
 
Search WWH ::




Custom Search