1 Reply Latest reply on Jan 14, 2010 12:20 PM by Stan Silvert

    WAS 6.1 Testing Secured Pages using Basic Authentication

    Rudy Ludena Newbie

      I am looking for an example of how to to test secured pages on Websphere using BasicAuthenticationStrategy.

      I have tried unsuccessfully to override the BasicAuthenticationStrategy as shown below. any help would be greatly appreciated.

      public class WebsphereRequestStrategy extends
      org.jboss.jsfunit.framework.BasicAuthenticationStrategy {

      public WebsphereRequestStrategy(String userName, String passWord) {

      super(userName, passWord);


      public Page doInitialRequest(WebClientSpec wcSpec) throws IOException {

      String jsessionid = wcSpec.removeCookie("JSESSIONID");
      wcSpec.addCookie("JSESSIONID", "0000" + jsessionid); // cache ID is 0000 by default

      return super.doInitialRequest(wcSpec);