|
Struts example source code file (StaticContentTest.java)
The Struts StaticContentTest.java source codepackage it.org.apache.struts2.showcase.staticcontent; import it.org.apache.struts2.showcase.ITBaseTest; import java.io.IOException; import net.sourceforge.jwebunit.exception.TestingEngineResponseException; public class StaticContentTest extends ITBaseTest { public void testInvalidRersources1() throws IOException { try { beginAt("/struts.."); fail("Previous request should have failed"); } catch (TestingEngineResponseException ex) { // ok } } public void testInvalidRersources2() throws IOException { try { beginAt("/struts/..%252f"); fail("Previous request should have failed"); } catch (TestingEngineResponseException ex) { // ok } } /*public void testInvalidRersources3() throws IOException { try { beginAt("/struts/..%252f..%252f..%252fWEB-INF/classes/org/apache/struts2/showcase/action/EmployeeAction.class/"); fail("Previous request should have failed"); } catch (TestingEngineResponseException ex) { // ok } }*/ } Other Struts examples (source code examples)Here is a short list of links related to this Struts StaticContentTest.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.