I resolved this issue defining
where getKKAppEng(HttpServletRequest request,HttpServletResponse response, String path) must be called from the execute method in your actions
In this way you can define special custom title on a pre-path basis in Message.properties.
Code Select
private String getCatMessage(HttpServletRequest request, String path,
String key) {
final String localKey = String.format("seo.%s.%s", path, key);
String localMessage = getCatMessage(request, localKey);
if (localMessage.contains(localKey)) {
log.debug("Resources for " + localKey
+ " not found searching seo.default." + key);
localMessage = getCatMessage(request, "seo.default." + key);
}
log.debug("Resource value is:" + localMessage);
return localMessage;
}
protected KKAppEng getKKAppEng(HttpServletRequest request,HttpServletResponse response, String path) throws KKAppException,
KKException {
KKAppEng kkAppEng = super.getKKAppEng(request, response);
kkAppEng.setPageTitle(getCatMessage(request, path, "title"));
kkAppEng.setMetaDescription(getCatMessage(request, path,
"meta.description"));
kkAppEng.setMetaKeywords(getCatMessage(request, path, "meta.keywords"));
return kkAppEng;
}
where getKKAppEng(HttpServletRequest request,HttpServletResponse response, String path) must be called from the execute method in your actions
Code Select
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
try {
int custId;
KKAppEng kkAppEng = this.getKKAppEng(request, response, mapping.getPath().substring(1));
...
In this way you can define special custom title on a pre-path basis in Message.properties.