├── .idea ├── .name ├── artifacts │ ├── struts2_rest_showcase_war.xml │ └── struts2_rest_showcase_war_exploded.xml ├── compiler.xml ├── encodings.xml ├── libraries │ ├── Maven__asm_asm_3_3.xml │ ├── Maven__asm_asm_commons_3_3.xml │ ├── Maven__asm_asm_tree_3_3.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_6_0.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_6_1.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_6_1.xml │ ├── Maven__com_thoughtworks_xstream_xstream_1_4_8.xml │ ├── Maven__commons_beanutils_commons_beanutils_1_9_2.xml │ ├── Maven__commons_codec_commons_codec_1_2.xml │ ├── Maven__commons_collections_commons_collections_3_1.xml │ ├── Maven__commons_fileupload_commons_fileupload_1_3_1.xml │ ├── Maven__commons_httpclient_commons_httpclient_3_1.xml │ ├── Maven__commons_io_commons_io_2_4.xml │ ├── Maven__commons_lang_commons_lang_2_4.xml │ ├── Maven__commons_logging_commons_logging_1_1_3.xml │ ├── Maven__dom4j_dom4j_1_6_1.xml │ ├── Maven__htmlunit_htmlunit_1_11.xml │ ├── Maven__javax_servlet_servlet_api_2_4.xml │ ├── Maven__jaxen_jaxen_1_1.xml │ ├── Maven__jdom_jdom_1_0.xml │ ├── Maven__junit_junit_4_12.xml │ ├── Maven__nekohtml_nekohtml_0_9_5.xml │ ├── Maven__net_sf_ezmorph_ezmorph_1_0_6.xml │ ├── Maven__net_sf_json_lib_json_lib_jdk15_2_3.xml │ ├── Maven__net_sourceforge_jwebunit_jwebunit_core_1_4_1.xml │ ├── Maven__net_sourceforge_jwebunit_jwebunit_htmlunit_plugin_1_4_1.xml │ ├── Maven__ognl_ognl_3_1_4.xml │ ├── Maven__org_apache_commons_commons_lang3_3_4.xml │ ├── Maven__org_apache_logging_log4j_log4j_api_2_5.xml │ ├── Maven__org_apache_logging_log4j_log4j_core_2_5.xml │ ├── Maven__org_apache_struts_struts2_config_browser_plugin_2_5.xml │ ├── Maven__org_apache_struts_struts2_convention_plugin_2_5.xml │ ├── Maven__org_apache_struts_struts2_core_2_5.xml │ ├── Maven__org_apache_struts_struts2_rest_plugin_2_5.xml │ ├── Maven__org_freemarker_freemarker_2_3_23.xml │ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml │ ├── Maven__org_javassist_javassist_3_20_0_GA.xml │ ├── Maven__org_springframework_spring_core_4_1_6_RELEASE.xml │ ├── Maven__org_springframework_spring_test_4_1_6_RELEASE.xml │ ├── Maven__regexp_regexp_1_3.xml │ ├── Maven__rhino_js_1_6R5.xml │ ├── Maven__xerces_xercesImpl_2_10_0.xml │ ├── Maven__xerces_xmlParserAPIs_2_6_2.xml │ ├── Maven__xml_apis_xml_apis_1_3_02.xml │ ├── Maven__xmlpull_xmlpull_1_1_3_1.xml │ └── Maven__xpp3_xpp3_min_1_1_4c.xml ├── misc.xml ├── modules.xml └── workspace.xml ├── README.md ├── pom.xml ├── src ├── main │ ├── java │ │ └── org │ │ │ └── demo │ │ │ └── rest │ │ │ └── example │ │ │ ├── IndexController.java │ │ │ ├── Order.java │ │ │ ├── OrdersController.java │ │ │ └── OrdersService.java │ ├── resources │ │ ├── log4j2.xml │ │ ├── struts.xml │ │ └── velocity.properties │ └── webapp │ │ ├── WEB-INF │ │ ├── content │ │ │ ├── orders-deleteConfirm.jsp │ │ │ ├── orders-edit.jsp │ │ │ ├── orders-editNew.jsp │ │ │ ├── orders-index.jsp │ │ │ └── orders-show.jsp │ │ └── web.xml │ │ ├── css │ │ ├── app.css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ └── bootstrap.min.css │ │ └── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 └── test │ └── java │ └── it │ └── org │ └── apache │ └── struts2 │ └── rest │ └── example │ ├── GetOrdersTest.java │ ├── ListOrdersTest.java │ ├── ParameterUtils.java │ └── PostOrderTest.java ├── struts2-rest-showcase.iml └── target ├── .plxarc ├── antrun └── build-main.xml ├── classes ├── log4j2.xml ├── org │ └── demo │ │ └── rest │ │ └── example │ │ ├── IndexController.class │ │ ├── Order.class │ │ ├── OrdersController.class │ │ └── OrdersService.class ├── struts.xml └── velocity.properties ├── maven-archiver └── pom.properties ├── maven-shared-archive-resources └── META-INF │ ├── DEPENDENCIES │ ├── LICENSE │ └── NOTICE ├── maven-status └── maven-compiler-plugin │ ├── compile │ └── default-compile │ │ ├── createdFiles.lst │ │ └── inputFiles.lst │ └── testCompile │ └── default-testCompile │ ├── createdFiles.lst │ └── inputFiles.lst ├── struts2-rest-showcase-sources.jar ├── struts2-rest-showcase.war ├── struts2-rest-showcase ├── META-INF │ └── MANIFEST.MF ├── WEB-INF │ ├── classes │ │ ├── META-INF │ │ │ ├── DEPENDENCIES │ │ │ ├── LICENSE │ │ │ └── NOTICE │ │ ├── log4j2.xml │ │ ├── org │ │ │ └── demo │ │ │ │ └── rest │ │ │ │ └── example │ │ │ │ ├── IndexController.class │ │ │ │ ├── Order.class │ │ │ │ ├── OrdersController.class │ │ │ │ └── OrdersService.class │ │ ├── struts.xml │ │ └── velocity.properties │ ├── content │ │ ├── orders-deleteConfirm.jsp │ │ ├── orders-edit.jsp │ │ ├── orders-editNew.jsp │ │ ├── orders-index.jsp │ │ └── orders-show.jsp │ ├── lib │ │ ├── asm-3.3.jar │ │ ├── asm-commons-3.3.jar │ │ ├── asm-tree-3.3.jar │ │ ├── commons-beanutils-1.9.2.jar │ │ ├── commons-collections-3.1.jar │ │ ├── commons-fileupload-1.3.1.jar │ │ ├── commons-io-2.4.jar │ │ ├── commons-lang-2.4.jar │ │ ├── commons-lang3-3.4.jar │ │ ├── commons-logging-1.1.3.jar │ │ ├── ezmorph-1.0.6.jar │ │ ├── freemarker-2.3.23.jar │ │ ├── jackson-annotations-2.6.0.jar │ │ ├── jackson-core-2.6.1.jar │ │ ├── jackson-databind-2.6.1.jar │ │ ├── javassist-3.20.0-GA.jar │ │ ├── json-lib-2.3-jdk15.jar │ │ ├── log4j-api-2.5.jar │ │ ├── log4j-core-2.5.jar │ │ ├── ognl-3.1.4.jar │ │ ├── struts2-config-browser-plugin-2.5.jar │ │ ├── struts2-convention-plugin-2.5.jar │ │ ├── struts2-core-2.5.jar │ │ ├── struts2-rest-plugin-2.5.jar │ │ ├── xmlpull-1.1.3.1.jar │ │ ├── xpp3_min-1.1.4c.jar │ │ └── xstream-1.4.8.jar │ ├── src │ │ └── java │ │ │ ├── log4j2.xml │ │ │ ├── org │ │ │ └── demo │ │ │ │ └── rest │ │ │ │ └── example │ │ │ │ ├── IndexController.java │ │ │ │ ├── Order.java │ │ │ │ ├── OrdersController.java │ │ │ │ └── OrdersService.java │ │ │ ├── struts.xml │ │ │ └── velocity.properties │ └── web.xml ├── css │ ├── app.css │ ├── bootstrap-theme.css │ ├── bootstrap-theme.css.map │ ├── bootstrap-theme.min.css │ ├── bootstrap.css │ ├── bootstrap.css.map │ └── bootstrap.min.css └── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 └── test-classes └── it └── org └── apache └── struts2 └── rest └── example ├── GetOrdersTest.class ├── ListOrdersTest.class ├── ParameterUtils.class └── PostOrderTest.class /.idea/.name: -------------------------------------------------------------------------------- 1 | struts2-rest-showcase -------------------------------------------------------------------------------- /.idea/artifacts/struts2_rest_showcase_war.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/target 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/artifacts/struts2_rest_showcase_war_exploded.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/target/struts2-rest-showcase 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__asm_asm_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__asm_asm_commons_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__asm_asm_tree_3_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_6_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__com_thoughtworks_xstream_xstream_1_4_8.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_9_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_codec_commons_codec_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_collections_commons_collections_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_httpclient_commons_httpclient_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_io_commons_io_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_lang_commons_lang_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__commons_logging_commons_logging_1_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__dom4j_dom4j_1_6_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__htmlunit_htmlunit_1_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__javax_servlet_servlet_api_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jaxen_jaxen_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__jdom_jdom_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__junit_junit_4_12.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__nekohtml_nekohtml_0_9_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_sf_ezmorph_ezmorph_1_0_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_sf_json_lib_json_lib_jdk15_2_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_sourceforge_jwebunit_jwebunit_core_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__net_sourceforge_jwebunit_jwebunit_htmlunit_plugin_1_4_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__ognl_ognl_3_1_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_commons_commons_lang3_3_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_logging_log4j_log4j_api_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_logging_log4j_log4j_core_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_struts_struts2_config_browser_plugin_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_struts_struts2_convention_plugin_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_struts_struts2_core_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_apache_struts_struts2_rest_plugin_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_freemarker_freemarker_2_3_23.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_javassist_javassist_3_20_0_GA.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_core_4_1_6_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__org_springframework_spring_test_4_1_6_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__regexp_regexp_1_3.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__rhino_js_1_6R5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xerces_xercesImpl_2_10_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xerces_xmlParserAPIs_2_6_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xml_apis_xml_apis_1_3_02.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xmlpull_xmlpull_1_1_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/Maven__xpp3_xpp3_min_1_1_4c.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | S2-055-PoC 基于rest-show-case改造 2 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 24 | 25 | 4.0.0 26 | 27 | org.apache.struts 28 | struts2-apps 29 | 2.5 30 | 31 | 32 | struts2-rest-showcase 33 | war 34 | 2.5 35 | Struts 2 Rest Showcase Webapp 36 | Struts 2 Rest Showcase Example 37 | 38 | 39 | 40 | 41 | commons-collections 42 | commons-collections 43 | 3.1 44 | 45 | 46 | org.apache.struts 47 | struts2-rest-plugin 48 | 49 | 50 | org.apache.struts 51 | struts2-convention-plugin 52 | 53 | 54 | org.apache.struts 55 | struts2-config-browser-plugin 56 | 57 | 58 | 59 | 60 | org.apache.logging.log4j 61 | log4j-api 62 | ${log4j2.version} 63 | 64 | 65 | org.apache.logging.log4j 66 | log4j-core 67 | ${log4j2.version} 68 | 69 | 70 | 71 | junit 72 | junit 73 | test 74 | 75 | 76 | 77 | net.sourceforge.jwebunit 78 | jwebunit-core 79 | 1.4.1 80 | test 81 | 82 | 83 | commons-httpclient 84 | commons-httpclient 85 | 3.1 86 | test 87 | 88 | 89 | 90 | net.sourceforge.jwebunit 91 | jwebunit-htmlunit-plugin 92 | 1.4.1 93 | test 94 | 95 | 96 | xom 97 | xom 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | struts2-rest-showcase 106 | 107 | 108 | maven-compiler-plugin 109 | 110 | 1.5 111 | 1.5 112 | 113 | 114 | 115 | org.mortbay.jetty 116 | jetty-maven-plugin 117 | 8.1.16.v20140903 118 | 119 | CTRL+C 120 | 8999 121 | 122 | 123 | xwork.loggerFactory 124 | com.opensymphony.xwork2.util.logging.log4j2.Log4j2LoggerFactory 125 | 126 | 127 | 10 128 | ${basedir}/src/main/webapp/ 129 | 130 | /struts2-rest-showcase 131 | ${basedir}/src/main/webapp/WEB-INF/web.xml 132 | 133 | 134 | 135 | 136 | maven-surefire-plugin 137 | 138 | 139 | it/** 140 | **/*$* 141 | 142 | 143 | 144 | 145 | 146 | 147 | UTF-8 148 | 149 | 150 | -------------------------------------------------------------------------------- /src/main/java/org/demo/rest/example/IndexController.java: -------------------------------------------------------------------------------- 1 | package org.demo.rest.example; 2 | 3 | import org.apache.struts2.convention.annotation.Action; 4 | import org.apache.struts2.convention.annotation.Result; 5 | import org.apache.struts2.convention.annotation.Results; 6 | 7 | @Results({ 8 | @Result(name="success", type="redirectAction", params = {"actionName" , "orders"}) 9 | }) 10 | public class IndexController { 11 | 12 | @Action("/") 13 | public String index() { 14 | return "success"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/demo/rest/example/Order.java: -------------------------------------------------------------------------------- 1 | package org.demo.rest.example; 2 | 3 | import com.fasterxml.jackson.annotation.JsonProperty; 4 | import com.fasterxml.jackson.annotation.JsonSubTypes; 5 | import com.fasterxml.jackson.annotation.JsonTypeInfo; 6 | import org.apache.commons.lang3.builder.EqualsBuilder; 7 | import org.apache.commons.lang3.builder.HashCodeBuilder; 8 | import org.apache.commons.lang3.builder.ToStringBuilder; 9 | 10 | public class Order { 11 | public String id; 12 | @JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.WRAPPER_ARRAY) 13 | public Object clientName; 14 | public int amount; 15 | 16 | public Order() {} 17 | 18 | public Order(String id, Object clientName, int amount) { 19 | super(); 20 | this.id = id; 21 | this.clientName = clientName; 22 | this.amount = amount; 23 | } 24 | // @JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include= JsonTypeInfo.As.WRAPPER_ARRAY) 25 | /* @JsonSubTypes( 26 | @JsonSubTypes.Type(name="dog",value=Dog.class), 27 | @JsonSubTypes.Type(name="cat",value=Cat.class), 28 | )*/ 29 | /* static class Animal { // All animals have names, for our demo purposes... 30 | public String name; 31 | protected Animal() { } 32 | }*/ 33 | 34 | /* static class Dog extends Animal { 35 | public double barkVolume; // in decibels 36 | public Dog() { } 37 | } 38 | 39 | static class Cat extends Animal { 40 | boolean likesCream; 41 | public int lives; 42 | public Cat() { } 43 | }*/ 44 | 45 | 46 | public int getAmount() { 47 | return amount; 48 | } 49 | public void setAmount(int amount) { 50 | this.amount = amount; 51 | } 52 | public Object getClientName() { 53 | return clientName; 54 | } 55 | public void setClientName(Object clientName) { 56 | this.clientName = clientName; 57 | } 58 | public String getId() { 59 | return id; 60 | } 61 | public void setId(String id) { 62 | this.id = id; 63 | } 64 | 65 | @Override 66 | public boolean equals(Object obj) { 67 | if (obj == null) { 68 | return false; 69 | } 70 | if (obj == this) { 71 | return true; 72 | } 73 | if (obj.getClass() != getClass()) { 74 | return false; 75 | } 76 | Order rhs = (Order) obj; 77 | return new EqualsBuilder() 78 | .append(this.id, rhs.id) 79 | .append(this.clientName, rhs.clientName) 80 | .append(this.amount, rhs.amount) 81 | .isEquals(); 82 | } 83 | 84 | @Override 85 | public int hashCode() { 86 | return new HashCodeBuilder() 87 | .append(id) 88 | .append(clientName) 89 | .append(amount) 90 | .toHashCode(); 91 | } 92 | 93 | @Override 94 | public String toString() { 95 | return new ToStringBuilder(this) 96 | .append("id", id) 97 | .append("clientName", clientName) 98 | .append("amount", amount) 99 | .toString(); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/main/java/org/demo/rest/example/OrdersController.java: -------------------------------------------------------------------------------- 1 | package org.demo.rest.example; 2 | 3 | import java.util.Collection; 4 | 5 | import org.apache.logging.log4j.LogManager; 6 | import org.apache.logging.log4j.Logger; 7 | import org.apache.struts2.rest.DefaultHttpHeaders; 8 | import org.apache.struts2.rest.HttpHeaders; 9 | import org.apache.struts2.convention.annotation.Results; 10 | import org.apache.struts2.convention.annotation.Result; 11 | 12 | import com.opensymphony.xwork2.ModelDriven; 13 | import com.opensymphony.xwork2.Validateable; 14 | import com.opensymphony.xwork2.ValidationAwareSupport; 15 | 16 | @Results({ 17 | @Result(name="success", type="redirectAction", params = {"actionName" , "orders"}) 18 | }) 19 | public class OrdersController extends ValidationAwareSupport implements ModelDriven, Validateable{ 20 | 21 | private static final Logger log = LogManager.getLogger(OrdersController.class); 22 | 23 | private Order model = new Order(); 24 | private String id; 25 | private Collection list; 26 | private OrdersService ordersService = new OrdersService(); 27 | 28 | // GET /orders/1 29 | public HttpHeaders show() { 30 | return new DefaultHttpHeaders("show"); 31 | } 32 | 33 | // GET /orders 34 | public HttpHeaders index() { 35 | list = ordersService.getAll(); 36 | return new DefaultHttpHeaders("index") 37 | .disableCaching(); 38 | } 39 | 40 | // GET /orders/1/edit 41 | public String edit() { 42 | return "edit"; 43 | } 44 | 45 | // GET /orders/new 46 | public String editNew() { 47 | model = new Order(); 48 | return "editNew"; 49 | } 50 | 51 | // GET /orders/1/deleteConfirm 52 | public String deleteConfirm() { 53 | return "deleteConfirm"; 54 | } 55 | 56 | // DELETE /orders/1 57 | public String destroy() { 58 | log.debug("Delete order with id: {}", id); 59 | ordersService.remove(id); 60 | addActionMessage("Order removed successfully"); 61 | return "success"; 62 | } 63 | 64 | // POST /orders 65 | public HttpHeaders create() { 66 | log.debug("Create new order {}", model); 67 | ordersService.save(model); 68 | addActionMessage("New order created successfully"); 69 | return new DefaultHttpHeaders("success") 70 | .setLocationId(model.getId()); 71 | } 72 | 73 | // PUT /orders/1 74 | public String update() { 75 | ordersService.save(model); 76 | addActionMessage("Order updated successfully"); 77 | return "success"; 78 | } 79 | 80 | public void validate() { 81 | /* if (model.getClientName() == null || model.getClientName().length() ==0) { 82 | addFieldError("clientName", "The client name is empty"); 83 | }*/ 84 | } 85 | 86 | public void setId(String id) { 87 | if (id != null) { 88 | this.model = ordersService.get(id); 89 | } 90 | this.id = id; 91 | } 92 | 93 | public Object getModel() { 94 | return (list != null ? list : model); 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /src/main/java/org/demo/rest/example/OrdersService.java: -------------------------------------------------------------------------------- 1 | package org.demo.rest.example; 2 | 3 | import java.util.*; 4 | 5 | public class OrdersService { 6 | 7 | private static Map orders = new HashMap(); 8 | private static int nextId = 6; 9 | static { 10 | //orders.put("3", new Order("3", "Bob", 33)); 11 | //orders.put("4", new Order("4", "Sarah", 44)); 12 | //orders.put("5", new Order("5", "Jim", 66)); 13 | } 14 | 15 | public Order get(String id) { 16 | return orders.get(id); 17 | } 18 | 19 | public List getAll() { 20 | return new ArrayList(orders.values()); 21 | } 22 | 23 | public void save(Order order) { 24 | if (order.getId() == null) { 25 | order.setId(String.valueOf(nextId++)); 26 | } 27 | 28 | orders.put(order.getId(), order); 29 | } 30 | 31 | public void remove(String id) { 32 | orders.remove(id); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/resources/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/main/resources/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | index,show,create,update,destroy,deleteConfirm,edit,editNew 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/velocity.properties: -------------------------------------------------------------------------------- 1 | runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute 2 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/content/orders-deleteConfirm.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Delete Order ${id} 27 | 28 | 29 | 30 | 31 | Are you sure you want to delete order ${id}? 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | Back to Orders 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/content/orders-edit.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Order 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | ID 35 | 36 | 37 | 38 | 39 | 40 | Client 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Amount 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Back to Orders 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/content/orders-editNew.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | New Order 26 | 27 | 28 | 29 | 30 | 31 | 32 | Client 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Amount 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | Back to Orders 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/content/orders-index.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Orders 27 | 28 | 29 | 30 | 31 | ID 32 | Client 33 | Amount 34 | Actions 35 | 36 | 37 | 38 | ${id} 39 | 40 | 41 | 42 | 43 | View 44 | Edit 45 | Delete 46 | 47 | 48 | 49 | 50 | 51 | Create a new order 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/content/orders-show.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | Order ${id} 26 | 27 | 28 | 29 | ID 30 | 31 | 32 | 33 | Client 34 | 35 | 36 | 37 | Amount 38 | 39 | 40 | 41 | 42 | Back to Orders 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | Struts 2 Rest Example 9 | 10 | 11 | 12 | 13 | 14 | action2 15 | org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter 16 | 17 | 18 | 19 | 20 | action2 21 | /* 22 | 23 | 24 | 25 | 26 | index.jsp 27 | 28 | 29 | 30 | 31 | No direct JSP access 32 | 33 | No-JSP 34 | *.jsp 35 | 36 | 37 | no-users 38 | 39 | 40 | 41 | 42 | Don't assign users to this role 43 | no-users 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/main/webapp/css/app.css: -------------------------------------------------------------------------------- 1 | .form-group .errorMessage { 2 | list-style: none; 3 | font-weight: bold; 4 | color: red; 5 | } -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.4 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/src/main/webapp/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/src/main/webapp/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/src/main/webapp/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/src/main/webapp/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/test/java/it/org/apache/struts2/rest/example/GetOrdersTest.java: -------------------------------------------------------------------------------- 1 | package it.org.apache.struts2.rest.example; 2 | 3 | import net.sourceforge.jwebunit.junit.WebTestCase; 4 | 5 | public class GetOrdersTest extends WebTestCase { 6 | 7 | public void setUp() throws Exception { 8 | getTestContext().setBaseUrl(ParameterUtils.getBaseUrl()); 9 | } 10 | 11 | 12 | public void testGetOrders() { 13 | beginAt("/orders/3"); 14 | assertTextPresent("Bob"); 15 | assertTextNotPresent("Sarah"); 16 | } 17 | 18 | public void testGetOrdersInHtml() { 19 | beginAt("/orders/3.xhtml"); 20 | assertTextPresent("Bob"); 21 | } 22 | 23 | public void testGetOrdersInXml() { 24 | beginAt("/orders/3.xml"); 25 | assertTextPresent("Bob"); 26 | } 27 | 28 | public void testGetOrdersInJson() { 29 | beginAt("/orders/3.json"); 30 | assertTextPresent("\"clientName\":\"Bob\""); 31 | } 32 | } -------------------------------------------------------------------------------- /src/test/java/it/org/apache/struts2/rest/example/ListOrdersTest.java: -------------------------------------------------------------------------------- 1 | package it.org.apache.struts2.rest.example; 2 | 3 | import net.sourceforge.jwebunit.junit.WebTestCase; 4 | 5 | public class ListOrdersTest extends WebTestCase { 6 | 7 | public void setUp() throws Exception { 8 | getTestContext().setBaseUrl(ParameterUtils.getBaseUrl()); 9 | } 10 | 11 | 12 | public void testListOrders() { 13 | beginAt("/orders"); 14 | assertTextPresent("Bob"); 15 | assertTextPresent("Sarah"); 16 | assertTextPresent("Jim"); 17 | } 18 | 19 | public void testListOrdersInHtml() { 20 | beginAt("/orders.xhtml"); 21 | assertTextPresent("Bob"); 22 | assertTextPresent("Sarah"); 23 | assertTextPresent("Jim"); 24 | } 25 | 26 | public void testListOrdersInXml() { 27 | beginAt("/orders.xml"); 28 | assertTextPresent("Bob"); 29 | assertTextPresent("Sarah"); 30 | assertTextPresent("Jim"); 31 | } 32 | 33 | public void testListOrdersInJson() { 34 | beginAt("/orders.json"); 35 | assertTextPresent("\"clientName\":\"Bob\""); 36 | assertTextPresent("\"clientName\":\"Sarah\""); 37 | assertTextPresent("\"clientName\":\"Jim\""); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/test/java/it/org/apache/struts2/rest/example/ParameterUtils.java: -------------------------------------------------------------------------------- 1 | package it.org.apache.struts2.rest.example; 2 | 3 | public class ParameterUtils { 4 | 5 | public static String getBaseUrl() { 6 | String port = System.getProperty("http.port"); 7 | if (port == null) { 8 | port = "8080"; 9 | } 10 | return "http://localhost:"+port+"/struts2-rest-showcase"; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/test/java/it/org/apache/struts2/rest/example/PostOrderTest.java: -------------------------------------------------------------------------------- 1 | package it.org.apache.struts2.rest.example; 2 | 3 | import net.sourceforge.jwebunit.junit.WebTestCase; 4 | import org.apache.commons.httpclient.HttpClient; 5 | import org.apache.commons.httpclient.methods.PostMethod; 6 | import org.apache.commons.httpclient.methods.StringRequestEntity; 7 | 8 | import java.io.IOException; 9 | 10 | import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException; 11 | 12 | public class PostOrderTest extends WebTestCase { 13 | 14 | public void setUp() throws Exception { 15 | getTestContext().setBaseUrl(ParameterUtils.getBaseUrl()); 16 | } 17 | 18 | 19 | public void testPostOrder() { 20 | beginAt("/orders/new"); 21 | setWorkingForm(0); 22 | setTextField("clientName", "Test1"); 23 | setTextField("amount", "321"); 24 | submit(); 25 | assertTextPresent("Test1"); 26 | assertLinkNotPresentWithText("Back to Orders"); 27 | } 28 | 29 | public void testPostOrderWithErrors() { 30 | beginAt("/orders/new"); 31 | setWorkingForm(0); 32 | setTextField("amount", "321"); 33 | try { 34 | submit(); 35 | } catch (FailingHttpStatusCodeException ex) { 36 | // ignore; 37 | } 38 | assertTextPresent("client name is empty"); 39 | assertTextFieldEquals("amount", "321"); 40 | } 41 | 42 | public void testPostOrderInHtml() { 43 | beginAt("/orders/new.xhtml"); 44 | setWorkingForm(0); 45 | setTextField("clientName", "Test2"); 46 | setTextField("amount", "321"); 47 | try { 48 | submit(); 49 | } catch (FailingHttpStatusCodeException ex) { 50 | // ignore; 51 | } 52 | assertTextPresent("Test2"); 53 | assertLinkNotPresentWithText("Back to Orders"); 54 | } 55 | 56 | public void testPostOrderInXml() throws IOException { 57 | HttpClient client = new HttpClient(); 58 | PostMethod method = null; 59 | try { 60 | method = new PostMethod(ParameterUtils.getBaseUrl()+"/orders.xml"); 61 | method.setRequestEntity(new StringRequestEntity("\n" + 62 | "Test3\n" + 63 | "3342\n" + 64 | "")); 65 | client.executeMethod(method); 66 | assertEquals(201, method.getStatusCode()); 67 | assertTrue(method.getResponseHeader("Location").getValue().startsWith(ParameterUtils.getBaseUrl()+"/orders/")); 68 | } finally { 69 | method.releaseConnection(); 70 | } 71 | } 72 | 73 | public void testPostOrderInXmlWithBadData() throws IOException { 74 | HttpClient client = new HttpClient(); 75 | PostMethod method = null; 76 | try { 77 | method = new PostMethod(ParameterUtils.getBaseUrl()+"/orders.xml"); 78 | method.setRequestEntity(new StringRequestEntity("\n" + 79 | "3342\n" + 80 | "")); 81 | client.executeMethod(method); 82 | assertEquals(400, method.getStatusCode()); 83 | String response = method.getResponseBodyAsString(); 84 | assertTrue(response.contains("The client name is empty")); 85 | assertNull(method.getResponseHeader("Location")); 86 | } finally { 87 | method.releaseConnection(); 88 | } 89 | } 90 | 91 | public void testPostOrderInJson() throws IOException { 92 | HttpClient client = new HttpClient(); 93 | PostMethod method = null; 94 | try { 95 | method = new PostMethod(ParameterUtils.getBaseUrl()+"/orders.json"); 96 | method.setRequestEntity(new StringRequestEntity("{\"amount\":33,\"clientName\":\"Test4\"}")); 97 | client.executeMethod(method); 98 | assertEquals(201, method.getStatusCode()); 99 | assertTrue(method.getResponseHeader("Location").getValue().startsWith(ParameterUtils.getBaseUrl()+"/orders/")); 100 | } finally { 101 | method.releaseConnection(); 102 | } 103 | } 104 | 105 | public void testPostOrderInJsonWithBadData() throws IOException { 106 | HttpClient client = new HttpClient(); 107 | PostMethod method = null; 108 | try { 109 | method = new PostMethod(ParameterUtils.getBaseUrl()+"/orders.json"); 110 | method.setRequestEntity(new StringRequestEntity("{\"amount\":33}")); 111 | client.executeMethod(method); 112 | String response = method.getResponseBodyAsString(); 113 | assertEquals(400, method.getStatusCode()); 114 | 115 | assertEquals("{\"actionErrors\":[],\"fieldErrors\":{\"clientName\":[\"The client name is empty\"]}}", response); 116 | assertNull(method.getResponseHeader("Location")); 117 | } finally { 118 | method.releaseConnection(); 119 | } 120 | } 121 | } -------------------------------------------------------------------------------- /struts2-rest-showcase.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /target/.plxarc: -------------------------------------------------------------------------------- 1 | maven-shared-archive-resources -------------------------------------------------------------------------------- /target/antrun/build-main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /target/classes/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /target/classes/org/demo/rest/example/IndexController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/classes/org/demo/rest/example/IndexController.class -------------------------------------------------------------------------------- /target/classes/org/demo/rest/example/Order.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/classes/org/demo/rest/example/Order.class -------------------------------------------------------------------------------- /target/classes/org/demo/rest/example/OrdersController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/classes/org/demo/rest/example/OrdersController.class -------------------------------------------------------------------------------- /target/classes/org/demo/rest/example/OrdersService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/classes/org/demo/rest/example/OrdersService.class -------------------------------------------------------------------------------- /target/classes/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | index,show,create,update,destroy,deleteConfirm,edit,editNew 44 | 45 | -------------------------------------------------------------------------------- /target/classes/velocity.properties: -------------------------------------------------------------------------------- 1 | runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute 2 | -------------------------------------------------------------------------------- /target/maven-archiver/pom.properties: -------------------------------------------------------------------------------- 1 | #Generated by Maven 2 | #Tue Sep 05 23:17:10 CST 2017 3 | version=2.5 4 | groupId=org.apache.struts 5 | artifactId=struts2-rest-showcase 6 | -------------------------------------------------------------------------------- /target/maven-shared-archive-resources/META-INF/DEPENDENCIES: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------ 2 | // Transitive dependencies of this project determined from the 3 | // maven pom organized by organization. 4 | // ------------------------------------------------------------------ 5 | 6 | Struts 2 Rest Showcase Webapp 7 | 8 | 9 | From: 'an unknown organization' 10 | - ezmorph (http://ezmorph.sourceforge.net) net.sf.ezmorph:ezmorph:jar:1.0.6 11 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 12 | - FreeMarker (http://freemarker.org/) org.freemarker:freemarker:jar:2.3.23 13 | License: Apache License, Version 2.0 (http://freemarker.org/LICENSE.txt) 14 | - XML Pull Parsing API (http://www.xmlpull.org) xmlpull:xmlpull:jar:1.1.3.1 15 | License: Public Domain (http://www.xmlpull.org/v1/download/unpacked/LICENSE.txt) 16 | 17 | From: 'Apache Software Foundation' (http://www.apache.org) 18 | - Apache Log4j API (http://logging.apache.org/log4j/2.x/log4j-api/) org.apache.logging.log4j:log4j-api:jar:2.5 19 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 20 | - Apache Log4j Core (http://logging.apache.org/log4j/2.x/log4j-core/) org.apache.logging.log4j:log4j-core:jar:2.5 21 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 22 | - Struts 2 Configuration Browser Plugin (http://struts.apache.org/struts2-plugins/struts2-config-browser-plugin/) org.apache.struts:struts2-config-browser-plugin:jar:2.5 23 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 24 | - Struts 2 Convention Plugin (http://struts.apache.org/struts2-plugins/struts2-convention-plugin/) org.apache.struts:struts2-convention-plugin:jar:2.5 25 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 26 | - Struts 2 Core (http://struts.apache.org/struts2-core/) org.apache.struts:struts2-core:jar:2.5 27 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 28 | - Struts 2 REST Plugin (http://struts.apache.org/struts2-plugins/struts2-rest-plugin/) org.apache.struts:struts2-rest-plugin:jar:2.5 29 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 30 | 31 | From: 'Extreme! Lab, Indiana University' (http://www.extreme.indiana.edu/) 32 | - MXP1: Xml Pull Parser 3rd Edition (XPP3) (http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/) xpp3:xpp3_min:jar:1.1.4c 33 | License: Indiana University Extreme! Lab Software License, vesion 1.1.1 (http://www.extreme.indiana.edu/viewcvs/~checkout~/XPP3/java/LICENSE.txt) License: Public Domain (http://creativecommons.org/licenses/publicdomain) 34 | 35 | From: 'FasterXML' (http://fasterxml.com/) 36 | - Jackson-annotations (http://github.com/FasterXML/jackson) com.fasterxml.jackson.core:jackson-annotations:bundle:2.6.0 37 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 38 | - Jackson-core (https://github.com/FasterXML/jackson-core) com.fasterxml.jackson.core:jackson-core:bundle:2.6.1 39 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 40 | - jackson-databind (http://github.com/FasterXML/jackson) com.fasterxml.jackson.core:jackson-databind:bundle:2.6.1 41 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 42 | 43 | From: 'Json-lib' (http://json-lib.sourceforge.net) 44 | - json-lib (http://json-lib.sourceforge.net) net.sf.json-lib:json-lib:jar:2.3 45 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 46 | 47 | From: 'ObjectWeb' (http://www.objectweb.org/) 48 | - ASM Core (http://asm.objectweb.org/asm/) asm:asm:jar:3.3 49 | License: BSD (http://asm.objectweb.org/license.html) 50 | - ASM Commons (http://asm.objectweb.org/asm-commons/) asm:asm-commons:jar:3.3 51 | License: BSD (http://asm.objectweb.org/license.html) 52 | - ASM Tree (http://asm.objectweb.org/asm-tree/) asm:asm-tree:jar:3.3 53 | License: BSD (http://asm.objectweb.org/license.html) 54 | 55 | From: 'OpenSymphony' (http://www.opensymphony.com) 56 | - OGNL - Object Graph Navigation Library (http://ognl.org) ognl:ognl:jar:3.1.4 57 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 58 | 59 | From: 'Shigeru Chiba, www.javassist.org' 60 | - Javassist (http://www.javassist.org/) org.javassist:javassist:bundle:3.20.0-GA 61 | License: MPL 1.1 (http://www.mozilla.org/MPL/MPL-1.1.html) License: LGPL 2.1 (http://www.gnu.org/licenses/lgpl-2.1.html) License: Apache License 2.0 (http://www.apache.org/licenses/) 62 | 63 | From: 'The Apache Software Foundation' (http://www.apache.org/) 64 | - Apache Commons BeanUtils (http://commons.apache.org/proper/commons-beanutils/) commons-beanutils:commons-beanutils:jar:1.9.2 65 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 66 | - Apache Commons Collections (http://commons.apache.org/collections/) commons-collections:commons-collections:jar:3.2.2 67 | License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 68 | - Apache Commons FileUpload (http://commons.apache.org/proper/commons-fileupload/) commons-fileupload:commons-fileupload:jar:1.3.1 69 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 70 | - Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:2.4 71 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 72 | - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.4 73 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 74 | - Commons Logging (http://commons.apache.org/proper/commons-logging/) commons-logging:commons-logging:jar:1.1.3 75 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 76 | - Apache Commons Lang (http://commons.apache.org/proper/commons-lang/) org.apache.commons:commons-lang3:jar:3.4 77 | License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 78 | 79 | From: 'XStream' (http://xstream.codehaus.org) 80 | - XStream Core (http://codehaus.org/xstream-parent/xstream/) com.thoughtworks.xstream:xstream:jar:1.4.8 81 | License: BSD style (http://xstream.codehaus.org/license.html) 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /target/maven-shared-archive-resources/META-INF/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /target/maven-shared-archive-resources/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | 2 | Struts 2 Rest Showcase Webapp 3 | Copyright 2000-2017 Apache Software Foundation 4 | 5 | This product includes software developed at 6 | The Apache Software Foundation (http://www.apache.org/). 7 | 8 | 9 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | D:\java\struts2-052\struts-2.5-all\struts-2.5\src\apps\rest-showcase\src\main\java\org\demo\rest\example\OrdersService.java 2 | D:\java\struts2-052\struts-2.5-all\struts-2.5\src\apps\rest-showcase\src\main\java\org\demo\rest\example\OrdersController.java 3 | D:\java\struts2-052\struts-2.5-all\struts-2.5\src\apps\rest-showcase\src\main\java\org\demo\rest\example\Order.java 4 | D:\java\struts2-052\struts-2.5-all\struts-2.5\src\apps\rest-showcase\src\main\java\org\demo\rest\example\IndexController.java 5 | -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst -------------------------------------------------------------------------------- /target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst: -------------------------------------------------------------------------------- 1 | D:\java\struts2-052\struts-2.5-all\struts-2.5\src\apps\rest-showcase\src\test\java\it\org\apache\struts2\rest\example\ParameterUtils.java 2 | D:\java\struts2-052\struts-2.5-all\struts-2.5\src\apps\rest-showcase\src\test\java\it\org\apache\struts2\rest\example\ListOrdersTest.java 3 | D:\java\struts2-052\struts-2.5-all\struts-2.5\src\apps\rest-showcase\src\test\java\it\org\apache\struts2\rest\example\GetOrdersTest.java 4 | D:\java\struts2-052\struts-2.5-all\struts-2.5\src\apps\rest-showcase\src\test\java\it\org\apache\struts2\rest\example\PostOrderTest.java 5 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase-sources.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase.war: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase.war -------------------------------------------------------------------------------- /target/struts2-rest-showcase/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Built-By: liaoxinxi 3 | Created-By: IntelliJ IDEA 4 | Build-Jdk: 1.7.0_05 5 | 6 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/META-INF/DEPENDENCIES: -------------------------------------------------------------------------------- 1 | // ------------------------------------------------------------------ 2 | // Transitive dependencies of this project determined from the 3 | // maven pom organized by organization. 4 | // ------------------------------------------------------------------ 5 | 6 | Struts 2 Rest Showcase Webapp 7 | 8 | 9 | From: 'an unknown organization' 10 | - ezmorph (http://ezmorph.sourceforge.net) net.sf.ezmorph:ezmorph:jar:1.0.6 11 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 12 | - FreeMarker (http://freemarker.org/) org.freemarker:freemarker:jar:2.3.23 13 | License: Apache License, Version 2.0 (http://freemarker.org/LICENSE.txt) 14 | - XML Pull Parsing API (http://www.xmlpull.org) xmlpull:xmlpull:jar:1.1.3.1 15 | License: Public Domain (http://www.xmlpull.org/v1/download/unpacked/LICENSE.txt) 16 | 17 | From: 'Apache Software Foundation' (http://www.apache.org) 18 | - Apache Log4j API (http://logging.apache.org/log4j/2.x/log4j-api/) org.apache.logging.log4j:log4j-api:jar:2.5 19 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 20 | - Apache Log4j Core (http://logging.apache.org/log4j/2.x/log4j-core/) org.apache.logging.log4j:log4j-core:jar:2.5 21 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 22 | - Struts 2 Configuration Browser Plugin (http://struts.apache.org/struts2-plugins/struts2-config-browser-plugin/) org.apache.struts:struts2-config-browser-plugin:jar:2.5 23 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 24 | - Struts 2 Convention Plugin (http://struts.apache.org/struts2-plugins/struts2-convention-plugin/) org.apache.struts:struts2-convention-plugin:jar:2.5 25 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 26 | - Struts 2 Core (http://struts.apache.org/struts2-core/) org.apache.struts:struts2-core:jar:2.5 27 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 28 | - Struts 2 REST Plugin (http://struts.apache.org/struts2-plugins/struts2-rest-plugin/) org.apache.struts:struts2-rest-plugin:jar:2.5 29 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 30 | 31 | From: 'Extreme! Lab, Indiana University' (http://www.extreme.indiana.edu/) 32 | - MXP1: Xml Pull Parser 3rd Edition (XPP3) (http://www.extreme.indiana.edu/xgws/xsoap/xpp/mxp1/) xpp3:xpp3_min:jar:1.1.4c 33 | License: Indiana University Extreme! Lab Software License, vesion 1.1.1 (http://www.extreme.indiana.edu/viewcvs/~checkout~/XPP3/java/LICENSE.txt) License: Public Domain (http://creativecommons.org/licenses/publicdomain) 34 | 35 | From: 'FasterXML' (http://fasterxml.com/) 36 | - Jackson-annotations (http://github.com/FasterXML/jackson) com.fasterxml.jackson.core:jackson-annotations:bundle:2.6.0 37 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 38 | - Jackson-core (https://github.com/FasterXML/jackson-core) com.fasterxml.jackson.core:jackson-core:bundle:2.6.1 39 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 40 | - jackson-databind (http://github.com/FasterXML/jackson) com.fasterxml.jackson.core:jackson-databind:bundle:2.6.1 41 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 42 | 43 | From: 'Json-lib' (http://json-lib.sourceforge.net) 44 | - json-lib (http://json-lib.sourceforge.net) net.sf.json-lib:json-lib:jar:2.3 45 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 46 | 47 | From: 'ObjectWeb' (http://www.objectweb.org/) 48 | - ASM Core (http://asm.objectweb.org/asm/) asm:asm:jar:3.3 49 | License: BSD (http://asm.objectweb.org/license.html) 50 | - ASM Commons (http://asm.objectweb.org/asm-commons/) asm:asm-commons:jar:3.3 51 | License: BSD (http://asm.objectweb.org/license.html) 52 | - ASM Tree (http://asm.objectweb.org/asm-tree/) asm:asm-tree:jar:3.3 53 | License: BSD (http://asm.objectweb.org/license.html) 54 | 55 | From: 'OpenSymphony' (http://www.opensymphony.com) 56 | - OGNL - Object Graph Navigation Library (http://ognl.org) ognl:ognl:jar:3.1.4 57 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 58 | 59 | From: 'Shigeru Chiba, www.javassist.org' 60 | - Javassist (http://www.javassist.org/) org.javassist:javassist:bundle:3.20.0-GA 61 | License: MPL 1.1 (http://www.mozilla.org/MPL/MPL-1.1.html) License: LGPL 2.1 (http://www.gnu.org/licenses/lgpl-2.1.html) License: Apache License 2.0 (http://www.apache.org/licenses/) 62 | 63 | From: 'The Apache Software Foundation' (http://www.apache.org/) 64 | - Apache Commons BeanUtils (http://commons.apache.org/proper/commons-beanutils/) commons-beanutils:commons-beanutils:jar:1.9.2 65 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 66 | - Apache Commons Collections (http://commons.apache.org/collections/) commons-collections:commons-collections:jar:3.2.2 67 | License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 68 | - Apache Commons FileUpload (http://commons.apache.org/proper/commons-fileupload/) commons-fileupload:commons-fileupload:jar:1.3.1 69 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 70 | - Commons IO (http://commons.apache.org/io/) commons-io:commons-io:jar:2.4 71 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 72 | - Commons Lang (http://commons.apache.org/lang/) commons-lang:commons-lang:jar:2.4 73 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 74 | - Commons Logging (http://commons.apache.org/proper/commons-logging/) commons-logging:commons-logging:jar:1.1.3 75 | License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 76 | - Apache Commons Lang (http://commons.apache.org/proper/commons-lang/) org.apache.commons:commons-lang3:jar:3.4 77 | License: Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) 78 | 79 | From: 'XStream' (http://xstream.codehaus.org) 80 | - XStream Core (http://codehaus.org/xstream-parent/xstream/) com.thoughtworks.xstream:xstream:jar:1.4.8 81 | License: BSD style (http://xstream.codehaus.org/license.html) 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/META-INF/LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/META-INF/NOTICE: -------------------------------------------------------------------------------- 1 | 2 | Struts 2 Rest Showcase Webapp 3 | Copyright 2000-2017 Apache Software Foundation 4 | 5 | This product includes software developed at 6 | The Apache Software Foundation (http://www.apache.org/). 7 | 8 | 9 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/org/demo/rest/example/IndexController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/classes/org/demo/rest/example/IndexController.class -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/org/demo/rest/example/Order.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/classes/org/demo/rest/example/Order.class -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/org/demo/rest/example/OrdersController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/classes/org/demo/rest/example/OrdersController.class -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/org/demo/rest/example/OrdersService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/classes/org/demo/rest/example/OrdersService.class -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | index,show,create,update,destroy,deleteConfirm,edit,editNew 44 | 45 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/classes/velocity.properties: -------------------------------------------------------------------------------- 1 | runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute 2 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/content/orders-deleteConfirm.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Delete Order ${id} 27 | 28 | 29 | 30 | 31 | Are you sure you want to delete order ${id}? 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | Back to Orders 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/content/orders-edit.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Order 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | ID 35 | 36 | 37 | 38 | 39 | 40 | Client 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Amount 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | Back to Orders 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/content/orders-editNew.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | New Order 26 | 27 | 28 | 29 | 30 | 31 | 32 | Client 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | Amount 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | Back to Orders 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/content/orders-index.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | Orders 27 | 28 | 29 | 30 | 31 | ID 32 | Client 33 | Amount 34 | Actions 35 | 36 | 37 | 38 | ${id} 39 | 40 | 41 | 42 | 43 | View 44 | Edit 45 | Delete 46 | 47 | 48 | 49 | 50 | 51 | Create a new order 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/content/orders-show.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@taglib prefix="s" uri="/struts-tags" %> 3 | 4 | 5 | 6 | 7 | 8 | 9 | Orders 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | Order ${id} 26 | 27 | 28 | 29 | ID 30 | 31 | 32 | 33 | Client 34 | 35 | 36 | 37 | Amount 38 | 39 | 40 | 41 | 42 | Back to Orders 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/asm-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/asm-3.3.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/asm-commons-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/asm-commons-3.3.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/asm-tree-3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/asm-tree-3.3.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/commons-beanutils-1.9.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/commons-beanutils-1.9.2.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/commons-collections-3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/commons-collections-3.1.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/commons-fileupload-1.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/commons-fileupload-1.3.1.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/commons-io-2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/commons-io-2.4.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/commons-lang-2.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/commons-lang-2.4.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/commons-lang3-3.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/commons-lang3-3.4.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/commons-logging-1.1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/commons-logging-1.1.3.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/ezmorph-1.0.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/ezmorph-1.0.6.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/freemarker-2.3.23.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/freemarker-2.3.23.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/jackson-annotations-2.6.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/jackson-annotations-2.6.0.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/jackson-core-2.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/jackson-core-2.6.1.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/jackson-databind-2.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/jackson-databind-2.6.1.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/javassist-3.20.0-GA.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/javassist-3.20.0-GA.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/json-lib-2.3-jdk15.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/json-lib-2.3-jdk15.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/log4j-api-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/log4j-api-2.5.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/log4j-core-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/log4j-core-2.5.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/ognl-3.1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/ognl-3.1.4.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/struts2-config-browser-plugin-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/struts2-config-browser-plugin-2.5.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/struts2-convention-plugin-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/struts2-convention-plugin-2.5.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/struts2-core-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/struts2-core-2.5.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/struts2-rest-plugin-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/struts2-rest-plugin-2.5.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/xmlpull-1.1.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/xmlpull-1.1.3.1.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/xpp3_min-1.1.4c.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/xpp3_min-1.1.4c.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/lib/xstream-1.4.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/WEB-INF/lib/xstream-1.4.8.jar -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/src/java/log4j2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/src/java/org/demo/rest/example/IndexController.java: -------------------------------------------------------------------------------- 1 | package org.demo.rest.example; 2 | 3 | import org.apache.struts2.convention.annotation.Action; 4 | import org.apache.struts2.convention.annotation.Result; 5 | import org.apache.struts2.convention.annotation.Results; 6 | 7 | @Results({ 8 | @Result(name="success", type="redirectAction", params = {"actionName" , "orders"}) 9 | }) 10 | public class IndexController { 11 | 12 | @Action("/") 13 | public String index() { 14 | return "success"; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/src/java/org/demo/rest/example/Order.java: -------------------------------------------------------------------------------- 1 | package org.demo.rest.example; 2 | 3 | import org.apache.commons.lang3.builder.EqualsBuilder; 4 | import org.apache.commons.lang3.builder.HashCodeBuilder; 5 | import org.apache.commons.lang3.builder.ToStringBuilder; 6 | 7 | public class Order { 8 | String id; 9 | String clientName; 10 | int amount; 11 | 12 | public Order() {} 13 | 14 | public Order(String id, String clientName, int amount) { 15 | super(); 16 | this.id = id; 17 | this.clientName = clientName; 18 | this.amount = amount; 19 | } 20 | public int getAmount() { 21 | return amount; 22 | } 23 | public void setAmount(int amount) { 24 | this.amount = amount; 25 | } 26 | public String getClientName() { 27 | return clientName; 28 | } 29 | public void setClientName(String clientName) { 30 | this.clientName = clientName; 31 | } 32 | public String getId() { 33 | return id; 34 | } 35 | public void setId(String id) { 36 | this.id = id; 37 | } 38 | 39 | @Override 40 | public boolean equals(Object obj) { 41 | if (obj == null) { 42 | return false; 43 | } 44 | if (obj == this) { 45 | return true; 46 | } 47 | if (obj.getClass() != getClass()) { 48 | return false; 49 | } 50 | Order rhs = (Order) obj; 51 | return new EqualsBuilder() 52 | .append(this.id, rhs.id) 53 | .append(this.clientName, rhs.clientName) 54 | .append(this.amount, rhs.amount) 55 | .isEquals(); 56 | } 57 | 58 | @Override 59 | public int hashCode() { 60 | return new HashCodeBuilder() 61 | .append(id) 62 | .append(clientName) 63 | .append(amount) 64 | .toHashCode(); 65 | } 66 | 67 | @Override 68 | public String toString() { 69 | return new ToStringBuilder(this) 70 | .append("id", id) 71 | .append("clientName", clientName) 72 | .append("amount", amount) 73 | .toString(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/src/java/org/demo/rest/example/OrdersController.java: -------------------------------------------------------------------------------- 1 | package org.demo.rest.example; 2 | 3 | import java.util.Collection; 4 | 5 | import org.apache.logging.log4j.LogManager; 6 | import org.apache.logging.log4j.Logger; 7 | import org.apache.struts2.rest.DefaultHttpHeaders; 8 | import org.apache.struts2.rest.HttpHeaders; 9 | import org.apache.struts2.convention.annotation.Results; 10 | import org.apache.struts2.convention.annotation.Result; 11 | 12 | import com.opensymphony.xwork2.ModelDriven; 13 | import com.opensymphony.xwork2.Validateable; 14 | import com.opensymphony.xwork2.ValidationAwareSupport; 15 | 16 | @Results({ 17 | @Result(name="success", type="redirectAction", params = {"actionName" , "orders"}) 18 | }) 19 | public class OrdersController extends ValidationAwareSupport implements ModelDriven, Validateable{ 20 | 21 | private static final Logger log = LogManager.getLogger(OrdersController.class); 22 | 23 | private Order model = new Order(); 24 | private String id; 25 | private Collection list; 26 | private OrdersService ordersService = new OrdersService(); 27 | 28 | // GET /orders/1 29 | public HttpHeaders show() { 30 | return new DefaultHttpHeaders("show"); 31 | } 32 | 33 | // GET /orders 34 | public HttpHeaders index() { 35 | list = ordersService.getAll(); 36 | return new DefaultHttpHeaders("index") 37 | .disableCaching(); 38 | } 39 | 40 | // GET /orders/1/edit 41 | public String edit() { 42 | return "edit"; 43 | } 44 | 45 | // GET /orders/new 46 | public String editNew() { 47 | model = new Order(); 48 | return "editNew"; 49 | } 50 | 51 | // GET /orders/1/deleteConfirm 52 | public String deleteConfirm() { 53 | return "deleteConfirm"; 54 | } 55 | 56 | // DELETE /orders/1 57 | public String destroy() { 58 | log.debug("Delete order with id: {}", id); 59 | ordersService.remove(id); 60 | addActionMessage("Order removed successfully"); 61 | return "success"; 62 | } 63 | 64 | // POST /orders 65 | public HttpHeaders create() { 66 | log.debug("Create new order {}", model); 67 | ordersService.save(model); 68 | addActionMessage("New order created successfully"); 69 | return new DefaultHttpHeaders("success") 70 | .setLocationId(model.getId()); 71 | } 72 | 73 | // PUT /orders/1 74 | public String update() { 75 | ordersService.save(model); 76 | addActionMessage("Order updated successfully"); 77 | return "success"; 78 | } 79 | 80 | public void validate() { 81 | if (model.getClientName() == null || model.getClientName().length() ==0) { 82 | addFieldError("clientName", "The client name is empty"); 83 | } 84 | } 85 | 86 | public void setId(String id) { 87 | if (id != null) { 88 | this.model = ordersService.get(id); 89 | } 90 | this.id = id; 91 | } 92 | 93 | public Object getModel() { 94 | return (list != null ? list : model); 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/src/java/org/demo/rest/example/OrdersService.java: -------------------------------------------------------------------------------- 1 | package org.demo.rest.example; 2 | 3 | import java.util.*; 4 | 5 | public class OrdersService { 6 | 7 | private static Map orders = new HashMap(); 8 | private static int nextId = 6; 9 | static { 10 | orders.put("3", new Order("3", "Bob", 33)); 11 | orders.put("4", new Order("4", "Sarah", 44)); 12 | orders.put("5", new Order("5", "Jim", 66)); 13 | } 14 | 15 | public Order get(String id) { 16 | return orders.get(id); 17 | } 18 | 19 | public List getAll() { 20 | return new ArrayList(orders.values()); 21 | } 22 | 23 | public void save(Order order) { 24 | if (order.getId() == null) { 25 | order.setId(String.valueOf(nextId++)); 26 | } 27 | 28 | orders.put(order.getId(), order); 29 | } 30 | 31 | public void remove(String id) { 32 | orders.remove(id); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/src/java/struts.xml: -------------------------------------------------------------------------------- 1 | 2 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | index,show,create,update,destroy,deleteConfirm,edit,editNew 39 | 40 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/src/java/velocity.properties: -------------------------------------------------------------------------------- 1 | runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogChute 2 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | Struts 2 Rest Example 9 | 10 | 11 | 12 | 13 | 14 | action2 15 | org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter 16 | 17 | 18 | 19 | 20 | action2 21 | /* 22 | 23 | 24 | 25 | 26 | index.jsp 27 | 28 | 29 | 30 | 31 | No direct JSP access 32 | 33 | No-JSP 34 | *.jsp 35 | 36 | 37 | no-users 38 | 39 | 40 | 41 | 42 | Don't assign users to this role 43 | no-users 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /target/struts2-rest-showcase/css/app.css: -------------------------------------------------------------------------------- 1 | .form-group .errorMessage { 2 | list-style: none; 3 | font-weight: bold; 4 | color: red; 5 | } -------------------------------------------------------------------------------- /target/struts2-rest-showcase/css/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.4 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#dbdbdb;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} -------------------------------------------------------------------------------- /target/struts2-rest-showcase/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /target/struts2-rest-showcase/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /target/struts2-rest-showcase/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /target/struts2-rest-showcase/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/struts2-rest-showcase/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /target/test-classes/it/org/apache/struts2/rest/example/GetOrdersTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/test-classes/it/org/apache/struts2/rest/example/GetOrdersTest.class -------------------------------------------------------------------------------- /target/test-classes/it/org/apache/struts2/rest/example/ListOrdersTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/test-classes/it/org/apache/struts2/rest/example/ListOrdersTest.class -------------------------------------------------------------------------------- /target/test-classes/it/org/apache/struts2/rest/example/ParameterUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/test-classes/it/org/apache/struts2/rest/example/ParameterUtils.class -------------------------------------------------------------------------------- /target/test-classes/it/org/apache/struts2/rest/example/PostOrderTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shengqi158/S2-055-PoC/8a13e35d262a554701a5cf3a984176e2854eefb8/target/test-classes/it/org/apache/struts2/rest/example/PostOrderTest.class --------------------------------------------------------------------------------
31 | Are you sure you want to delete order ${id}? 32 |