sitelink1 | |
---|---|
sitelink2 | |
extra_vars5 | |
extra_vars6 |
The Struts Showcase demonstrates a variety of use cases and tag usages.
Essentially, the application exercises various framework features in isolation.
The Showcase is not meant as a "best practices" example.
* For more "by example" solutions, see the Struts Cookbook pages.
* For a "best practices" example, see the MailReader application Tour and source code.
사용 케이스와 태그 사용법을 보여주는 여러가지 스트러츠 쇼케이스 데모 모음이다.
본래 여러 프레임웍을 시험하는 독립된 어플리케이션이었다.
쇼케이스는 최상의 실습 예제를 의미하지는 않는다.
* 보다 많은 예제는 Struts Cookbook 을 보아라
* 최상의 실습 예제는 MailReader Application 을 살펴보아라
1. Ajax Theme for Struts Tags :
The Ajax tags are experimental. These examples have only been tested under FireFox 1.5 and IE 6.
* Autocompleter combobox tag
* Remote button tag
* Remote div tag
* Remote link tag
* Tabbed panel
* Widgets (may not work in all browsers!) see the dojo website for more information
* Remote forms
2. Ajax Chat
3. Action Chaining
4. Config Browser
* AjaxRemoteForm
* AjaxRemoteLink
* AjaxTest
* JSONList
* Test1
* Test2
* Test3
* date
* example4
* example5
* getCategory
* showcase
* toggle
* tree
* viewSource
5. Conversion
* Populate into the Struts action class a List of Person.java Object
* Populate into Struts action class a Set of Address.java Object
* Populate into Struts action class a List of OperationEnum.java (Java5 Enum)
6. CRUD
* List available Skills
* Create/Edit Skill
* List available Employees
* Create/Edit Employee
7. Execute & Wait
These examples illustrate Struts build in support for execute and wait.
When you have a process that takes a long time your users can be impatient and starts to submit/click again.
A good solution is to show the user a progress page (wait page) while the process takes it time.
* Example 1 (no delay)
* Example 2 (with delay)
* Example 2 (with longer check delay)
8. File Download
* Download image file. The browser should display the Struts logo.
* Download ZIP file. The browser should prompt for a location to save the ZIP file.
9. File Upload
* Single File Upload
* Multiple File Upload (List)
* Multiple File Upload (Array)
10. Freemarker
* Demo of usage of a Custom Freemarker Manager
* Demo of Standard Struts Freemarker Tags
11. Hangman
* Hangman (Non Ajax)
* Hangman (Ajax - Experimental)
12. JavaServer Faces
The following pages show how Struts and JSF components can work together, each doing what they do best.
* List available Employees
* Create/Edit Employee
13. Person Manager
* Create a new person
* List all people
14. Tags
* Non UI Tags Examples
* UI Tags Example
15. Tiles
This example illustrates the Struts/Tiles Plugin.
Tiles 2 is an effort to extract the Tiles library from Struts. It is currently housed in the Sandbox area of the Apache Struts Subversion repository.
Notice that this is a layout made in JSP
* View FreeMarker Example
* View Example with a FreeMarker Layout
16. Token
These examples illustrate Struts build in support of using tokens to prevent double post.
You have a web page where user can input data and press a button to submit. There could be a problem that the user submit the data many times, by either clicking the button many times, or use the browser back button and then submit the form again.
A good solution is to use a hidden token in the form. The token is autogenerated and unique from time to time. This token is then validated with the HttpSession that it is the first time it is submitted, if not we have a double post and therefore can prevent the second submit action.
For more information check out javadoc for org.apache.struts2.interceptor.TokenInterceptor and org.apache.struts2.interceptor.TokenSessionStoreInterceptor.
* Example 1 (token based .jsp example)
* Example 2 (as example 1 with redirect after post)
* Example 3 (token-session based .jsp example)
* Example 4 (token based freemarker example)
17. Validation
* Field Validators
* Field Validators with client-side JavaScript
* Non Field Validator
* Store across request using MessageStoreInterceptor (Example)
* Validation (ajax)
* Validation (basic)
* Validation (client)
* Validation (client using css_xhtml theme)
* Visitor Validator
* Back To Showcase
18. Help