You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@apache.org on 2001/02/10 22:48:28 UTC

cvs commit: jakarta-struts/web/test bean-cookie.jsp logic-match.jsp logic-present.jsp

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 <ma...@BESToffers.de>
  
  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
  
  
  

Deprecated API

Posted by Alan Yackel <ay...@home.com>.
Why is the Digester built on the deprecated HandlerBase instead of the SAX2
DefaultHandler?  Switching over to the newer SAX2 classes doesn't required too much
work.  I did it with one other application.  It's mostly changing AttributeList to
Attributes and changing the parameter list on a few methods.  Also I'm curious why
you don't use the org.apache.xerces.parser.SAXParser instead of the one in
javax.xml.parsers.  I would think that apache projects would try leverage work from
other apache projects.  I'm in the middle of building a software application based on
Struts for an internet consulting company.  I love the features and flexibility of
Struts, but it's nice to keep current with technology.

Thanks,
Alan