For some reason when I let weblogic 6.0 recompile jsps with templates, the first time I hit the page after the recompile I get a ClassCastException related to ContentMap. I am not sure exactly why it's happening but it probably has something to do with Class loaders (doesn't everything?). Anyway, if I check the type of the object coming off the Stack before it's cast, I don't get the error anymore.
 
Someone who knows the code better should look this over because I haven't looked at the code enough to know what's really going on. The commented out lines below are the original code.
 
Thanks,
Hal

   /**
     * Peek at the map on top of the stack.
     *
     * @param pc The page context associated with a custom tag.
     */
   public static ContentMap peek(PageContext pc)
   {
        //return (ContentMap) getStack(pc).peek();
        Object o = getStack(pc).peek();
        if (o instanceof ContentMap)
        {
          return (ContentMap)o;
        }
        return null;
   }

   /**
     *
     * @param pc The page context associated with a custom tag.
     */
    public static ContentMap pop(PageContext pc)
    {
      //return (ContentMap) getStack(pc).pop();
      Object o = getStack(pc).pop();
      if (o instanceof ContentMap)
      {
        return (ContentMap)o;
      }
      return null;
   }

Reply via email to