public void process(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException { // Wrap multipart requests with a special wrapper
request = processMultipart(request); // Identify the path component we will use to select a mapping
String path = processPath(request, response);
if (path == null) {
return;
}
if (log.isDebugEnabled()) {
log.debug("Processing a '" + request.getMethod() +
"' for path '" + path + "'");
} // Select a Locale for the current user if requested
processLocale(request, response); // Set the content type and no-caching headers if requested
processContent(request, response);
processNoCache(request, response); // General purpose preprocessing hook
if (!processPreprocess(request, response)) {
return;
}
this.processCachedMessages(request, response); // Identify the mapping for this request
ActionMapping mapping = processMapping(request, response, path);
if (mapping == null) {
return;
} // Check for any role required to perform this action
if (!processRoles(request, response, mapping)) {
return;
} // Process any ActionForm bean related to this request
ActionForm form = processActionForm(request, response, mapping);
processPopulate(request, response, form, mapping);
// Validate any fields of the ActionForm bean, if applicable
try {
if (!processValidate(request, response, form, mapping)) {
return;
}
} catch (InvalidCancelException e) {
ActionForward forward = processException(request, response, e, form, mapping);
processForwardConfig(request, response, forward);
return;
} catch (IOException e) {
throw e;
} catch (ServletException e) {
throw e;
}
// Process a forward or include specified by this mapping
if (!processForward(request, response, mapping)) {
return;
}
if (!processInclude(request, response, mapping)) {
return;
} // Create or acquire the Action instance to process this request
Action action = processActionCreate(request, response, mapping);
if (action == null) {
return;
} // Call the Action instance itself
ActionForward forward =
processActionPerform(request, response,
action, form, mapping); // Process the returned ActionForward instance
processForwardConfig(request, response, forward); }直接返回了后面没有执行,应该没有执行action里的方法,也没有跳转
HttpServletResponse response)
throws IOException, ServletException { // Wrap multipart requests with a special wrapper
request = processMultipart(request); // Identify the path component we will use to select a mapping
String path = processPath(request, response);
if (path == null) {
return;
}
if (log.isDebugEnabled()) {
log.debug("Processing a '" + request.getMethod() +
"' for path '" + path + "'");
} // Select a Locale for the current user if requested
processLocale(request, response); // Set the content type and no-caching headers if requested
processContent(request, response);
processNoCache(request, response); // General purpose preprocessing hook
if (!processPreprocess(request, response)) {
return;
}
this.processCachedMessages(request, response); // Identify the mapping for this request
ActionMapping mapping = processMapping(request, response, path);
if (mapping == null) {
return;
} // Check for any role required to perform this action
if (!processRoles(request, response, mapping)) {
return;
} // Process any ActionForm bean related to this request
ActionForm form = processActionForm(request, response, mapping);
processPopulate(request, response, form, mapping);
// Validate any fields of the ActionForm bean, if applicable
try {
if (!processValidate(request, response, form, mapping)) {
return;
}
} catch (InvalidCancelException e) {
ActionForward forward = processException(request, response, e, form, mapping);
processForwardConfig(request, response, forward);
return;
} catch (IOException e) {
throw e;
} catch (ServletException e) {
throw e;
}
// Process a forward or include specified by this mapping
if (!processForward(request, response, mapping)) {
return;
}
if (!processInclude(request, response, mapping)) {
return;
} // Create or acquire the Action instance to process this request
Action action = processActionCreate(request, response, mapping);
if (action == null) {
return;
} // Call the Action instance itself
ActionForward forward =
processActionPerform(request, response,
action, form, mapping); // Process the returned ActionForward instance
processForwardConfig(request, response, forward); }直接返回了后面没有执行,应该没有执行action里的方法,也没有跳转
解决方案 »
- SQLQuery查询结果为空,这是怎么回事?
- 关于在判断URL时如何判断是不是404重定向的问题
- 请教一下大家 都用什么开发JSP啊 小弟新手 求指教
- java连接局域网中的Oracle数据库应该在Hibernate中怎么配置
- C调用JAVA出错,求指点
- https 跟 http 转换
- Cannot get request dispatcher for path result.jsp
- 急急急,请推荐基本Java开发Web Service的好书!
- 为何EJB中事务不能回滚??sessionContext.setRollbackOnly无效!
- 求Access JDBC驱动
- 菜鸟级spring框架问题
- 在Struts框架中,如何解决内存溢出的问题?
window.document.forms['表单名'].action = action 的URL;
window.document.forms['表单名'].submit();方式来实现的action 跳转,可能是另外一个action来实现的