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

<channel>
	<title>Tapestry5中文博客</title>
	<atom:link href="http://www.tapestry5.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tapestry5.com</link>
	<description>Tapsetry5中文教程、学习笔记、开发指南</description>
	<pubDate>Mon, 30 Jun 2008 09:43:40 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<item>
		<title>每日文摘(20080630)</title>
		<link>http://www.tapestry5.com/archives/15</link>
		<comments>http://www.tapestry5.com/archives/15#comments</comments>
		<pubDate>Mon, 30 Jun 2008 09:43:40 +0000</pubDate>
		<dc:creator>tapestry5</dc:creator>
		
		<category><![CDATA[未分类]]></category>

		<guid isPermaLink="false">http://www.tapestry5.com/archives/15</guid>
		<description><![CDATA[1、很好的c语言教程，带图示，链接.
2、netbeans最新的wiki文章，链接.
3、新版wxWidgets 2.8.8释出，链接.
4、使用css不使用table的form，链接。
]]></description>
			<content:encoded><![CDATA[<p>1、很好的c语言教程，带图示，<a href="http://computer.howstuffworks.com/c.htm">链接</a>.</p>
<p>2、netbeans最新的wiki文章，<a href="http://blogs.sun.com/branajam/entry/nb_community_docs_varun_nischal">链接</a>.</p>
<p>3、新版wxWidgets 2.8.8释出，<a href="http://wxwidgets.info/wxwidgets_2_8_8_announce">链接</a>.</p>
<p>4、使用css不使用table的form，<a href="http://frinity.blogspot.com/2008/06/css-form-design-without-tables.html">链接</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tapestry5.com/archives/15/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tapestry5-每日播报(20080627)</title>
		<link>http://www.tapestry5.com/archives/14</link>
		<comments>http://www.tapestry5.com/archives/14#comments</comments>
		<pubDate>Fri, 27 Jun 2008 08:45:53 +0000</pubDate>
		<dc:creator>tapestry5</dc:creator>
		
		<category><![CDATA[邮件列表]]></category>

		<category><![CDATA[tapestry5]]></category>

		<guid isPermaLink="false">http://www.tapestry5.com/?p=14</guid>
		<description><![CDATA[1、Tapestry5.0.13发布，此版本可以与Tapestry4同时存在于一个webapp中。
2、新的使用Tapestry5构建的站点上线www.ingamenow.com，网站基于Tapestry5+Spring + Hibernate，链接.
3、内置的组件可以被继承，去掉了final，链接。
4、超类使用IncludeStylesheet注释时，子类找不到 stylesheet,链接。
]]></description>
			<content:encoded><![CDATA[<p>1、<a href="http://tapestry.apache.org/tapestry5/release-notes.html">Tapestry5.0.13发布</a>，此版本可以与Tapestry4同时存在于一个webapp中。</p>
<p>2、新的使用Tapestry5构建的站点上线<a href="http://www.ingamenow.com">www.ingamenow.com</a>，网站基于Tapestry5+Spring + Hibernate，<a href="http://www.nabble.com/New-website-using-T5%3A-www.ingamenow.com-to18117968s302.html">链接</a>.</p>
<p>3、内置的组件可以被继承，去掉了final，<a href="http://www.nabble.com/-jira--Created%3A-%28TAPESTRY-2484%29-Some-built-in-Tapestry-components-are-final-and-should-be-extensible-to18145274s302.html">链接</a>。</p>
<p>4、<a name="a18138079">超类使用IncludeStylesheet注释时，子类找不到 stylesheet</a>,<a href="http://www.nabble.com/-jira--Created%3A-(TAPESTRY-2481)-Superclass-that-includes-a-stylesheet-via-IncludeStylesheet-annotation-breaks-any-subclass-not-in-the-same-package-as-the-stylesheet.-td18119743s302.html#a18119743">链接</a>。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tapestry5.com/archives/14/feed</wfw:commentRss>
		</item>
		<item>
		<title>在netbeans中建立完整的Tapestry5开发环境</title>
		<link>http://www.tapestry5.com/archives/8</link>
		<comments>http://www.tapestry5.com/archives/8#comments</comments>
		<pubDate>Thu, 15 May 2008 16:02:14 +0000</pubDate>
		<dc:creator>tapestry5</dc:creator>
		
		<category><![CDATA[开发工具]]></category>

		<category><![CDATA[tapestry5 netbeans maven quickstart tml]]></category>

		<guid isPermaLink="false">http://www.tapestry5.com/?p=8</guid>
		<description><![CDATA[今天看到篇文章介绍了如何在netbeans中使用maven调用tapestry5-quickstart模块来开发tapestry5，这里再总结下，并介绍些技巧。
首先当然是要安装好netbeans了，我一般下载zip版的javase packs，版本为6.1，插件都是自己按照需要来安装，我们要用到maven，就要先下载maven的netbeans插件，如图搜索maven，选择maven插件，单击install，接受协议，就可以下载安装了。

安装maven插件

我们要开发的是web程序，需要netbeans支持web程序的开发，这就需要安装web applications插件了，如图搜索web applications，选择web applications插件，单击install，接受协议，就可以下载安装了。
安装web applications插件

两个插件安装好了后，就可以新建tapestry5-quickstart项目了，单击菜单File-&#62;New Project，如图选择Maven-&#62;Maven Project。(中文系统默认maven插件为中文环境，开发时不喜欢中文环境，在netbeans.conf配置文件中添加了&#8211;locale en改成英文环境了，这里以英文环境为准。)

选择Maven Project后，单击下一步，展开Archetypes from remote Maven repositories,如图所示，选择Tapestry5 quickstart archetype。

选择Tapestry5 quickstart archetype后，单击下一步，如图填一些定制的参数后，单击完成。

maven插件会下载依赖库并根据定制的参数新建项目，项目建好后，如图所示文件结构。

运行项目需要web server，这里我选择了maven中的jetty插件，想让项目运行时运行jetty，这就需要修改运行项目时执行的maven命令，选择项目后，右键选择properties，选择Actions,在actions列表中选择run project，如图所示，修改Excute Goals为jetty:run。

这样我们运行项目就可以直接将项目部署到jetty并启动jetty了，单击工具栏上的Run Main Project(快捷键F6)，第一次运行maven会下载需要的插件，下载完会启动jetty，这时访问http://localhost:8080，可以看到如图所示页面。

单击我们部署的项目mavenproject1，可以看到项目成功运行,如图所示。

这时编辑页面模板并保存，刷新页面会立即看到结果，我们知道Tapestry5支持类的自动重加载的，在修改页面类文件后保存，刷新页面并没有看到修改后的结果，其实这里需要编译类文件，同样我可以通过定制Build Project的maven命令来编译项目，如图所示，修改build project中Excute Goals为compiler:compile。

这样我们编辑完类文件保存后，就可以通过单击工具栏上的Build Main Project(快捷键F11)来编译项目了，这时刷新页面就可以看到修改后的结果。

到这里已经可以开发Tapestry5项目了，可是打开tml文件，什么语法加亮都没有，这就要修改netbeans配置，来让netbeans支持tml文件，选择菜单Tools-&#62;Options，在打开的窗口左下角单击Advance Options按钮，打开IDE Configuration-&#62;System-&#62;Object Types,选择HTML Objects,在选项Extension and MIME Types中，单击右边按钮，打开配置对话框，在Item输入框中输入tml，单击Add，加入到下边的列表后，单击ok保存设置，如图所示。

这时就可以看到Index.tml已经被系统识别为HTML Objects了，打开文件可以像编辑html一样编辑tml文件了，netbeans支持html的语法加亮和基本的元素选择，如图所示。

这样就可以在netbeans中建立起完整的Tapetry5开发环境了， netbean中的插件现在已经很好很全了，对javascript和css也支持的很好，虽然比不上DW，但已经很不错了，希望netbeans越来越好。
转载请注明出处Tapestry5.com
]]></description>
			<content:encoded><![CDATA[<p>今天看到篇<a href="http://www.troymaxventures.com/2008/05/tapestry5-netbeans-quickstart.html">文章</a>介绍了如何在netbeans中使用maven调用tapestry5-quickstart模块来开发tapestry5，这里再总结下，并介绍些技巧。</p>
<p>首先当然是要安装好netbeans了，我一般下载<a href="http://dlc.sun.com.edgesuite.net/netbeans/6.1/final/zip/">zip版</a>的javase packs，版本为6.1，插件都是自己按照需要来安装，我们要用到maven，就要先下载maven的netbeans插件，如图搜索maven，选择maven插件，单击install，接受协议，就可以下载安装了。<br />
<span id="more-8"></span><br />
安装maven插件</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/maven.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/maven_thumb.png" border="0" alt="maven" width="520" height="417" /></a></p>
<p>我们要开发的是web程序，需要netbeans支持web程序的开发，这就需要安装web applications插件了，如图搜索web applications，选择web applications插件，单击install，接受协议，就可以下载安装了。</p>
<p>安装web applications插件</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/webapplications.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/webapplications_thumb.png" border="0" alt="webapplications" width="520" height="417" /></a></p>
<p>两个插件安装好了后，就可以新建tapestry5-quickstart项目了，单击菜单File-&gt;New Project，如图选择Maven-&gt;Maven Project。(中文系统默认maven插件为中文环境，开发时不喜欢中文环境，在netbeans.conf配置文件中添加了&#8211;locale en改成英文环境了，这里以英文环境为准。)</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/newproject.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/newproject_thumb.png" border="0" alt="newproject" width="520" height="438" /></a></p>
<p>选择Maven Project后，单击下一步，展开Archetypes from remote Maven repositories,如图所示，选择Tapestry5 quickstart archetype。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/quickstart.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/quickstart_thumb.png" border="0" alt="quickstart" width="520" height="480" /></a></p>
<p>选择Tapestry5 quickstart archetype后，单击下一步，如图填一些定制的参数后，单击完成。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/parameters.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/parameters_thumb.png" border="0" alt="parameters" width="520" height="362" /></a></p>
<p>maven插件会下载依赖库并根据定制的参数新建项目，项目建好后，如图所示文件结构。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/file.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/file_thumb.png" border="0" alt="file" width="520" height="376" /></a></p>
<p>运行项目需要web server，这里我选择了maven中的jetty插件，想让项目运行时运行jetty，这就需要修改运行项目时执行的maven命令，选择项目后，右键选择properties，选择Actions,在actions列表中选择run project，如图所示，修改Excute Goals为jetty:run。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/jettyrun.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/jettyrun_thumb.png" border="0" alt="jettyrun" width="520" height="421" /></a></p>
<p>这样我们运行项目就可以直接将项目部署到jetty并启动jetty了，单击工具栏上的Run Main Project(快捷键F6)，第一次运行maven会下载需要的插件，下载完会启动jetty，这时访问<a href="http://localhost:8080">http://localhost:8080</a>，可以看到如图所示页面。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/run.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/run_thumb.png" border="0" alt="run" width="520" height="444" /></a></p>
<p>单击我们部署的项目mavenproject1，可以看到项目成功运行,如图所示。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/mavenproject1.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/mavenproject1_thumb.png" border="0" alt="mavenproject1" width="520" height="444" /></a></p>
<p>这时编辑页面模板并保存，刷新页面会立即看到结果，我们知道Tapestry5支持类的自动重加载的，在修改页面类文件后保存，刷新页面并没有看到修改后的结果，其实这里需要编译类文件，同样我可以通过定制Build Project的maven命令来编译项目，如图所示，修改build project中Excute Goals为compiler:compile。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/build.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/build_thumb.png" border="0" alt="build" width="520" height="453" /></a></p>
<p>这样我们编辑完类文件保存后，就可以通过单击工具栏上的Build Main Project(快捷键F11)来编译项目了，这时刷新页面就可以看到修改后的结果。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/toolbar.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/toolbar_thumb.png" border="0" alt="toolbar" width="520" height="387" /></a></p>
<p>到这里已经可以开发Tapestry5项目了，可是打开tml文件，什么语法加亮都没有，这就要修改netbeans配置，来让netbeans支持tml文件，选择菜单Tools-&gt;Options，在打开的窗口左下角单击Advance Options按钮，打开IDE Configuration-&gt;System-&gt;Object Types,选择HTML Objects,在选项Extension and MIME Types中，单击右边按钮，打开配置对话框，在Item输入框中输入tml，单击Add，加入到下边的列表后，单击ok保存设置，如图所示。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/tml.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/tml_thumb.png" border="0" alt="tml" width="520" height="414" /></a></p>
<p>这时就可以看到Index.tml已经被系统识别为HTML Objects了，打开文件可以像编辑html一样编辑tml文件了，netbeans支持html的语法加亮和基本的元素选择，如图所示。</p>
<p><a href="http://www.tapestry5.com/images/netbeansTapestry5_13712/html.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" src="http://www.tapestry5.com/images/netbeansTapestry5_13712/html_thumb.png" border="0" alt="html" width="520" height="387" /></a></p>
<p>这样就可以在netbeans中建立起完整的Tapetry5开发环境了， netbean中的插件现在已经很好很全了，对javascript和css也支持的很好，虽然比不上DW，但已经很不错了，希望netbeans越来越好。</p>
<p>转载请注明出处Tapestry5.com</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tapestry5.com/archives/8/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tapestry5-如何在根目录下加载组件模板</title>
		<link>http://www.tapestry5.com/archives/7</link>
		<comments>http://www.tapestry5.com/archives/7#comments</comments>
		<pubDate>Wed, 14 May 2008 14:37:16 +0000</pubDate>
		<dc:creator>tapestry5</dc:creator>
		
		<category><![CDATA[源码研究]]></category>

		<category><![CDATA[tapestry5 根目录 组件模板]]></category>

		<guid isPermaLink="false">http://www.tapestry5.com/?p=7</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160; T5默认的组件模板是从WEB-INF目录加载的，实际开发中，希望组件模板可以放在根目录，例如组件类目录package.components.layout.DefaultLayout,对应的模板为layout/DefaultLayout.tml。
&#160;&#160;&#160;&#160;&#160; T5的模板加载是通过PageTemplateLocator加载的，我们可以通过覆盖这个Service的实现来达到我们的目的，首先是实现类：

import static java.lang.String.format;&#160;import java.util.Locale;&#160;import org.apache.tapestry.internal.InternalConstants;import org.apache.tapestry.internal.services.PageTemplateLocator;import org.apache.tapestry.ioc.Resource;import org.apache.tapestry.model.ComponentModel;&#160;public class ContextRootTemplateLocator implements PageTemplateLocator {&#160;&#160;&#160; &#160;private final Resource contextRoot;&#160;&#160;&#160; &#160;private final String compomentPackage;&#160;&#160;&#160; &#160;private final String pagePackage;&#160;&#160;&#160; &#160;public ContextRootTemplateLocator(Resource contextRoot,&#160;&#160; &#160; &#160; &#160; &#160; &#160;String appRootPackage) {&#160;&#160; &#160; &#160; &#160;this.contextRoot = contextRoot;&#160;&#160; &#160; &#160; &#160;this.compomentPackage = appRootPackage + &#34;.&#34;&#160;&#160; &#160; &#160; &#160; &#160; &#160; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;&#160;&#160;&#160; T5默认的组件模板是从WEB-INF目录加载的，实际开发中，希望组件模板可以放在根目录，例如组件类目录package.components.layout.DefaultLayout,对应的模板为layout/DefaultLayout.tml。</p>
<p>&#160;&#160;&#160;&#160;&#160; T5的模板加载是通过PageTemplateLocator加载的，我们可以通过覆盖这个Service的实现来达到我们的目的，首先是实现类：</p>
<p><span id="more-7"></span></p>
<div class="hl-surround"><div class="hl-main"><span style="color: Green;">import</span><span style="color: Gray;"> </span><span class="hl-types">static</span><span style="color: Gray;"> </span><span style="color: Blue;">java</span><span style="color: Gray;">.</span><span style="color: Blue;">lang</span><span style="color: Gray;">.</span><span style="color: Blue;">String</span><span style="color: Gray;">.</span><span style="color: Blue;">format</span><span style="color: Gray;">;<br />&nbsp;<br /></span><span style="color: Green;">import</span><span style="color: Gray;"> </span><span style="color: Blue;">java</span><span style="color: Gray;">.</span><span style="color: Blue;">util</span><span style="color: Gray;">.</span><span style="color: Blue;">Locale</span><span style="color: Gray;">;<br />&nbsp;<br /></span><span style="color: Green;">import</span><span style="color: Gray;"> </span><span style="color: Blue;">org</span><span style="color: Gray;">.</span><span style="color: Blue;">apache</span><span style="color: Gray;">.</span><span style="color: Blue;">tapestry</span><span style="color: Gray;">.</span><span style="color: Blue;">internal</span><span style="color: Gray;">.</span><span style="color: Blue;">InternalConstants</span><span style="color: Gray;">;<br /></span><span style="color: Green;">import</span><span style="color: Gray;"> </span><span style="color: Blue;">org</span><span style="color: Gray;">.</span><span style="color: Blue;">apache</span><span style="color: Gray;">.</span><span style="color: Blue;">tapestry</span><span style="color: Gray;">.</span><span style="color: Blue;">internal</span><span style="color: Gray;">.</span><span style="color: Blue;">services</span><span style="color: Gray;">.</span><span style="color: Blue;">PageTemplateLocator</span><span style="color: Gray;">;<br /></span><span style="color: Green;">import</span><span style="color: Gray;"> </span><span style="color: Blue;">org</span><span style="color: Gray;">.</span><span style="color: Blue;">apache</span><span style="color: Gray;">.</span><span style="color: Blue;">tapestry</span><span style="color: Gray;">.</span><span style="color: Blue;">ioc</span><span style="color: Gray;">.</span><span style="color: Blue;">Resource</span><span style="color: Gray;">;<br /></span><span style="color: Green;">import</span><span style="color: Gray;"> </span><span style="color: Blue;">org</span><span style="color: Gray;">.</span><span style="color: Blue;">apache</span><span style="color: Gray;">.</span><span style="color: Blue;">tapestry</span><span style="color: Gray;">.</span><span style="color: Blue;">model</span><span style="color: Gray;">.</span><span style="color: Blue;">ComponentModel</span><span style="color: Gray;">;<br />&nbsp;<br /></span><span style="color: Green;">public</span><span style="color: Gray;"> </span><span style="color: Green;">class</span><span style="color: Gray;"> </span><span style="color: Blue;">ContextRootTemplateLocator</span><span style="color: Gray;"> </span><span style="color: Green;">implements</span><span style="color: Gray;"> </span><span style="color: Blue;">PageTemplateLocator</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">private</span><span style="color: Gray;"> </span><span class="hl-types">final</span><span style="color: Gray;"> </span><span style="color: Blue;">Resource</span><span style="color: Gray;"> </span><span style="color: Blue;">contextRoot</span><span style="color: Gray;">;<br />&nbsp;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">private</span><span style="color: Gray;"> </span><span class="hl-types">final</span><span style="color: Gray;"> </span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">compomentPackage</span><span style="color: Gray;">;<br />&nbsp;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">private</span><span style="color: Gray;"> </span><span class="hl-types">final</span><span style="color: Gray;"> </span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">pagePackage</span><span style="color: Gray;">;<br />&nbsp;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">public</span><span style="color: Gray;"> </span><span style="color: Blue;">ContextRootTemplateLocator</span><span style="color: Olive;">(</span><span style="color: Blue;">Resource</span><span style="color: Gray;"> </span><span style="color: Blue;">contextRoot</span><span style="color: Gray;">,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">appRootPackage</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">contextRoot</span><span style="color: Gray;"> = </span><span style="color: Blue;">contextRoot</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">compomentPackage</span><span style="color: Gray;"> = </span><span style="color: Blue;">appRootPackage</span><span style="color: Gray;"> + </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">.</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ </span><span style="color: Blue;">InternalConstants</span><span style="color: Gray;">.</span><span style="color: Blue;">COMPONENTS_SUBPACKAGE</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">this</span><span style="color: Gray;">.</span><span style="color: Blue;">pagePackage</span><span style="color: Gray;"> = </span><span style="color: Blue;">appRootPackage</span><span style="color: Gray;"> + </span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">.</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+ </span><span style="color: Blue;">InternalConstants</span><span style="color: Gray;">.</span><span style="color: Blue;">PAGES_SUBPACKAGE</span><span style="color: Gray;">;<br />&nbsp;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">public</span><span style="color: Gray;"> </span><span style="color: Blue;">Resource</span><span style="color: Gray;"> </span><span style="color: Blue;">findPageTemplateResource</span><span style="color: Olive;">(</span><span style="color: Blue;">ComponentModel</span><span style="color: Gray;"> </span><span style="color: Blue;">model</span><span style="color: Gray;">, </span><span style="color: Blue;">Locale</span><span style="color: Gray;"> </span><span style="color: Blue;">locale</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">className</span><span style="color: Gray;"> = </span><span style="color: Blue;">model</span><span style="color: Gray;">.</span><span style="color: Blue;">getComponentClassName</span><span style="color: Olive;">()</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: Blue;">className</span><span style="color: Gray;">.</span><span style="color: Blue;">contains</span><span style="color: Olive;">(</span><span style="color: Blue;">pagePackage</span><span style="color: Olive;">))</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">return</span><span style="color: Gray;"> </span><span style="color: Blue;">findPageTemplateResourceDelegate</span><span style="color: Olive;">(</span><span style="color: Blue;">className</span><span style="color: Gray;">, </span><span style="color: Blue;">locale</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">if</span><span style="color: Gray;"> </span><span style="color: Olive;">(</span><span style="color: Blue;">className</span><span style="color: Gray;">.</span><span style="color: Blue;">contains</span><span style="color: Olive;">(</span><span style="color: Blue;">compomentPackage</span><span style="color: Olive;">))</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">return</span><span style="color: Gray;"> </span><span style="color: Blue;">findComponentTemplateResourceDelegate</span><span style="color: Olive;">(</span><span style="color: Blue;">className</span><span style="color: Gray;">, </span><span style="color: Blue;">locale</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">return</span><span style="color: Gray;"> </span><span style="color: Green;">null</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">private</span><span style="color: Gray;"> </span><span style="color: Blue;">Resource</span><span style="color: Gray;"> </span><span style="color: Blue;">findPageTemplateResourceDelegate</span><span style="color: Olive;">(</span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">className</span><span style="color: Gray;">,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">Locale</span><span style="color: Gray;"> </span><span style="color: Blue;">locale</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">logicalName</span><span style="color: Gray;"> = </span><span style="color: Blue;">className</span><span style="color: Gray;">.</span><span style="color: Blue;">substring</span><span style="color: Olive;">(</span><span style="color: Blue;">pagePackage</span><span style="color: Gray;">.</span><span style="color: Blue;">length</span><span style="color: Olive;">()</span><span style="color: Gray;"> + </span><span style="color: Maroon;">1</span><span style="color: Olive;">)</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.</span><span style="color: Blue;">replace</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">.</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">/</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">return</span><span style="color: Gray;"> </span><span style="color: Blue;">locateFile</span><span style="color: Olive;">(</span><span style="color: Blue;">logicalName</span><span style="color: Gray;">, </span><span style="color: Blue;">locale</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">private</span><span style="color: Gray;"> </span><span style="color: Blue;">Resource</span><span style="color: Gray;"> </span><span style="color: Blue;">findComponentTemplateResourceDelegate</span><span style="color: Olive;">(</span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">className</span><span style="color: Gray;">,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">Locale</span><span style="color: Gray;"> </span><span style="color: Blue;">locale</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">logicalName</span><span style="color: Gray;"> = </span><span style="color: Blue;">className</span><span style="color: Gray;">.</span><span style="color: Blue;">substring</span><span style="color: Olive;">(</span><span style="color: Blue;">compomentPackage</span><span style="color: Gray;">.</span><span style="color: Blue;">length</span><span style="color: Olive;">()</span><span style="color: Gray;"> + </span><span style="color: Maroon;">1</span><span style="color: Olive;">)</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.</span><span style="color: Blue;">replace</span><span style="color: Olive;">(</span><span style="color: #8b0000;">'</span><span style="color: Red;">.</span><span style="color: #8b0000;">'</span><span style="color: Gray;">, </span><span style="color: #8b0000;">'</span><span style="color: Red;">/</span><span style="color: #8b0000;">'</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">return</span><span style="color: Gray;"> </span><span style="color: Blue;">locateFile</span><span style="color: Olive;">(</span><span style="color: Blue;">logicalName</span><span style="color: Gray;">, </span><span style="color: Blue;">locale</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">private</span><span style="color: Gray;"> </span><span style="color: Blue;">Resource</span><span style="color: Gray;"> </span><span style="color: Blue;">locateFile</span><span style="color: Olive;">(</span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">logicalName</span><span style="color: Gray;">, </span><span style="color: Blue;">Locale</span><span style="color: Gray;"> </span><span style="color: Blue;">locale</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">path</span><span style="color: Gray;"> = </span><span style="color: Blue;">format</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">%s.%s</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;">, </span><span style="color: Blue;">logicalName</span><span style="color: Gray;">,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">InternalConstants</span><span style="color: Gray;">.</span><span style="color: Blue;">TEMPLATE_EXTENSION</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">return</span><span style="color: Gray;"> </span><span style="color: Blue;">contextRoot</span><span style="color: Gray;">.</span><span style="color: Blue;">forFile</span><span style="color: Olive;">(</span><span style="color: Blue;">path</span><span style="color: Olive;">)</span><span style="color: Gray;">.</span><span style="color: Blue;">forLocale</span><span style="color: Olive;">(</span><span style="color: Blue;">locale</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp;<br /></span><span style="color: Olive;">}</span></div></div>
<p>在module中设置覆盖掉默认的PageTemplateLocator实现</p>
<div class="hl-surround"><div class="hl-main"><span style="color: Green;">public</span><span style="color: Gray;"> </span><span style="color: Blue;">PageTemplateLocator</span><span style="color: Gray;"> </span><span style="color: Blue;">buildContextRootTemplateLocator</span><span style="color: Olive;">(</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@</span><span style="color: Blue;">InjectService</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">ContextAssetFactory</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Blue;">AssetFactory</span><span style="color: Gray;"> </span><span style="color: Blue;">contextAssetFactory</span><span style="color: Gray;">,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@</span><span style="color: Blue;">Inject</span><span style="color: Gray;"> @</span><span style="color: Blue;">Symbol</span><span style="color: Olive;">(</span><span style="color: Blue;">InternalConstants</span><span style="color: Gray;">.</span><span style="color: Blue;">TAPESTRY_APP_PACKAGE_PARAM</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Blue;">String</span><span style="color: Gray;"> </span><span style="color: Blue;">appRootPackage</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Green;">return</span><span style="color: Gray;"> </span><span style="color: Green;">new</span><span style="color: Gray;"> </span><span style="color: Blue;">ContextRootTemplateLocator</span><span style="color: Olive;">(</span><span style="color: Blue;">contextAssetFactory</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.</span><span style="color: Blue;">getRootResource</span><span style="color: Olive;">()</span><span style="color: Gray;">, </span><span style="color: Blue;">appRootPackage</span><span style="color: Olive;">)</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span><span style="color: Gray;"><br />&nbsp;<br />&nbsp;&nbsp; &nbsp;@</span><span style="color: Blue;">SuppressWarnings</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">unchecked</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp;</span><span style="color: Green;">public</span><span style="color: Gray;"> </span><span class="hl-types">static</span><span style="color: Gray;"> </span><span class="hl-types">void</span><span style="color: Gray;"> </span><span style="color: Blue;">contributeAlias</span><span style="color: Olive;">(</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">Configuration</span><span style="color: Gray;">&lt;</span><span style="color: Blue;">AliasContribution</span><span style="color: Gray;">&gt; </span><span style="color: Blue;">configuration</span><span style="color: Gray;">,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;@</span><span style="color: Blue;">InjectService</span><span style="color: Olive;">(</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">ContextRootTemplateLocator</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Blue;">PageTemplateLocator</span><span style="color: Gray;"> </span><span style="color: Blue;">contextRootTemplateLocator</span><span style="color: Olive;">)</span><span style="color: Gray;"> </span><span style="color: Olive;">{</span><span style="color: Gray;"><br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">configuration</span><span style="color: Gray;">.</span><span style="color: Blue;">add</span><span style="color: Olive;">(</span><span style="color: Blue;">AliasContribution</span><span style="color: Gray;">.</span><span style="color: Blue;">create</span><span style="color: Olive;">(</span><span style="color: Blue;">PageTemplateLocator</span><span style="color: Gray;">.</span><span style="color: Green;">class</span><span style="color: Gray;">,<br />&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span><span style="color: Blue;">contextRootTemplateLocator</span><span style="color: Olive;">))</span><span style="color: Gray;">;<br />&nbsp;&nbsp; &nbsp;</span><span style="color: Olive;">}</span></div></div>
<p>这样就可以在根目录下加载组件类的模板了。</p>
<p>转载请注明出处tapestry5.com。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tapestry5.com/archives/7/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tapestry5每日播报(20080512)</title>
		<link>http://www.tapestry5.com/archives/6</link>
		<comments>http://www.tapestry5.com/archives/6#comments</comments>
		<pubDate>Mon, 12 May 2008 14:28:23 +0000</pubDate>
		<dc:creator>tapestry5</dc:creator>
		
		<category><![CDATA[邮件列表]]></category>

		<category><![CDATA[tapestry5 t5components prop ognl onActivate 相对路径 绝对路径 n]]></category>

		<guid isPermaLink="false">http://www.tapestry5.com/?p=6</guid>
		<description><![CDATA[1.介绍Tapestry5的新文章发布Tapestry for Nonbelievers，写的很好，推荐大家阅读。
2.邮件列表T5.0.11: onActivate() called twice, more questions，问题跟Tapesetry5的路径问题有关，这个也是一直困扰我的地方，例如生成的url为
http://localhost:8607/myApp/start/testmessage,图像路径为myApp/images/image.jpg,如果使用相对路径&#60;img src=&#8221;images/image.jpg&#8221;/&#62;,生成的图片url则为http://localhost:8607/myApp/start/images/image.jpg, 改为&#60;img src=&#8221;/images/image.jpg&#8221;/&#62;则可正常显示，也就是说开发的应用只能放在根目录，无法部署到目录中，
不知道有没有什么两全的方式解决。
3.邮件列表T5: Calling method with parameter in prop，在T4升级到T5的过程中，碰到了prop中无法执行函数的问题，T5Components中有个ognl binding，可以重新使用ognl取值。
]]></description>
			<content:encoded><![CDATA[<p>1.介绍Tapestry5的新文章发布<a href="http://www.infoq.com/articles/tapestry5-intro"><span style="COLOR: #285ab5">Tapestry for Nonbelievers</span></a>，写的很好，推荐大家阅读。</p>
<p>2.邮件列表<a href="http://www.nabble.com/T5.0.11:-onActivate()-called-twice,-more-questions-td17184571s302.html"><span style="COLOR: #285ab5">T5.0.11: onActivate() called twice, more questions</span></a>，问题跟Tapesetry5的路径问题有关，这个也是一直困扰我的地方，例如生成的url为</p>
<p><span style="COLOR: #285ab5">http://localhost:8607/myApp/start/testmessage</span>,图像路径为myApp/images/image.jpg,如果使用相对路径&lt;img src=&#8221;images/image.jpg&#8221;/&gt;,生成的图片url则为<span style="COLOR: #285ab5">http://localhost:8607/myApp/start/images/image.jpg,</span> 改为&lt;img src=&#8221;/images/image.jpg&#8221;/&gt;则可正常显示，也就是说开发的应用只能放在根目录，无法部署到目录中，</p>
<p>不知道有没有什么两全的方式解决。</p>
<p>3.邮件列表<a href="http://www.nabble.com/T5:-select-within-table-grid-td17145791s302.html">T5: Calling method with parameter in prop</a>，在T4升级到T5的过程中，碰到了prop中无法执行函数的问题，T5Components中有个<a href="http://87.193.218.134:8080/t5components/t5c-commons/howto_ognlbinding.html">ognl binding</a>，可以重新使用ognl取值。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tapestry5.com/archives/6/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tapestry5开发系列:如何在Eclipse中运行jetty</title>
		<link>http://www.tapestry5.com/archives/5</link>
		<comments>http://www.tapestry5.com/archives/5#comments</comments>
		<pubDate>Sat, 10 May 2008 14:01:24 +0000</pubDate>
		<dc:creator>tapestry5</dc:creator>
		
		<category><![CDATA[开发工具]]></category>

		<category><![CDATA[tapestry5 eclipse jetty 插件 runjettyrun]]></category>

		<guid isPermaLink="false">http://www.tapestry5.com/?p=5</guid>
		<description><![CDATA[
   Jetty是个类似tomcat的web server，体积小、启动快、可内嵌，开发中使用起来很方便，eclipse的插件中支持jetty的有个jettylauncher，可jettylauncher只支持eclipse2.x/jetty5.x(有人hack了代码，可以支持高版本的eclipse，但还是支持不了jetty6.x)。现在支持jetty6的有个runjettyrun插件，支持最新版本的eclipse和jetty，而且其本身就自带jetty6，不需要单独下载和配置jetty了，runjettyrun插件的安装和使用请参考这里。



   我在使用Runjettyrun运行tapestry5开发的程序时，碰到了些问题，具体的问题和解决方法如下。


   问题1、默认runjettyrun的配置运行时，控制台没任何提示，其本身也没有运行起来。


   解决方法：在配置中，选择classpath标签，在user entries中删除掉项目本身，如图所示：



   问题2、问题1解决后，再次运行会提示找不到类javax.servlet.http.HttpServletRequest，这个简单添加个servlet.jar就可以了。


   好了，jetty可以运行了，还有个配置时开发中一定要加的，tapestry5有个production-mode，默认的为true，可以在作为产品发布时，提供精简的错误信息，在开发时，异常信息当然是越精确越好，而且精确的异常信息也是tapestry的强项，可以很准确的告诉您错误出在哪里，所以在开发时这个选项要关掉，选中运行配置中的arguments标签，在vm
   arguments中添加-Dtapestry.production-mode=false，如下图所示：


   这样就可以打开详细的错误信息报告了，Tapestry5有更改页面和组件类不需要重启服务器的特性，运行jetty后，就像用script语言开发一样，尽情享受开发的乐趣吧。

转载请注明出处www.tapestry5.com,拜托将图片配置好，谢谢。
]]></description>
			<content:encoded><![CDATA[<p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt" dir="ltr">
   Jetty是个类似tomcat的web server，体积小、启动快、可内嵌，开发中使用起来很方便，eclipse的插件中支持jetty的有个<a href="http://jettylauncher.sourceforge.net">jettylauncher</a>，可jettylauncher只支持eclipse2.x/jetty5.x(有人hack了代码，可以支持高版本的eclipse，但还是支持不了jetty6.x)。现在支持jetty6的有个<a href="http://code.google.com/p/run-jetty-run/">runjettyrun</a>插件，支持最新版本的eclipse和jetty，而且其本身就自带jetty6，不需要单独下载和配置jetty了，runjettyrun插件的安装和使用请参考<a href="http://code.google.com/p/run-jetty-run/wiki/GettingStarted">这里</a>。
</p>
<p><span id="more-5"></span></p>
<p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
   我在使用Runjettyrun运行tapestry5开发的程序时，碰到了些问题，具体的问题和解决方法如下。
</p>
<p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
   问题1、默认runjettyrun的配置运行时，控制台没任何提示，其本身也没有运行起来。
</p>
<p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
   解决方法：在配置中，选择classpath标签，在user entries中删除掉项目本身，如图所示：<a href="http://www.tapestry5.com/images/runjettyrun.jpg"><img src="http://www.tapestry5.com/images/runjettyrun.jpg" alt=""  width="520"/></a>
</p>
<p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
<p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
   问题2、问题1解决后，再次运行会提示找不到类javax.servlet.http.HttpServletRequest，这个简单添加个servlet.jar就可以了。
</p>
<p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
   好了，jetty可以运行了，还有个配置时开发中一定要加的，tapestry5有个production-mode，默认的为true，可以在作为产品发布时，提供精简的错误信息，在开发时，异常信息当然是越精确越好，而且精确的异常信息也是tapestry的强项，可以很准确的告诉您错误出在哪里，所以在开发时这个选项要关掉，选中运行配置中的arguments标签，在vm<br />
   arguments中添加-Dtapestry.production-mode=false，如下图所示：<a href="http://www.tapestry5.com/images/runjettyrunarguments.jpg"><img src="http://www.tapestry5.com/images/runjettyrunarguments.jpg" alt="" width="520"/></a>
</p>
<p style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt">
   这样就可以打开详细的错误信息报告了，Tapestry5有更改页面和组件类不需要重启服务器的特性，运行jetty后，就像用script语言开发一样，尽情享受开发的乐趣吧。
</p>
<p>转载请注明出处www.tapestry5.com,拜托将图片配置好，谢谢。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tapestry5.com/archives/5/feed</wfw:commentRss>
		</item>
		<item>
		<title>Tapestry5每日播报(20080509)</title>
		<link>http://www.tapestry5.com/archives/4</link>
		<comments>http://www.tapestry5.com/archives/4#comments</comments>
		<pubDate>Fri, 09 May 2008 09:11:06 +0000</pubDate>
		<dc:creator>tapestry5</dc:creator>
		
		<category><![CDATA[邮件列表]]></category>

		<category><![CDATA[tapestry5 release 教程 下划线]]></category>

		<guid isPermaLink="false">http://www.tapestry5.com/?p=4</guid>
		<description><![CDATA[Tapestry5每日播报(20080509)
1.变量命名中的下划线正在被移除，具体原因看下作者解释。
PS:终于去掉下划线了，其实各有利弊，我是不用的，那个wrap作者在为什么不喜欢Tapestry5的文章里也提到了这点。
2.邮件列表里有人问道Tapestry5什么时候能够release，作者回答说估计下个周可以。
3.作者在blog中提到更新了Tapestry5的官方教程，查看新教程。
每日播报的信息来自于邮件列表，信息同时发布于Tapestry圈子
]]></description>
			<content:encoded><![CDATA[<p>Tapestry5每日播报(20080509)<br />
1.变量命名中的下划线正在被移除，具体原因看下作者<a href="http://www.nabble.com/why-leading-underscores-removed---td17110425s302.html">解释</a>。<br />
PS:终于去掉下划线了，其实各有利弊，我是不用的，那个wrap作者在<a href="http://www.jroller.com/$entry.website.user.userName/entry/things_i_dont_like_about">为什么不喜欢Tapestry5</a>的文章里也提到了这点。<br />
2.邮件列表里有人问道<a href="http://www.nabble.com/Tapestry-5-Release-Date-%28not-beta%29-td17118982s302.html">Tapestry5什么时候能够release</a>，作者回答说估计下个周可以。<br />
3.作者在<a href="http://tapestryjava.blogspot.com/2008/05/improvements-to-tapestry-5-tutorial.html">blog</a>中提到更新了Tapestry5的官方教程，<a href="http://tapestry.formos.com/nightly/tapestry5/tutorial1/">查看新教程</a>。</p>
<p>每日播报的信息来自于邮件列表，信息同时发布于<a href="http://tapestrying.javaeye.com">Tapestry圈子</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.tapestry5.com/archives/4/feed</wfw:commentRss>
		</item>
		<item>
		<title>如何在dreamweaver中打开Tapestry5的tml模板文件</title>
		<link>http://www.tapestry5.com/archives/3</link>
		<comments>http://www.tapestry5.com/archives/3#comments</comments>
		<pubDate>Thu, 08 May 2008 13:11:31 +0000</pubDate>
		<dc:creator>tapestry5</dc:creator>
		
		<category><![CDATA[开发工具]]></category>

		<category><![CDATA[tapstry5 dreamveaver tml]]></category>

		<guid isPermaLink="false">http://www.tapestry5.com/?p=3</guid>
		<description><![CDATA[&#160;&#160;&#160;&#160;Tapestry从5.0.6开始使用tml作为模板文件的扩展名，但在dreamveaver中无法打开tml文件，在网上找了些资料，终于可以在dreamveaver中像修改html文件一样修改tml文件了，现整理下设置过程：

 1、使Dreamweaver能识别*.tmp文件，并当做html页面来处理，需要修改两个文件，

(1).Extensions.txt&#8212;&#8212;位于你的用户目录下，位于dreamveaver安装目录下的configuration文件夹下。
(2). MMDocumentTypes.xml&#8212;-位于dreamveaver安装目录下的configuration\DocumentTypes文件夹下

#
 2、用编辑器打开Extensions.txt,使用替换功能，把XHTML替换成XHTM,TMP。替换应该只有两处，一处是所有文档里面；另一处是第二行，:HTML 文档中。需要注意的是，文档类型要用大写，如TMP，而不是tmp。保存退出。
	 修改后的文件前两行如下
	HTM,HTML,SHTM,SHTML,HTA,HTC,XHTML,TML,STM, SSI,JS,AS,ASC,ASR,XML,XSL,XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX, ASMX,CONFIG,CS,CSS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,JSP,WML,TPL,LASSO, JSF,VB,VBS,VTM,VTML,INC,JAVA,EDML,MASTER:所有文档
	HTM,HTML,HTA,HTC,XHTML,TML:HTML 文档
 3、用编辑器打开MMDocumentTypes.xml，找到下面部分，并添加tml，修改后如下：
&#60;documenttype id=&#34;HTML&#34; internaltype=&#34;HTML&#34; winfileextension=&#34;html,htm,shtml,shtm,stm,tpl,lasso,xhtml,tml&#34; macfileextension=&#34;html,htm,shtml,shtm,tpl,lasso,xhtml,ssi,tml&#34; file=&#34;Default.html&#34; writebyteordermark=&#34;false&#34;&#62;
保存退出。winfileextension指的是在windows系统中的扩展，macfileextension是mac os系统中的扩展
 4、如果你想使DW成为*.tml的默认编辑器，就可以把*.tml文件和DW默认关联起来，方法就是打开编辑-&#62;首选参数-&#62;文件类型\编辑器，找到*.tml扩展名，如果没有就新建一个，然后“更改”，找到DW，就把两者关联起来了， 经过这样设置，DW就可以识别*.tml文件，并当作*.html来处理。

]]></description>
			<content:encoded><![CDATA[<p>&nbsp;&nbsp;&nbsp;&nbsp;Tapestry从5.0.6开始使用tml作为模板文件的扩展名，但在dreamveaver中无法打开tml文件，在网上找了些资料，终于可以在dreamveaver中像修改html文件一样修改tml文件了，现整理下设置过程：</p>
<ol>
<li> 1、使Dreamweaver能识别*.tmp文件，并当做html页面来处理，需要修改两个文件，
<ol>
<li>(1).Extensions.txt&#8212;&#8212;位于你的用户目录下，位于dreamveaver安装目录下的configuration文件夹下。</li>
<li>(2). MMDocumentTypes.xml&#8212;-位于dreamveaver安装目录下的configuration\DocumentTypes文件夹下</li>
</ol>
<p>#<span id="more-3"></span></p>
<li> 2、用编辑器打开Extensions.txt,使用替换功能，把XHTML替换成XHTM,TMP。替换应该只有两处，一处是所有文档里面；另一处是第二行，:HTML 文档中。需要注意的是，文档类型要用大写，如TMP，而不是tmp。保存退出。<br />
	 修改后的文件前两行如下<br />
	HTM,HTML,SHTM,SHTML,HTA,HTC,XHTML<span style="color: red;">,TML</span>,STM, SSI,JS,AS,ASC,ASR,XML,XSL,XSD,DTD,XSLT,RSS,RDF,LBI,DWT,ASP,ASA,ASPX,ASCX, ASMX,CONFIG,CS,CSS,CFM,CFML,CFC,TLD,TXT,PHP,PHP3,PHP4,PHP5,JSP,WML,TPL,LASSO, JSF,VB,VBS,VTM,VTML,INC,JAVA,EDML,MASTER:所有文档<br />
	HTM,HTML,HTA,HTC,XHTML<span style="color: red;">,TML</span>:HTML 文档</li>
<li> 3、用编辑器打开MMDocumentTypes.xml，找到下面部分，并添加tml，修改后如下：
<div class="hl-surround"><div class="hl-main"><span style="color: Olive;">&lt;</span><span style="color: Green;">documenttype</span><span style="color: Gray;"> </span><span style="color: #00008b;">id</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">HTML</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">internaltype</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">HTML</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">winfileextension</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">html,htm,shtml,shtm,stm,tpl,lasso,xhtml,tml</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">macfileextension</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">html,htm,shtml,shtm,tpl,lasso,xhtml,ssi,tml</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">file</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">Default.html</span><span style="color: #8b0000;">&quot;</span><span style="color: Gray;"> </span><span style="color: #00008b;">writebyteordermark</span><span style="color: Gray;">=</span><span style="color: #8b0000;">&quot;</span><span style="color: Red;">false</span><span style="color: #8b0000;">&quot;</span><span style="color: Olive;">&gt;</span></div></div>
<p>保存退出。winfileextension指的是在windows系统中的扩展，macfileextension是mac os系统中的扩展</li>
<li> 4、如果你想使DW成为*.tml的默认编辑器，就可以把*.tml文件和DW默认关联起来，方法就是打开编辑-&gt;首选参数-&gt;文件类型\编辑器，找到*.tml扩展名，如果没有就新建一个，然后“更改”，找到DW，就把两者关联起来了， 经过这样设置，DW就可以识别*.tml文件，并当作*.html来处理。
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.tapestry5.com/archives/3/feed</wfw:commentRss>
		</item>
		<item>
		<title>Hello world!</title>
		<link>http://www.tapestry5.com/archives/1</link>
		<comments>http://www.tapestry5.com/archives/1#comments</comments>
		<pubDate>Wed, 07 May 2008 16:08:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[未分类]]></category>

		<category><![CDATA[hibernate]]></category>

		<category><![CDATA[tapestry]]></category>

		<category><![CDATA[学习笔记]]></category>

		<category><![CDATA[邮件列表]]></category>

		<guid isPermaLink="false">http://www.tapestry5.com/?p=1</guid>
		<description><![CDATA[Tapestry5.com开始运行了，也hello world下。
]]></description>
			<content:encoded><![CDATA[<p>Tapestry5.com开始运行了，也hello world下。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tapestry5.com/archives/1/feed</wfw:commentRss>
		</item>
	</channel>
</rss>
