Hai thư mục có thể chứa nhiều thư mục khác được liên kết với một plugin hoặc công nghệ. Phổ biến nhất là java và tài nguyên (có chứa tài sản, XML, và các tập tin cấu hình khác) thư mục vì Maven2 là một công cụ xây dựng cho Java nhưng có nhiều hơn nữa. | 52 CHAPTER 3 FRAMEWORK OVERVIEW Configuring the Elements of the Framework Now that you are familiar with the elements of the framework you will want to configure them to be used in your web application. We ll start with the configuration file. After that we ll talk about the configuration of actions via annotations and XML. The File The configuration file is a J2EE configuration file that determines how elements of the HTTP request are processed by the servlet container. It is not strictly a Struts2 configuration file but it is a file that needs to be configured for Struts2 to work. This is the first configuration file you ll need to configure if you are starting without the aid of a template or tool that generates it such as Maven2 . In the previous chapter there were multiple entries for this configuration file each of which allowed for various plug-ins to be active. For just the Struts2 framework without any plug-ins the following is all that is required to be present in the configuration file filter filter-name action2 filter-name filter-class filter-class filter filter-mapping filter-name action2 filter-name url-pattern url-pattern filter-mapping As plug-ins are enabled additional configuration will be required. Any additional configuration will be introduced as the plug-ins are introduced. Zero Configuration Annotations Struts2 has a prerequirement of Java 5 and can therefore take advantage of annotations as a configuration mechanism. The Zero Configuration terminology is used to describe the departure from a pure XML-based configuration to an annotation-based configuration. Using annotations the configuration can be completely avoided in most situations. Note Although there is a prerequirement of Java 5 to use Struts2 there is also another option. For those projects that cannot move away from Java a compatible version can be generated using the retrotrans-lator .