· http://www.52en.com/ks/tk/cet4.html
· About Interceptor implements PreResultListener
· Struts2 Default Action for Page not found
2008-6-3 22:13:12 阅读11 评论0 32008/06 June3
2008-5-15 17:08:37 阅读13 评论0 152008/05 May15
http://www-128.ibm.com/developerworks/cn/java/j-lo-spring25-ioc/
虽然我们可以通过
@Autowired
或
@Resource
在 Bean 类中使用自动注入功能,但是 Bean 还是在 XML 文件中通过 <bean> 进行定义 —— 也就是说,在 XML 配置文件中定义 Bean,通过
@Autowired
或
@Resource
2008-5-14 10:56:08 阅读14 评论0 142008/05 May14
为什么为使用url重写?
url重写的最大用处在于:
可以隐藏真实地址
可以通配出让用户得容易识别的地址
例:
http://localhost:8080/index 通用UrlReWriteFilter可以从相关的配置文件中转向不同的地址。更可以转去action或servlet
如果使用UrlReWriteFilter
首先从http://tuckey.org/urlrewrite/下载一个UrlReWriteFilter包
2008-5-12 12:10:14 阅读6 评论0 122008/05 May12
Reflection-Java中的反射机制
Author:ginger547
Java looking at Java
Java的一个很不寻常的能力,它允许一个程序检查自己
你可以确定一个对象所属的类型
你可以查看一个类的全部内容,它们的访问修饰符、父类、字段、构造函数、方法
你可以查看一个接口的内容
即使在编写代码的时候你不知道事物的名字你也可以做到:
创建一个类的实例
取得和设置一个实例的变量
2008-5-9 18:07:16 阅读27 评论0 92008/05 May9
public class TestInterceptor extends AbstractInterceptor implements PreResultListener {
@Override
public String intercept(ActionInvocation invocation) throws Exception {
System.out.println("in the test interceptor");
invocation.addPreResultListener(new TestInterceptor());
return invocation.invoke();
}
2008-5-9 14:51:54 阅读1 评论0 92008/05 May9
2008-5-9 13:38:34 阅读35 评论0 92008/05 May9
Action Default
Usually, if an action is requested, and the framework can't map the request to an action name, the result will be the usual "404 - Page not found" error. But, if you would prefer that an omnibus action handle any unmatched requests, you can specify a default action. If no other action matches, the default action is used instead.
2008-5-8 17:32:14 阅读5 评论0 82008/05 May8
If the Actions utilize the "action!alias" sytax, add the line struts.compatabilityMode.webwork=true to the struts.properties file
would like to use the "!" character with Wildcard Method actions, then set struts.enable.DynamicMethodInvocation to FALSE in the application configuration
2008-5-8 16:10:28 阅读5 评论0 82008/05 May8
Validating Struts 2 Login Application using Annotations
In this section we are going to validate our login application using Annotations in Action class. Our current login application does not validate the user against the database. Instead login name and passwords are validated against the hardcode values (User: Admin
2008-5-7 15:31:52 阅读12 评论0 72008/05 May7
Redirect Action Result
Parameters
actionName (default) - the name of the action that will be redirect to
namespace - used to determine which namespace the action is in that we're redirecting to . If namespace is null, this defaults to the current namespace
Examples
<package name="public" extends="struts-default">