<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Christian,<br>
<br>
You need to look at this wiki page for JSFUnit on WebSphere:<br>
<a class="moz-txt-link-freetext" href="http://wiki.jboss.org/auth/wiki/JSFUnitOnWebSphere">http://wiki.jboss.org/auth/wiki/JSFUnitOnWebSphere</a><br>
<br>
You'll need to subclass FormAuthenticationStrategy.<br>
<br>
BTW, this mailing list is for JSFUnit developers and not for user
questions.&nbsp; Please post further questions and comments to the forum
page here:<br>
<a class="moz-txt-link-freetext" href="http://www.jboss.com/index.html?module=bb&op=viewforum&f=269">http://www.jboss.com/index.html?module=bb&amp;op=viewforum&amp;f=269</a><br>
<br>
Thanks,<br>
<br>
Stan<br>
<br>
Christian Achilli wrote:
<blockquote
 cite="mid:cccc41740809100849r67835771vb97d653f02e7a652@mail.gmail.com"
 type="cite">
  <div dir="ltr">Hallo, <br>
  <br>
I trying to test my webapp running on websphere 6.1. The application
requires form authentication.<br>
The issue is that I cannot refer to the faces context from the jsfunit
session. In the log i see the message:<br>
  <b><br>
SessionContext.getIHttpSession: id ERIqL_LOZbBuMJRLxbpTVCE failed
length check against 27</b><br>
  <br>
This message make me think that another session cookie is generated
after the WebConversationFactory.makeWebClient call and this one is not
added to the list.<br>
  <br>
My client test code is as follow:<br>
&nbsp;<br>
&nbsp;public void testInitialPage() throws IOException, SAXException<br>
&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; WebClientSpec wcSpec = new
WebClientSpec("/homePage.faces",BrowserVersion.INTERNET_EXPLORER_7_0);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; wcSpec.getWebClient().setThrowExceptionOnScriptError(false);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; FormAuthenticationStrategy formAuth = new
FormAuthenticationStrategy("appl2", "appl2");<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; formAuth.setSubmitComponent("login_button");<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; wcSpec.setInitialRequestStrategy(formAuth);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; JSFSession jsfSession = new JSFSession(wcSpec);<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; wcSpec.addCookie("JSESSIONID", session.getId());<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; WebWindow currentWindow =
jsfSession.getWebClient().getCurrentWindow();// sono in chooseRole<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; System.out.println("Pagina corrente: "+currentWindow.getName());<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; JSFClientSession client = jsfSession.getJSFClientSession();<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; System.out.println(client.getPageAsText());<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; JSFServerSession <b>server </b>=
jsfSession.getJSFServerSession();<br>
  <br>
  <br>
&nbsp;&nbsp; }<br>
  <br>
Either clientIDs and currentFacesContext are null in <b>server</b>
object.<br>
&nbsp;&nbsp; <br>
  <br>
Any idea? Thanks.<br>
  <br>
Christian<br>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
jsfunit-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:jsfunit-dev@lists.jboss.org">jsfunit-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/jsfunit-dev">https://lists.jboss.org/mailman/listinfo/jsfunit-dev</a>
  </pre>
</blockquote>
<br>
</body>
</html>