Structs中ActonForm设置的具体方式?? 我看到这样一个问题。就是在AAction中配置了一个AActionForm直接跳到BAction中。BAction中的BAction中的值和AActionForm值相同是怎么回事。求高手解释 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你看下你Action配值文件中是否配值了Attribute.且两个action中attribute值不一样。 public static ActionForm createActionForm(HttpServletRequest request, ActionMapping mapping, ModuleConfig moduleConfig, ActionServlet servlet) { // Is there a form bean associated with this mapping? String attribute = mapping.getAttribute(); if (attribute == null) { return (null); } // Look up the form bean configuration information to use String name = mapping.getName(); FormBeanConfig config = moduleConfig.findFormBeanConfig(name); if (config == null) { log.warn("No FormBeanConfig found under '" + name + "'"); return (null); } ActionForm instance = lookupActionForm(request, attribute, mapping.getScope()); // Can we recycle the existing form bean instance (if there is one)? if ((instance != null) && config.canReuse(instance)) { return (instance); } return createActionForm(config, servlet); }private static ActionForm lookupActionForm(HttpServletRequest request, String attribute, String scope) { // Look up any existing form bean instance if (log.isDebugEnabled()) { log.debug(" Looking for ActionForm bean instance in scope '" + scope + "' under attribute key '" + attribute + "'"); } ActionForm instance = null; HttpSession session = null; if ("request".equals(scope)) { instance = (ActionForm) request.getAttribute(attribute); } else { session = request.getSession(); instance = (ActionForm) session.getAttribute(attribute); } return (instance); }Structs中处理ActonForm如上 跳转的时候出的问题,我估计跳转的时候数据也传递了.....就是request中的数据,可能是B和A中的字段相同,所以就相当于请求B了... AActionForm 和 BActionForm 字段名字相同的话,是会出现这种问题 请高手帮忙看看这个程序! 各位高手,初学者求教。结合以下实例说下静态的用法。 请问API文档中文版有没有象英文版检索功能? 如何把“\”替换成"\\" ============================= 有个小问题? JSON格式数据 关于JDBC 调用存储过程的奇怪问题???解决问题 马上送分!!! 提示 '.'expected 为什么随机数不能生成呢?我执行完,一片空白! 如何屏蔽鼠标左键功能。谢谢。 QQ登录界面里的状态栏可以通过哪些技术实现? 使用syncronized后怎么提示缺少分号
ActionMapping mapping, ModuleConfig moduleConfig, ActionServlet servlet) {
// Is there a form bean associated with this mapping?
String attribute = mapping.getAttribute(); if (attribute == null) {
return (null);
} // Look up the form bean configuration information to use
String name = mapping.getName();
FormBeanConfig config = moduleConfig.findFormBeanConfig(name); if (config == null) {
log.warn("No FormBeanConfig found under '" + name + "'"); return (null);
} ActionForm instance =
lookupActionForm(request, attribute, mapping.getScope()); // Can we recycle the existing form bean instance (if there is one)?
if ((instance != null) && config.canReuse(instance)) {
return (instance);
} return createActionForm(config, servlet);
}private static ActionForm lookupActionForm(HttpServletRequest request,
String attribute, String scope) {
// Look up any existing form bean instance
if (log.isDebugEnabled()) {
log.debug(" Looking for ActionForm bean instance in scope '"
+ scope + "' under attribute key '" + attribute + "'");
} ActionForm instance = null;
HttpSession session = null; if ("request".equals(scope)) {
instance = (ActionForm) request.getAttribute(attribute);
} else {
session = request.getSession();
instance = (ActionForm) session.getAttribute(attribute);
} return (instance);
}Structs中处理ActonForm如上
可能是B和A中的字段相同,所以就相当于请求B了...