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 字段名字相同的话,是会出现这种问题 java正则表达式解析 关于提取html网页为纯文本内容的问题 IO乱码 关于数组的堆栈 推荐下有什么基础书看 询问一个关于定义方法优先级的问题 谢谢 求详解-一道考试题 倾家荡产求答案:如何实现jsp中对文件中固定行的修改或删除 怎么将类的成员函数的地址打印到控制台上? 急!这个星期要去应聘,请大家帮忙参谋参谋!(给的分绝对诱人) 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了...