Struts 2杂谈(1):ValueStack对象的传送带机制 - 编程入门网
作者 佚名技术
来源 NET编程
浏览
发布时间 2012-06-16
if (newName != null)
stack.setValue(newName, properties.get(name));
if (!separator.equals(""))
{
newName = name.replaceAll("\\.", "");
stack.setValue(newName, properties.get(name));
}
newName = name.replaceAll("\\.", separator);
stack.setValue(newName, properties.get(name));
}
}
return invocation.invoke();
}
}
Struts 2杂谈(1):ValueStack对象的传送带机制(3)时间:2011-06-27 BlogJava nokiaguy用于测试的Action类的源代码: package actions; public class MyAction { private String name; private Integer price; private String log4jappenderstdout; private String log4j_rootLogger; private String conversionPattern; public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getPrice() { return price; } public void setPrice(Integer price) { this.price = price; } public String getLog4jappenderstdout() { return log4jappenderstdout; } public void setLog4jappenderstdout(String log4jappenderstdout) { this.log4jappenderstdout = log4jappenderstdout; } public String getLog4j_rootLogger() { return log4j_rootLogger; } public void setLog4j_rootLogger(String log4j_rootLogger) { this.log4j_rootLogger = log4j_rootLogger; } public String getConversionPattern() { return conversionPattern; } public void setConversionPattern(String conversionPattern) { this.conversionPattern = conversionPattern; } public String execute() { System.out.println("name:" + name); System.out.println("price:" + price); System.out.println("log4jappenderstdout:" + log4jappenderstdout); System.out.println("log4j_rootLogger:" + log4j_rootLogger); System.out.println("conversionPattern:" + conversionPattern); return null; } } Struts 2杂谈(1):ValueStack对象的传送带机制(4)时间:2011-06-27 BlogJava nokiaguyAction类的配置代码如: <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1//EN" "http://struts.apache.org/dtds/struts-2.1.dtd"> <struts> <package name="struts" extends="struts-default"> <interceptors> <interceptor name="property" class="interceptors.PropertyInterceptor" /> <interceptor-stack name="myStack"> <interceptor-ref name="defaultStack" /> <interc |
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
关于Struts 2杂谈(1):ValueStack对象的传送带机制 - 编程入门网的所有评论