<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>四季如風 &#187; Struts</title>
	<atom:link href="http://www.hjide.com/category/struts/feed" rel="self" type="application/rss+xml" />
	<link>http://www.hjide.com</link>
	<description>每一天我們都在進步</description>
	<lastBuildDate>Wed, 08 Feb 2012 13:48:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>struts2新特性预览</title>
		<link>http://www.hjide.com/article/246.htm</link>
		<comments>http://www.hjide.com/article/246.htm#comments</comments>
		<pubDate>Tue, 28 Apr 2009 06:48:25 +0000</pubDate>
		<dc:creator>Jock</dc:creator>
				<category><![CDATA[Struts]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=246</guid>
		<description><![CDATA[Struts2与Struts1的对比 Action 类: • Struts1要求Action类继承一个抽象基类。Struts1的一个普遍问题是使用抽象类编程而不是接口。 • Struts 2 Action类可以实现一个Action接口，也可实现其他接口，使可选和定制的服务成为可能。Struts2提供一个ActionSupport基类去实现 常用的接口。Action接口不是必须的，任何有execute标识的POJO对象都可以用作Struts2的Action对象。 线程模式: • Struts1 Action是单例模式并且必须是线程安全的，因为仅有Action的一个实例来处理所有的请求。单例策略限制了Struts1 Action能作的事，并且要在开发时特别小心。Action资源必须是线程安全的或同步的。 • Struts2 Action对象为每一个请求产生一个实例，因此没有线程安全问题。（实际上，servlet容器给每个请求产生许多可丢弃的对象，并且不会导致性能和垃圾回收问题） Servlet 依赖: • Struts1 Action 依赖于Servlet API ,因为当一个Action被调用时HttpServletRequest 和 HttpServletResponse 被传递给execute方法。 • Struts 2 Action不依赖于容器，允许Action脱离容器单独被测试。如果需要，Struts2 Action仍然可以访问初始的request和response。但是，其他的元素减少或者消除了直接访问HttpServetRequest 和 HttpServletResponse的必要性。 可测性: • 测试Struts1 Action的一个主要问题是execute方法暴露了servlet API（这使得测试要依赖于容器）。一个第三方扩展－－Struts TestCase－－提供了一套Struts1的模拟对象（来进行测试）。 • Struts 2 Action可以通过初始化、设置属性、调用方法来测试，“依赖注入”支持也使测试更容易。 捕获输入: • Struts1 使用ActionForm对象捕获输入。所有的ActionForm必须继承一个基类。因为其他JavaBean不能用作ActionForm，开发者经常创建多余的类捕获输入。动态Bean（DynaBeans）可以作为创建传统ActionForm的选择，但是，开发者可能是在重新描述(创建)已经存在的JavaBean（仍然会导致有冗余的javabean）。 • Struts 2直接使用Action属性作为输入属性，消除了对第二个输入对象的需求。输入属性可能是有自己(子)属性的rich对象类型。Action属性能够通过web页面上的taglibs访问。Struts2也支持ActionForm模式。rich对象类型，包括业务对象，能够用作输入/输出对象。这种ModelDriven 特性简化了taglib对POJO输入对象的引用。 表达式语言： [...]]]></description>
		<wfw:commentRss>http://www.hjide.com/article/246.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Struts 中批量封装对象</title>
		<link>http://www.hjide.com/article/227.htm</link>
		<comments>http://www.hjide.com/article/227.htm#comments</comments>
		<pubDate>Sun, 03 Jun 2007 15:15:12 +0000</pubDate>
		<dc:creator>Jock</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[技巧]]></category>
		<category><![CDATA[示例]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=227</guid>
		<description><![CDATA[首先创建代表产品的类cn.org.jock.Product，代码如下：package cn.org.jock; import java.sql.Date; public class Product { private String name; private double price; private Date dateOfProduction; public Date getDateOfProduction() { return dateOfProduction; } public void setDateOfProduction(Date dateOfProduction) { this .dateOfProduction = dateOfProduction; } public String getName() { return name; } public void setName(String name) { this .name = name; } public double getPrice() { [...]]]></description>
		<wfw:commentRss>http://www.hjide.com/article/227.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>webwork hello world</title>
		<link>http://www.hjide.com/article/224.htm</link>
		<comments>http://www.hjide.com/article/224.htm#comments</comments>
		<pubDate>Wed, 11 Apr 2007 15:35:37 +0000</pubDate>
		<dc:creator>Jock</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[webwork]]></category>
		<category><![CDATA[源码]]></category>
		<category><![CDATA[示例]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=224</guid>
		<description><![CDATA[首先当然是引入webworkxxx.jar,xwork.jar,common logging&#8230;.web.xml加入如下配置 webwork com.opensymphony.webwork.dispatcher.FilterDispatcher webwork /* 编写HelloWorld.javapackage cn.org.jock.study; import com.opensymphony.xwork.ActionSupport; public class HelloWorld extends ActionSupport { /** * */ private static final long serialVersionUID = 1L; private String message; @Override public String execute(){ this.message = “Hello world! “; return SUCCESS; } /** * @return the message */ public String getMessage() { return this.message; } /** [...]]]></description>
		<wfw:commentRss>http://www.hjide.com/article/224.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>看了一下struts2提供的例子struts2-showcase-2.0.6</title>
		<link>http://www.hjide.com/article/223.htm</link>
		<comments>http://www.hjide.com/article/223.htm#comments</comments>
		<pubDate>Mon, 02 Apr 2007 16:06:57 +0000</pubDate>
		<dc:creator>Jock</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=223</guid>
		<description><![CDATA[东西是好啊，可是比spring还那个，一下子丢过来的新东西可以把我淹死。。。]]></description>
		<wfw:commentRss>http://www.hjide.com/article/223.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>File Upload Interceptor</title>
		<link>http://www.hjide.com/article/222.htm</link>
		<comments>http://www.hjide.com/article/222.htm#comments</comments>
		<pubDate>Mon, 02 Apr 2007 15:18:03 +0000</pubDate>
		<dc:creator>Jock</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=222</guid>
		<description><![CDATA[Interceptor that is based off of MultiPartRequestWrapper, which is automatically applied for any request that includes a file. It adds the following parameters, where [File Name] is the name given to the file uploaded by the HTML form:[File Name] : File &#8211; the actual File[File Name]ContentType : String &#8211; the content type of the file[File [...]]]></description>
		<wfw:commentRss>http://www.hjide.com/article/222.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interceptor Order</title>
		<link>http://www.hjide.com/article/220.htm</link>
		<comments>http://www.hjide.com/article/220.htm#comments</comments>
		<pubDate>Mon, 02 Apr 2007 15:16:09 +0000</pubDate>
		<dc:creator>Jock</dc:creator>
				<category><![CDATA[Struts]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=220</guid>
		<description><![CDATA[Interceptors provide an excellent means to wrap before/after processing. The concept reduces code duplication (think AOP).Order of interceptors&#8230; Note that some interceptors will interrupt the stack/chain/flow&#8230; so the order is very important.Iterceptors implementing com.opensymphony.xwork.interceptor.PreResultListener will run after the Action executes its action method but before the Result executesthisWillRunFirstInterceptor thisWillRunNextInterceptor followedByThisInterceptor thisWillRunLastInterceptor MyAction1 MyAction2 (chain) MyPreResultListener [...]]]></description>
		<wfw:commentRss>http://www.hjide.com/article/220.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building your own Interceptor</title>
		<link>http://www.hjide.com/article/218.htm</link>
		<comments>http://www.hjide.com/article/218.htm#comments</comments>
		<pubDate>Mon, 02 Apr 2007 14:56:59 +0000</pubDate>
		<dc:creator>Jock</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[struts2]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=218</guid>
		<description><![CDATA[If none of the above interceptors suit your particular need, you will have to implement your own interceptor. Fortunately, this is an easy task to accomplish. Suppose we need an interceptor that places a greeting in the Session according to the time of the day (morning, afternoon or evening). Here&#039;s how we could implement it:GreetingInterceptor.java:package [...]]]></description>
		<wfw:commentRss>http://www.hjide.com/article/218.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>struts2.0.6+spring2.0.3+hibernane3</title>
		<link>http://www.hjide.com/article/217.htm</link>
		<comments>http://www.hjide.com/article/217.htm#comments</comments>
		<pubDate>Thu, 29 Mar 2007 16:37:36 +0000</pubDate>
		<dc:creator>Jock</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[Hibernate]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[配置]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=217</guid>
		<description><![CDATA[一、struts2。跟webwork配置基本一致，主要是struts2.properties和struts.xml 2个配置文件，我的struts2.properties如下配置：struts2.propertiesstruts.tag.altSyntax = true struts.devMode = true ### These can be used to set the default HTTP and HTTPS ports struts.url.http.port = 80 #webwork.url.https.port = 443 ### This can be used to set your locale and encoding scheme struts.custom.i18n.resources=ApplicationResources struts.locale=zh_CN struts.i18n.encoding=utf-8 # uses javax.servlet.context.tempdir by default struts.multipart.parser=com.opensymphony.webwork.dispatcher.multipart.PellMultiPartRequest #struts.multipart.saveDir=tmp struts.multipart.saveDir=/tmp struts.multipart.maxSize=512000000 struts.configuration.xml.reload=true struts.objectFactory = spring struts.xml [...]]]></description>
		<wfw:commentRss>http://www.hjide.com/article/217.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>用Struts上传多个文件</title>
		<link>http://www.hjide.com/article/201.htm</link>
		<comments>http://www.hjide.com/article/201.htm#comments</comments>
		<pubDate>Sat, 03 Feb 2007 10:34:24 +0000</pubDate>
		<dc:creator>堕落天使</dc:creator>
				<category><![CDATA[Struts]]></category>
		<category><![CDATA[上传文件]]></category>
		<category><![CDATA[源码]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=201</guid>
		<description><![CDATA[这是从网上摘抄的，貌似就是上传单个文件的复制版。里面有些没用的代码，我也懒得去删除了。一。建立ActionForm[codes=java]package com.cnehu.struts.form;import javax.servlet.http.HttpServletRequest;import org.apache.struts.action.ActionError;import org.apache.struts.action.ActionErrors;import org.apache.struts.action.ActionForm;import org.apache.struts.action.ActionMapping;import org.apache.struts.upload.FormFile;import org.apache.struts.upload.MultipartRequestHandler;public class UpLoadForm extends ActionForm{ &#160; &#160;public static final String ERROR_PROPERTY_MAX_LENGTH_EXCEEDED = &#34;org.apache.struts.webapp.upload.MaxLengthExceeded&#34;; &#160; &#160;protected FormFile theFile; &#160; &#160;protected FormFile theFile2; &#160; &#160;public FormFile getTheFile() &#160; &#160;{ &#160; &#160; &#160; &#160;return theFile; &#160; &#160;} &#160; &#160;public void setTheFile(FormFile theFile) &#160; &#160;{ &#160; &#160; &#160; &#160;this.theFile = theFile; [...]]]></description>
		<wfw:commentRss>http://www.hjide.com/article/201.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Struts的文件上传</title>
		<link>http://www.hjide.com/article/199.htm</link>
		<comments>http://www.hjide.com/article/199.htm#comments</comments>
		<pubDate>Sat, 03 Feb 2007 10:22:51 +0000</pubDate>
		<dc:creator>堕落天使</dc:creator>
				<category><![CDATA[Struts]]></category>

		<guid isPermaLink="false">http://blog.tgb.net.cn/?p=199</guid>
		<description><![CDATA[本文用的是Struts1.1的org.apache.struts.upload.FormFile类。很方便，不用自己写。也不用写一个jsp调用jspsmartupload就可以搞定。FormFile的几个方法：String getContentType();byte[] getFileData();String getFileName();int getFileSize();如果有必要可以在validate里调用一下做一些判断。选择上传文件页面：selfile.jsp&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#60;%@ taglib uri=&#34;/WEB-INF/struts-html.tld&#34; prefix=&#34;html&#34;%&#62;&#60;html:html&#62;&#60;html:form action=&#34;/uploadsAction.do&#34; enctype=&#34;multipart/form-data&#34;&#62;&#60;html:file property=&#34;theFile&#34;/&#62;&#60;html:submit/&#62;&#60;/html:form&#62;&#60;/html:html&#62;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;UpLoadAction.java&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;[codes=java]import java.io.*;import javax.servlet.http.*;import org.apache.struts.action.*;import org.apache.struts.upload.FormFile;public class UpLoadAction extends Action { &#160;public ActionForward execute(ActionMapping mapping, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ActionForm form, &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
		<wfw:commentRss>http://www.hjide.com/article/199.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

