arron       2002/09/10 09:06:56

  Modified:    src/share/org/apache/struts/taglib/nested NestedRootTag.java
  Log:
  Changing the use of the session object to use
  instead the request object. Was preventing some
  larger implementations of the nested tags on
  clustered servers.
  
  Revision  Changes    Path
  1.4       +11 -10    
jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java
  
  Index: NestedRootTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/nested/NestedRootTag.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- NestedRootTag.java        13 Mar 2002 13:13:28 -0000      1.3
  +++ NestedRootTag.java        10 Sep 2002 16:06:56 -0000      1.4
  @@ -61,7 +61,8 @@
   
   import javax.servlet.jsp.*;
   import javax.servlet.jsp.tagext.*;
  -import javax.servlet.http.HttpSession;
  +import javax.servlet.http.HttpServletRequest;
  +
   import org.apache.struts.util.*;
   
   /**
  @@ -126,16 +127,16 @@
     public int doStartTag() throws JspException {
       
       /* set the nested reference for possible inclusions etc */
  -    HttpSession session = (HttpSession)pageContext.getSession();
  +    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
       reference = (NestedReference)
  -              session.getAttribute(NestedPropertyHelper.NESTED_INCLUDES_KEY);
  +              request.getAttribute(NestedPropertyHelper.NESTED_INCLUDES_KEY);
   
       if (name == null) {
         this.name = reference.getBeanName();
         this.nestedProperty = reference.getNestedProperty();
       } else {
         NestedReference newRef = new NestedReference(this.name, "");
  -      session.setAttribute(NestedPropertyHelper.NESTED_INCLUDES_KEY, newRef);
  +      request.setAttribute(NestedPropertyHelper.NESTED_INCLUDES_KEY, newRef);
       }
       
       return (EVAL_BODY_TAG);
  @@ -163,8 +164,8 @@
      */
     public int doEndTag() throws JspException {
       /* reset the reference */
  -    HttpSession session = (HttpSession)pageContext.getSession();
  -    NestedPropertyHelper.setIncludeReference(session, reference);
  +    HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
  +    NestedPropertyHelper.setIncludeReference(request, reference);
       
       return (EVAL_PAGE);
     }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to