This article mainly introduces a configuration method of a simple case Tapestry in the TapeStry3.0 environment, which is designed to help developers are familiar with the 3.0 environment. Due to the Tutorial document provided by Tapestry (http://jakarta.apache.org/tapestry/) is based on 2.x, this greatly improves the difficulty of learning. For the introduction of TapeStry2.x and the Tapestry framework, please refer to the transparent article of the 7th "Programmer" magazine, no more.
2.X to 3.0 changes I have too much time to study - after all, the time is limited, just understand the concept, 3.0 is coming, the name of the package has changed, and the DTD has changed, some configuration The method is not the same, so this article is mainly discussed 3.0, for the difference in 2.x and 3.0, try not to compare; if there is a fault in the text, please advise.
1 Development Environment Tomcat5.0, Win2000 Server, TapeStry 3.0B2 Development Tools: Editplus2.11:) (Small project, no need to use aircraft carrier)
2 Let's get started! OK, let us start this "Hello, TapeStry3.0"!
First, create a directory to save your project, assume the x: / TapeStry / Hello (replace it later); and finally establish the following file structure: -Web-inf - classes - lib
Put a Home.html in the $ HOME root directory, the code as follows:
Then put a web.xml in $ home / web-inf / below, unexpected, this web.xml is so simple, and it is very different from the TapeStry2.x documentation ~~
XML Version = "1.0"?>
People who read the old TUTORIAL will be strange, where is the org.apache.tapestry.application-specification? By default, TapeStry will find the same .application, which is the same .application in / web-inflight, in addition, the configuration of Application is very simple, for our Hello, Tapestry simple use case, no. Application is also possible. But for the form of the form, we plus it: put the Hello.application file below $ home / web-inflight (with Web.xml)
XML Version = "1.0"?>
OK, the last step, copy all of the Workbench example of TapeStry to $ HOME / Web-INF / LIB.
3 Deployment Method is very simple, you can use the JAR tool to make the $ home directory into a WAR package, or copy the entire $ home directory to $ Tomcat_home / WebApps. Whether you use that way, after deployment, open your browser, type the address: http:// localhost: 8080 / hello, is it displayed below?
4 Summary in TapeStry3.0, deploying applications easier, this article is more simple due to cases, many steps can be ignored (in this case, hello.application and home.page can be ignored), but in complex applications In the case, such as TapeStry's own Workbench example, it is not negligible. About Tapestry's other features, the author is studying. Tapestry is an excellent development framework if you are interested, or what is incorrect in this article, Welcome Criticism, Email: Mechiland@163.net