// Calculate the appropriate URL
StringBuffer url = new StringBuffer();
HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
if (forward != null) {
ForwardConfig fc = config.findForwardConfig(forward);
if (fc == null) {
throw new MalformedURLException(messages.getMessage("computeURL.forward", forward));
}
if (fc.getRedirect()) {
redirect = true;
}
if (fc.getPath().startsWith("/")) {
url.append(request.getContextPath());
url.append(forwardURL(request, fc));
} else {
url.append(fc.getPath());
}
} else if (href != null) {
url.append(href);
} else if (action != null) {
url.append(getActionMappingURL(action, pageContext));