显示下一条  |  关闭

gznofeng的博客

software

 
 
 
 

日历

 
 
模块内容加载中...
 
 
 
 
 

自定义模块

 
 
模块内容加载中...
 
 
 
 
 
 我要留言
 
 
 
留言列表加载中...
 
 
 
 
 
 
 
 

http://www.52en.com/ks/tk/cet4.html

2008-6-3 22:13:12 阅读11 评论0 32008/06 June3

作者  | 2008-6-3 22:13:12 | 阅读(11) |评论(0) | 阅读全文>>

[转]Spring Annotation

2008-5-15 17:08:37 阅读13 评论0 152008/05 May15

http://www-128.ibm.com/developerworks/cn/java/j-lo-spring25-ioc/

使用 @Component

虽然我们可以通过

@Autowired

@Resource

在 Bean 类中使用自动注入功能,但是 Bean 还是在 XML 文件中通过 <bean> 进行定义 —— 也就是说,在 XML 配置文件中定义 Bean,通过

@Autowired

@Resource

作者  | 2008-5-15 17:08:37 | 阅读(13) |评论(0) | 阅读全文>>

How to use UrlReWriteFilter

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-14 10:56:08 | 阅读(14) |评论(0) | 阅读全文>>

Reflection-Java中的反射机制

2008-5-12 12:10:14 阅读6 评论0 122008/05 May12

Reflection-Java中的反射机制

Author:ginger547

Java looking at Java

   Java的一个很不寻常的能力,它允许一个程序检查自己

   你可以确定一个对象所属的类型

   你可以查看一个类的全部内容,它们的访问修饰符、父类、字段、构造函数、方法

   你可以查看一个接口的内容

   即使在编写代码的时候你不知道事物的名字你也可以做到:

   创建一个类的实例

   取得和设置一个实例的变量

作者  | 2008-5-12 12:10:14 | 阅读(6) |评论(0) | 阅读全文>>

About Interceptor implements PreResultListener

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 18:07:16 | 阅读(27) |评论(0) | 阅读全文>>

Manager Struts Exception

2008-5-9 14:51:54 阅读1 评论0 92008/05 May9

     <global-results>
            <result name="unknownError" type="redirect">/exception.jsp</result>
     </global-results>
     
      <global-exception-mappings>
             <exception-mapping exception="java.lang.Exception" result="unknownError"/>
        </global-exception-mappings>

作者  | 2008-5-9 14:51:54 | 阅读(1) |评论(0) | 阅读全文>>

Struts2 Default Action for Page not found

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-9 13:38:34 | 阅读(35) |评论(0) | 阅读全文>>

action!method失败的解决方法

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 17:32:14 | 阅读(5) |评论(0) | 阅读全文>>

Validations using Struts 2 Annotations

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-8 16:10:28 | 阅读(5) |评论(0) | 阅读全文>>

转Struts2 Cook book

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">

作者  | 2008-5-7 15:31:52 | 阅读(12) |评论(0) | 阅读全文>>

查看所有日志>>

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2012

   
创建博客 登录  
 关注