Class secformClient

java.lang.Object
com.sun.ts.lib.harness.EETest
com.sun.ts.tests.common.jspservletsec.secformClient
All Implemented Interfaces:
Serializable

public class secformClient extends EETest
See Also:
  • Field Details

    • pageBase

      protected String pageBase
    • pageSec

      protected String pageSec
    • pageGuest

      protected String pageGuest
    • pageRoleReverse

      protected String pageRoleReverse
    • pageUnprotected

      protected String pageUnprotected
  • Constructor Details

    • secformClient

      public secformClient()
  • Method Details

    • setup

      public void setup(String[] args, Properties p) throws Exception
      Throws:
      Exception
    • test1

      public void test1() throws Exception
      Throws:
      Exception
    • test2

      public void test2() throws Exception
      Throws:
      Exception
    • test3

      public void test3() throws Exception
      Throws:
      Exception
    • test4

      public void test4() throws Exception
      Throws:
      Exception
    • test5

      public void test5() throws Exception
      Throws:
      Exception
    • test6

      public void test6() throws Exception
      Throws:
      Exception
    • test7

      public void test7()
    • test8

      public void test8() throws Exception
      Throws:
      Exception
    • test9

      public void test9() throws Exception
      Throws:
      Exception
    • test10

      public void test10() throws Exception
      Throws:
      Exception
    • test11

      public void test11() throws Exception
      Throws:
      Exception
    • test12

      public void test12() throws Exception
      Throws:
      Exception
    • test13

      public void test13() throws Exception
      Throws:
      Exception
    • test14

      public void test14() throws Exception
      Throws:
      Exception
    • test15

      public void test15() throws Exception
      Throws:
      Exception
    • test16

      public void test16() throws Exception
      Throws:
      Exception
    • test17

      public void test17() throws Exception
      Throws:
      Exception
    • test18

      public void test18() throws Exception
      Throws:
      Exception
    • uploadUsingHttpMethodPUT

      public static WebUtil.Response uploadUsingHttpMethodPUT(String method, InetAddress addr, int port, String req, byte[] postData, Hashtable cookieList, String username, String password) throws IOException
      Uploads data from a byteArray to an URL. A WebUtil.Response object is returned with the response information.
      Parameters:
      method - http method "PUT"
      addr - Address of web server
      port - Port of web server
      req - The file to request (e.g. /jsp_dep_secContextRoot/jspSec.jsp)
      postData - is a byteArray which contains the data to be posted
      cookieList - A list of cookies to send when requesting the page. null if no cookie list is to be sent.
      username - The username for authentication, null if no authentication required.
      password - The password for authentication, null if no authentication required.
      Returns:
      WebUtil.Response object containing response information
      Throws:
      IOException - Thrown if request could not be made
    • cleanup

      public void cleanup() throws Exception
      Throws:
      Exception
    • followRedirect

      public WebUtil.Response followRedirect(WebUtil.Response response, int testNum) throws Exception
      Helper method that is used in tests 1, 2, 3, 5 and 6. Performs the following actions: 1. Checks whether the response.statusToken==302 or 301 if(response.statusToken==302) || (response.statusToken==301) send request to redirected URL 2. Returns Response object
      Parameters:
      response - The initial page response
      testNum - The test number for correct display of error messages.
      Throws:
      Exception
    • addNewCookies

      public void addNewCookies(Hashtable oldCookies, Hashtable newCookies)
      Helper method that is used to update cookies This helper method retrieves cookies from "newCookies" hashtable and updates it to "oldCookies" hashtable
      Parameters:
      oldCookies - Hashtable containing original cookies
      newCookies - Hashtable containing new cookies error messages.