craigmcc    01/02/10 13:48:28

  Modified:    web/test bean-cookie.jsp logic-match.jsp logic-present.jsp
  Log:
  Correct three pages in the Struts test application so that they will
  operate correctly even if cookies are not being used for session
  maintenance.  Previously, these pages assumed that a JSESSIONID cookie
  would *always* be present.
  
  Submitted by: Matthias Kerkhoff <[EMAIL PROTECTED]>
  
  Revision  Changes    Path
  1.3       +8 -2      jakarta-struts/web/test/bean-cookie.jsp
  
  Index: bean-cookie.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/test/bean-cookie.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- bean-cookie.jsp   2001/02/03 03:23:25     1.2
  +++ bean-cookie.jsp   2001/02/10 21:48:27     1.3
  @@ -10,9 +10,10 @@
   <h1>Test struts-bean:cookie Tag</h1>
   </div>
   
  -Display the properties of our current session ID cookie
  +<p>Display the properties of our current session ID cookie (if there is
  +one):</p>
   
  -<bean:cookie id="sess" name="JSESSIONID"/>
  +<bean:cookie id="sess" name="JSESSIONID" value="JSESSIONID-IS-UNDEFINED"/>
   
   <table border="1">
     <tr>
  @@ -61,6 +62,11 @@
       <td><bean:write name="sess" property="version"/></td>
     </tr>
   </table>
  +
  +<br><br>
  +
  +<p>Display the properties of an undefined cookie that was given the default
  +value <code>UNKNOWN_VALUE</code>:</p>
   
   <bean:cookie id="dummy" name="UNKNOWN_COOKIE" value="UNKNOWN_VALUE"/>
   
  
  
  
  1.3       +2 -2      jakarta-struts/web/test/logic-match.jsp
  
  Index: logic-match.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/test/logic-match.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- logic-match.jsp   2000/12/18 18:33:19     1.2
  +++ logic-match.jsp   2001/02/10 21:48:27     1.3
  @@ -12,8 +12,8 @@
   </div>
   
   <jsp:useBean id="bean" scope="page" class="org.apache.struts.test.TestBean"/>
  -<bean:cookie    id="cookie" name="JSESSIONID"/>
  -<bean:header    id="header" name="User-Agent"/>
  +<bean:cookie    id="cookie" name="JSESSIONID" value="JSESSIONID-IS-UNDEFINED"/>
  +<bean:header    id="header" name="User-Agent" value="USER-AGENT-IS-UNDEFINED"/>
   <bean:parameter id="param"  name="param1"/>
   <%
     pageContext.setAttribute("string", "String test value");
  
  
  
  1.3       +4 -0      jakarta-struts/web/test/logic-present.jsp
  
  Index: logic-present.jsp
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/test/logic-present.jsp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- logic-present.jsp 2000/12/18 18:33:20     1.2
  +++ logic-present.jsp 2001/02/10 21:48:28     1.3
  @@ -44,7 +44,11 @@
     </tr>
     <tr>
       <td>Cookie</td>
  +<% if (request.isRequestedSessionIdFromCookie()) { %>
       <td>present</td>
  +<% } else { %>
  +    <td>notPresent</td>
  +<% } %>
       <td>
         <logic:present cookie="JSESSIONID">
           present
  
  
  

Reply via email to