`
ye5562402
  • 浏览: 7569 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
社区版块
存档分类
最新评论
文章列表

二次绑定

在SpringSide 3 中,使用的MVC框架是Struts 2。Struts 2 向对于Struts 1 来说,具有相当多的优点,有很多人都说,用过Struts 2之后,再也不想看Struts 1了。然而,任何东西都有它的复杂性,Struts 2也不例外,SpringSide 3做了很多工作来简化Struts 2 的使用。 先来说说Struts 2的特点: 1、编写Action变得简单了,Action变成了简单的POJO,再也不用和ActionForm、ActionForward打交道了,返回的时候直接返回字符串即可。如果要访问Servlet API,则直接使用ServletActionC ...
最近读starting struts2 online,里面有一节Move CRUD Operations into the same Action,提供了Move CRUD Operations into the same Action大概的sample,于是进行了补充,记录下来,以备使用。 一、思路 在这本书里,lan roughley提到在结合preparable和ModenDriven拦截器实现Move CRUD Operations into the same Action,采用通配符的方式为所有的crud只写一个action配置,当然,这也要求相关文件的命名和目录组织的时候要遵循一定 ...
可以根据Action属性的不同将它分为两类:Field-Driven(属性驱动) Action和Model-Driven(模型驱动) Action。 一、Field-Driven(属性驱动)Action,Action拥有自己的属性,这些属性一般是Java的基本类型。表单字段直接和Action的属性 对应。 二、实现了modelDriven接口可以在action中直接获得例如User对象,它会将Object getModel()取得的User放到ValueStack中。可以理解为将这个User的属性追加到Action中。它主要是作用是实现类似 Struts的FormBean功能。 在stru ...
create or replace and compile java source named base64 as package cn.com.pansky.util; /** * This is a base 64 conversion class based on RFC 2045 6.8. * Base64 Content-Tranfser-Encoding... * @version 1.0 */ public final class Base64 { ...

java 杂记

Java字符串操作小记 JAVA 把字符串间的若干空格保留一个 String str="你 好, Fuck You"; System.out.println(str.replaceAll("\\s+"," ")); javascript和java里的回车换行符的处理 request.getParameter("modelTail").replaceAl ...
package net.b2bcenter.framework.modules.objectpool; import java.security.NoSuchAlgorithmException; import java.util.Date; import java.util.Map; import net.b2bcenter.entity15.base.IdEntity; import net.b2bcenter.framework.modules.utils.EncodeUtils; import org.apache.log4j.BasicConfigurator; ...
EncodeUtils [Utils] Posted on 2010-01-04 by panqunjun // 来自springside3 import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.binary.Base64; import org.apache. ...
Global site tag (gtag.js) - Google Analytics