今天做了第一个tapestry的例子,只是一个简单入门的例子。
我写一个Home.html代码如下:
java 代码
xml 代码
- <html>
- <head>
- head>
- <body>
- hello <span jwcid="subject">world!span>!
- body>
- html>
他的Home.page代码是:
xml 代码
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE page-specification PUBLIC
- "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
- "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
- <!-- generated by Spindle, http://spindle.sourceforge.net -->
- <page-specification class="com.ttdev.helloworld.Home">
- <component id="subject" type="Insert">
- <binding name="value" value="greetingSubject"/>
- </component>
- </page-specification>
<component id="subject" type="Insert"> </component>
Home.java代码是:
java 代码
- package com.ttdev.helloworld;
- import org.apache.tapestry.html.BasePage;
- public class Home extends BasePage {
- public String getGreetingSubject() {
- return "john";
- }
- }
发布到tomcat里面却是发生错误的:
org.apache.tapestry.ApplicationRuntimeException | |
org.apache.tapestry.util.xml.DocumentParseException | |
documentLocation: | context:/WEB-INF/Home.page |
---|
请大家来看一看,帮一下忙,看看出的是什么错误,新书,请见谅!