1 18 19 package org.apache.struts.actions; 20 21 import javax.servlet.ServletException ; 22 import javax.servlet.http.HttpServletRequest ; 23 import javax.servlet.http.HttpServletResponse ; 24 25 import org.apache.commons.logging.Log; 26 import org.apache.commons.logging.LogFactory; 27 import org.apache.struts.action.ActionForm; 28 import org.apache.struts.action.ActionForward; 29 import org.apache.struts.action.ActionMapping; 30 31 123 public class MappingDispatchAction extends DispatchAction { 124 125 126 128 129 132 private static Log log = 133 LogFactory.getLog(MappingDispatchAction.class); 134 135 136 138 139 161 public ActionForward execute( 162 ActionMapping mapping, 163 ActionForm form, 164 HttpServletRequest request, 165 HttpServletResponse response) 166 throws Exception { 167 168 return super.execute(mapping, form, request, response); 170 } 171 172 173 191 protected ActionForward unspecified( 192 ActionMapping mapping, 193 ActionForm form, 194 HttpServletRequest request, 195 HttpServletResponse response) 196 throws Exception { 197 198 String message = 199 messages.getMessage("mapping.parameter", mapping.getPath()); 200 201 log.error(message); 202 203 throw new ServletException (message); 204 } 205 206 218 protected String getMethodName( 219 ActionMapping mapping, 220 ActionForm form, 221 HttpServletRequest request, 222 HttpServletResponse response, 223 String parameter) 224 throws Exception { 225 226 return parameter; 228 } 229 230 } 231 | Popular Tags |