You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bridges-dev@portals.apache.org by "James Schopp (JIRA)" <br...@portals.apache.org> on 2006/04/11 01:22:10 UTC

[jira] Created: (PB-41) Tiles Context gets lost "Struts Bridge - error with tiles"

Tiles Context gets lost "Struts Bridge - error with tiles"
----------------------------------------------------------

         Key: PB-41
         URL: http://issues.apache.org/jira/browse/PB-41
     Project: Portals Bridges
        Type: Bug

  Components: struts  
 Environment: Liferay 4.0 / JBoss 4.0.2 / Struts 1.2.7 / Bridges 1.0
    Reporter: James Schopp


There is a bug where the tiles context can get lost, and using tiles in your struts portlet will result in an NPE.

This happened to me, and after googling the problem, it appears that it had also happened to Max Hammers, who also posted a patch for the error. After searching jira, it apears that this issue is not being tracked yet (so that's why I am opening this one). I manually applied the patch to my copy of the source files (it is very simple), and it works perfectly (thanks Max!).

So, Ate et al, please apply Max's patch!

The newsgroup posting can be found at

http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200602.mbox/%3C20060213165747.32184.qmail@web25002.mail.ukl.yahoo.com%3E

And the patch is as follows (copy pasted from the above post)

##########################
Index:
src/java/org/apache/portals/bridges/struts/PortletServlet.java
===================================================================
---
src/java/org/apache/portals/bridges/struts/PortletServlet.java
(revision 365364)
+++
src/java/org/apache/portals/bridges/struts/PortletServlet.java
(working copy)
@@ -34,6 +34,7 @@
 import org.apache.struts.config.PlugInConfig;
 import org.apache.struts.tiles.TilesPlugin;
 import org.apache.struts.util.RequestUtils;
+import
org.apache.struts.taglib.tiles.ComponentConstants;
 
 /**
  * PortletServlet
@@ -169,6 +170,13 @@
                     request
                            
.setAttribute(Globals.ERROR_KEY, context
                                     .getErrors());
+                log.debug("Looking for TilesContext
...");
+                if (context.getTilesContext() !=
null) {
+                
request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,
context.getTilesContext());                    
+                	log.debug("TilesContext saved in
request");
+            	} else
+            		log.debug("TilesContext not found!");
+                
                 RequestDispatcher dispatcher = null;
                 if (context.getDispatchNamed())
                     dispatcher =
getServletContext().getNamedDispatcher(
Index:
src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
===================================================================
---
src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
(revision 365364)
+++
src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
(working copy)
@@ -30,6 +30,8 @@
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMessages;
 import org.apache.struts.config.ActionConfig;
+import org.apache.struts.tiles.ComponentContext;
+import
org.apache.struts.taglib.tiles.ComponentConstants;
 
 /**
  * PortletServletRequestDispatcher
@@ -92,6 +94,11 @@
                    
.getAttribute(Globals.MESSAGE_KEY));
             context.setErrors((ActionMessages)
request
                    
.getAttribute(Globals.ERROR_KEY));
+            // Store tiles context
+           
context.setTilesContext((ComponentContext)request.getAttribute(ComponentConstants.COMPONENT_CONTEXT));
+            log.debug("TilesContext in
StrutsPortletRenderContext");
+            
+                    
             if (context.getErrors() != null)
             {
                 String originURL =
StrutsPortletURL.getOriginURL(request);
Index:
src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
===================================================================
---
src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
(revision 365364)
+++
src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
(working copy)
@@ -19,6 +19,7 @@
 
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMessages;
+import org.apache.struts.tiles.ComponentContext;
 
 /**
  * StrutsPortletRenderContext
@@ -34,6 +35,9 @@
     private boolean requestCancelled;
     private ActionMessages messages;
     private ActionMessages errors;
+    // Tiles context
+    private ComponentContext tilesContext;
+    
     public String getPath()
     {
         return path;
@@ -82,4 +86,12 @@
     {
         this.errors = errors;
     }
+    public ComponentContext getTilesContext()
+    {
+	    return tilesContext;
+	}
+	public void setTilesContext(ComponentContext
tilesContext)
+	{
+		this.tilesContext = tilesContext;
+	}
 }

##########################

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Assigned: (PB-41) Tiles Context gets lost "Struts Bridge - error with tiles"

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/PB-41?page=all ]

Ate Douma reassigned PB-41:
---------------------------

    Assign To: Ate Douma

> Tiles Context gets lost "Struts Bridge - error with tiles"
> ----------------------------------------------------------
>
>          Key: PB-41
>          URL: http://issues.apache.org/jira/browse/PB-41
>      Project: Portals Bridges
>         Type: Bug

>   Components: struts
>  Environment: Liferay 4.0 / JBoss 4.0.2 / Struts 1.2.7 / Bridges 1.0
>     Reporter: James Schopp
>     Assignee: Ate Douma

>
> There is a bug where the tiles context can get lost, and using tiles in your struts portlet will result in an NPE.
> This happened to me, and after googling the problem, it appears that it had also happened to Max Hammers, who also posted a patch for the error. After searching jira, it apears that this issue is not being tracked yet (so that's why I am opening this one). I manually applied the patch to my copy of the source files (it is very simple), and it works perfectly (thanks Max!).
> So, Ate et al, please apply Max's patch!
> The newsgroup posting can be found at
> http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200602.mbox/%3C20060213165747.32184.qmail@web25002.mail.ukl.yahoo.com%3E
> And the patch is as follows (copy pasted from the above post)
> ##########################
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (working copy)
> @@ -34,6 +34,7 @@
>  import org.apache.struts.config.PlugInConfig;
>  import org.apache.struts.tiles.TilesPlugin;
>  import org.apache.struts.util.RequestUtils;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServlet
> @@ -169,6 +170,13 @@
>                      request
>                             
> .setAttribute(Globals.ERROR_KEY, context
>                                      .getErrors());
> +                log.debug("Looking for TilesContext
> ...");
> +                if (context.getTilesContext() !=
> null) {
> +                
> request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,
> context.getTilesContext());                    
> +                	log.debug("TilesContext saved in
> request");
> +            	} else
> +            		log.debug("TilesContext not found!");
> +                
>                  RequestDispatcher dispatcher = null;
>                  if (context.getDispatchNamed())
>                      dispatcher =
> getServletContext().getNamedDispatcher(
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (working copy)
> @@ -30,6 +30,8 @@
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
>  import org.apache.struts.config.ActionConfig;
> +import org.apache.struts.tiles.ComponentContext;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServletRequestDispatcher
> @@ -92,6 +94,11 @@
>                     
> .getAttribute(Globals.MESSAGE_KEY));
>              context.setErrors((ActionMessages)
> request
>                     
> .getAttribute(Globals.ERROR_KEY));
> +            // Store tiles context
> +           
> context.setTilesContext((ComponentContext)request.getAttribute(ComponentConstants.COMPONENT_CONTEXT));
> +            log.debug("TilesContext in
> StrutsPortletRenderContext");
> +            
> +                    
>              if (context.getErrors() != null)
>              {
>                  String originURL =
> StrutsPortletURL.getOriginURL(request);
> Index:
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (working copy)
> @@ -19,6 +19,7 @@
>  
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
> +import org.apache.struts.tiles.ComponentContext;
>  
>  /**
>   * StrutsPortletRenderContext
> @@ -34,6 +35,9 @@
>      private boolean requestCancelled;
>      private ActionMessages messages;
>      private ActionMessages errors;
> +    // Tiles context
> +    private ComponentContext tilesContext;
> +    
>      public String getPath()
>      {
>          return path;
> @@ -82,4 +86,12 @@
>      {
>          this.errors = errors;
>      }
> +    public ComponentContext getTilesContext()
> +    {
> +	    return tilesContext;
> +	}
> +	public void setTilesContext(ComponentContext
> tilesContext)
> +	{
> +		this.tilesContext = tilesContext;
> +	}
>  }
> ##########################

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Work started: (PB-41) Tiles Context gets lost "Struts Bridge - error with tiles"

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/PB-41?page=all ]

Work on PB-41 started by Ate Douma.

> Tiles Context gets lost "Struts Bridge - error with tiles"
> ----------------------------------------------------------
>
>                 Key: PB-41
>                 URL: http://issues.apache.org/jira/browse/PB-41
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>         Environment: Liferay 4.0 / JBoss 4.0.2 / Struts 1.2.7 / Bridges 1.0
>            Reporter: James Schopp
>         Assigned To: Ate Douma
>
> There is a bug where the tiles context can get lost, and using tiles in your struts portlet will result in an NPE.
> This happened to me, and after googling the problem, it appears that it had also happened to Max Hammers, who also posted a patch for the error. After searching jira, it apears that this issue is not being tracked yet (so that's why I am opening this one). I manually applied the patch to my copy of the source files (it is very simple), and it works perfectly (thanks Max!).
> So, Ate et al, please apply Max's patch!
> The newsgroup posting can be found at
> http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200602.mbox/%3C20060213165747.32184.qmail@web25002.mail.ukl.yahoo.com%3E
> And the patch is as follows (copy pasted from the above post)
> ##########################
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (working copy)
> @@ -34,6 +34,7 @@
>  import org.apache.struts.config.PlugInConfig;
>  import org.apache.struts.tiles.TilesPlugin;
>  import org.apache.struts.util.RequestUtils;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServlet
> @@ -169,6 +170,13 @@
>                      request
>                             
> .setAttribute(Globals.ERROR_KEY, context
>                                      .getErrors());
> +                log.debug("Looking for TilesContext
> ...");
> +                if (context.getTilesContext() !=
> null) {
> +                
> request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,
> context.getTilesContext());                    
> +                	log.debug("TilesContext saved in
> request");
> +            	} else
> +            		log.debug("TilesContext not found!");
> +                
>                  RequestDispatcher dispatcher = null;
>                  if (context.getDispatchNamed())
>                      dispatcher =
> getServletContext().getNamedDispatcher(
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (working copy)
> @@ -30,6 +30,8 @@
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
>  import org.apache.struts.config.ActionConfig;
> +import org.apache.struts.tiles.ComponentContext;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServletRequestDispatcher
> @@ -92,6 +94,11 @@
>                     
> .getAttribute(Globals.MESSAGE_KEY));
>              context.setErrors((ActionMessages)
> request
>                     
> .getAttribute(Globals.ERROR_KEY));
> +            // Store tiles context
> +           
> context.setTilesContext((ComponentContext)request.getAttribute(ComponentConstants.COMPONENT_CONTEXT));
> +            log.debug("TilesContext in
> StrutsPortletRenderContext");
> +            
> +                    
>              if (context.getErrors() != null)
>              {
>                  String originURL =
> StrutsPortletURL.getOriginURL(request);
> Index:
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (working copy)
> @@ -19,6 +19,7 @@
>  
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
> +import org.apache.struts.tiles.ComponentContext;
>  
>  /**
>   * StrutsPortletRenderContext
> @@ -34,6 +35,9 @@
>      private boolean requestCancelled;
>      private ActionMessages messages;
>      private ActionMessages errors;
> +    // Tiles context
> +    private ComponentContext tilesContext;
> +    
>      public String getPath()
>      {
>          return path;
> @@ -82,4 +86,12 @@
>      {
>          this.errors = errors;
>      }
> +    public ComponentContext getTilesContext()
> +    {
> +	    return tilesContext;
> +	}
> +	public void setTilesContext(ComponentContext
> tilesContext)
> +	{
> +		this.tilesContext = tilesContext;
> +	}
>  }
> ##########################

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Closed: (PB-41) Tiles Context gets lost "Struts Bridge - error with tiles"

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ https://issues.apache.org/jira/browse/PB-41?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ate Douma closed PB-41.
-----------------------

    Resolution: Fixed

Fixed: The Tiles ComponentConstants.COMPONENT_CONTEXT attribute is now automatically registered as RenderContextAttribute by the Struts Bridge itself.

> Tiles Context gets lost "Struts Bridge - error with tiles"
> ----------------------------------------------------------
>
>                 Key: PB-41
>                 URL: https://issues.apache.org/jira/browse/PB-41
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Liferay 4.0 / JBoss 4.0.2 / Struts 1.2.7 / Bridges 1.0
>            Reporter: James Schopp
>         Assigned To: Ate Douma
>             Fix For: 1.0.1
>
>
> There is a bug where the tiles context can get lost, and using tiles in your struts portlet will result in an NPE.
> This happened to me, and after googling the problem, it appears that it had also happened to Max Hammers, who also posted a patch for the error. After searching jira, it apears that this issue is not being tracked yet (so that's why I am opening this one). I manually applied the patch to my copy of the source files (it is very simple), and it works perfectly (thanks Max!).
> So, Ate et al, please apply Max's patch!
> The newsgroup posting can be found at
> http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200602.mbox/%3C20060213165747.32184.qmail@web25002.mail.ukl.yahoo.com%3E
> And the patch is as follows (copy pasted from the above post)
> ##########################
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (working copy)
> @@ -34,6 +34,7 @@
>  import org.apache.struts.config.PlugInConfig;
>  import org.apache.struts.tiles.TilesPlugin;
>  import org.apache.struts.util.RequestUtils;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServlet
> @@ -169,6 +170,13 @@
>                      request
>                             
> .setAttribute(Globals.ERROR_KEY, context
>                                      .getErrors());
> +                log.debug("Looking for TilesContext
> ...");
> +                if (context.getTilesContext() !=
> null) {
> +                
> request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,
> context.getTilesContext());                    
> +                	log.debug("TilesContext saved in
> request");
> +            	} else
> +            		log.debug("TilesContext not found!");
> +                
>                  RequestDispatcher dispatcher = null;
>                  if (context.getDispatchNamed())
>                      dispatcher =
> getServletContext().getNamedDispatcher(
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (working copy)
> @@ -30,6 +30,8 @@
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
>  import org.apache.struts.config.ActionConfig;
> +import org.apache.struts.tiles.ComponentContext;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServletRequestDispatcher
> @@ -92,6 +94,11 @@
>                     
> .getAttribute(Globals.MESSAGE_KEY));
>              context.setErrors((ActionMessages)
> request
>                     
> .getAttribute(Globals.ERROR_KEY));
> +            // Store tiles context
> +           
> context.setTilesContext((ComponentContext)request.getAttribute(ComponentConstants.COMPONENT_CONTEXT));
> +            log.debug("TilesContext in
> StrutsPortletRenderContext");
> +            
> +                    
>              if (context.getErrors() != null)
>              {
>                  String originURL =
> StrutsPortletURL.getOriginURL(request);
> Index:
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (working copy)
> @@ -19,6 +19,7 @@
>  
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
> +import org.apache.struts.tiles.ComponentContext;
>  
>  /**
>   * StrutsPortletRenderContext
> @@ -34,6 +35,9 @@
>      private boolean requestCancelled;
>      private ActionMessages messages;
>      private ActionMessages errors;
> +    // Tiles context
> +    private ComponentContext tilesContext;
> +    
>      public String getPath()
>      {
>          return path;
> @@ -82,4 +86,12 @@
>      {
>          this.errors = errors;
>      }
> +    public ComponentContext getTilesContext()
> +    {
> +	    return tilesContext;
> +	}
> +	public void setTilesContext(ComponentContext
> tilesContext)
> +	{
> +		this.tilesContext = tilesContext;
> +	}
>  }
> ##########################

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-41) Tiles Context gets lost "Struts Bridge - error with tiles"

Posted by "hoda salem (JIRA)" <br...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/PB-41?page=comments#action_12416132 ] 

hoda salem commented on PB-41:
------------------------------

hi,

Am currently developing a StrutsPortlet application using tiles, am facing the same problem with tiles. 

i tried adding  the <render-context> <attribute name="org.apache.struts.taglib.tiles.CompContext"/>  </render-context>  to my struts-portlet-config.xml but still it didn't work :(

Do you have any other suggestions to solve this issue???


thanks,
hoda

> Tiles Context gets lost "Struts Bridge - error with tiles"
> ----------------------------------------------------------
>
>          Key: PB-41
>          URL: http://issues.apache.org/jira/browse/PB-41
>      Project: Portals Bridges
>         Type: Bug

>   Components: struts
>  Environment: Liferay 4.0 / JBoss 4.0.2 / Struts 1.2.7 / Bridges 1.0
>     Reporter: James Schopp
>     Assignee: Ate Douma

>
> There is a bug where the tiles context can get lost, and using tiles in your struts portlet will result in an NPE.
> This happened to me, and after googling the problem, it appears that it had also happened to Max Hammers, who also posted a patch for the error. After searching jira, it apears that this issue is not being tracked yet (so that's why I am opening this one). I manually applied the patch to my copy of the source files (it is very simple), and it works perfectly (thanks Max!).
> So, Ate et al, please apply Max's patch!
> The newsgroup posting can be found at
> http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200602.mbox/%3C20060213165747.32184.qmail@web25002.mail.ukl.yahoo.com%3E
> And the patch is as follows (copy pasted from the above post)
> ##########################
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (working copy)
> @@ -34,6 +34,7 @@
>  import org.apache.struts.config.PlugInConfig;
>  import org.apache.struts.tiles.TilesPlugin;
>  import org.apache.struts.util.RequestUtils;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServlet
> @@ -169,6 +170,13 @@
>                      request
>                             
> .setAttribute(Globals.ERROR_KEY, context
>                                      .getErrors());
> +                log.debug("Looking for TilesContext
> ...");
> +                if (context.getTilesContext() !=
> null) {
> +                
> request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,
> context.getTilesContext());                    
> +                	log.debug("TilesContext saved in
> request");
> +            	} else
> +            		log.debug("TilesContext not found!");
> +                
>                  RequestDispatcher dispatcher = null;
>                  if (context.getDispatchNamed())
>                      dispatcher =
> getServletContext().getNamedDispatcher(
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (working copy)
> @@ -30,6 +30,8 @@
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
>  import org.apache.struts.config.ActionConfig;
> +import org.apache.struts.tiles.ComponentContext;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServletRequestDispatcher
> @@ -92,6 +94,11 @@
>                     
> .getAttribute(Globals.MESSAGE_KEY));
>              context.setErrors((ActionMessages)
> request
>                     
> .getAttribute(Globals.ERROR_KEY));
> +            // Store tiles context
> +           
> context.setTilesContext((ComponentContext)request.getAttribute(ComponentConstants.COMPONENT_CONTEXT));
> +            log.debug("TilesContext in
> StrutsPortletRenderContext");
> +            
> +                    
>              if (context.getErrors() != null)
>              {
>                  String originURL =
> StrutsPortletURL.getOriginURL(request);
> Index:
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (working copy)
> @@ -19,6 +19,7 @@
>  
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
> +import org.apache.struts.tiles.ComponentContext;
>  
>  /**
>   * StrutsPortletRenderContext
> @@ -34,6 +35,9 @@
>      private boolean requestCancelled;
>      private ActionMessages messages;
>      private ActionMessages errors;
> +    // Tiles context
> +    private ComponentContext tilesContext;
> +    
>      public String getPath()
>      {
>          return path;
> @@ -82,4 +86,12 @@
>      {
>          this.errors = errors;
>      }
> +    public ComponentContext getTilesContext()
> +    {
> +	    return tilesContext;
> +	}
> +	public void setTilesContext(ComponentContext
> tilesContext)
> +	{
> +		this.tilesContext = tilesContext;
> +	}
>  }
> ##########################

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-41) Tiles Context gets lost "Struts Bridge - error with tiles"

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/PB-41?page=comments#action_12374175 ] 

Ate Douma commented on PB-41:
-----------------------------

James, Max,

Sorry about the late response but I've been very busy otherwise.
I looked at the patch, and while I think its ok, I think this can be solved differently and more generically and it won't need a patch :)

Although I don't have a tiles based StrutsPortlet example to test with (if you could provide me with a simple one, I'd appreciate it)
I think you can have the same effect/solution by defining the following in your WEB-INF/struts-portlet-config.xml:

  <config>
    <render-context>
      <attribute name="org.apache.struts.taglib.tiles.CompContext"/>
    </render-context>
    ...
  </config>

See for a description of this feature of the struts bridge:
  http://portals.apache.org/bridges/multiproject/portals-bridges-struts/features.html#RenderContextAttributes_to_the_rescue

Please let me know if this works!

> Tiles Context gets lost "Struts Bridge - error with tiles"
> ----------------------------------------------------------
>
>          Key: PB-41
>          URL: http://issues.apache.org/jira/browse/PB-41
>      Project: Portals Bridges
>         Type: Bug

>   Components: struts
>  Environment: Liferay 4.0 / JBoss 4.0.2 / Struts 1.2.7 / Bridges 1.0
>     Reporter: James Schopp

>
> There is a bug where the tiles context can get lost, and using tiles in your struts portlet will result in an NPE.
> This happened to me, and after googling the problem, it appears that it had also happened to Max Hammers, who also posted a patch for the error. After searching jira, it apears that this issue is not being tracked yet (so that's why I am opening this one). I manually applied the patch to my copy of the source files (it is very simple), and it works perfectly (thanks Max!).
> So, Ate et al, please apply Max's patch!
> The newsgroup posting can be found at
> http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200602.mbox/%3C20060213165747.32184.qmail@web25002.mail.ukl.yahoo.com%3E
> And the patch is as follows (copy pasted from the above post)
> ##########################
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (working copy)
> @@ -34,6 +34,7 @@
>  import org.apache.struts.config.PlugInConfig;
>  import org.apache.struts.tiles.TilesPlugin;
>  import org.apache.struts.util.RequestUtils;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServlet
> @@ -169,6 +170,13 @@
>                      request
>                             
> .setAttribute(Globals.ERROR_KEY, context
>                                      .getErrors());
> +                log.debug("Looking for TilesContext
> ...");
> +                if (context.getTilesContext() !=
> null) {
> +                
> request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,
> context.getTilesContext());                    
> +                	log.debug("TilesContext saved in
> request");
> +            	} else
> +            		log.debug("TilesContext not found!");
> +                
>                  RequestDispatcher dispatcher = null;
>                  if (context.getDispatchNamed())
>                      dispatcher =
> getServletContext().getNamedDispatcher(
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (working copy)
> @@ -30,6 +30,8 @@
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
>  import org.apache.struts.config.ActionConfig;
> +import org.apache.struts.tiles.ComponentContext;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServletRequestDispatcher
> @@ -92,6 +94,11 @@
>                     
> .getAttribute(Globals.MESSAGE_KEY));
>              context.setErrors((ActionMessages)
> request
>                     
> .getAttribute(Globals.ERROR_KEY));
> +            // Store tiles context
> +           
> context.setTilesContext((ComponentContext)request.getAttribute(ComponentConstants.COMPONENT_CONTEXT));
> +            log.debug("TilesContext in
> StrutsPortletRenderContext");
> +            
> +                    
>              if (context.getErrors() != null)
>              {
>                  String originURL =
> StrutsPortletURL.getOriginURL(request);
> Index:
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (working copy)
> @@ -19,6 +19,7 @@
>  
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
> +import org.apache.struts.tiles.ComponentContext;
>  
>  /**
>   * StrutsPortletRenderContext
> @@ -34,6 +35,9 @@
>      private boolean requestCancelled;
>      private ActionMessages messages;
>      private ActionMessages errors;
> +    // Tiles context
> +    private ComponentContext tilesContext;
> +    
>      public String getPath()
>      {
>          return path;
> @@ -82,4 +86,12 @@
>      {
>          this.errors = errors;
>      }
> +    public ComponentContext getTilesContext()
> +    {
> +	    return tilesContext;
> +	}
> +	public void setTilesContext(ComponentContext
> tilesContext)
> +	{
> +		this.tilesContext = tilesContext;
> +	}
>  }
> ##########################

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Updated: (PB-41) Tiles Context gets lost "Struts Bridge - error with tiles"

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
     [ http://issues.apache.org/jira/browse/PB-41?page=all ]

Ate Douma updated PB-41:
------------------------

        Fix Version/s: 1.0.1
    Affects Version/s: 1.0

> Tiles Context gets lost "Struts Bridge - error with tiles"
> ----------------------------------------------------------
>
>                 Key: PB-41
>                 URL: http://issues.apache.org/jira/browse/PB-41
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Liferay 4.0 / JBoss 4.0.2 / Struts 1.2.7 / Bridges 1.0
>            Reporter: James Schopp
>         Assigned To: Ate Douma
>             Fix For: 1.0.1
>
>
> There is a bug where the tiles context can get lost, and using tiles in your struts portlet will result in an NPE.
> This happened to me, and after googling the problem, it appears that it had also happened to Max Hammers, who also posted a patch for the error. After searching jira, it apears that this issue is not being tracked yet (so that's why I am opening this one). I manually applied the patch to my copy of the source files (it is very simple), and it works perfectly (thanks Max!).
> So, Ate et al, please apply Max's patch!
> The newsgroup posting can be found at
> http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200602.mbox/%3C20060213165747.32184.qmail@web25002.mail.ukl.yahoo.com%3E
> And the patch is as follows (copy pasted from the above post)
> ##########################
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (working copy)
> @@ -34,6 +34,7 @@
>  import org.apache.struts.config.PlugInConfig;
>  import org.apache.struts.tiles.TilesPlugin;
>  import org.apache.struts.util.RequestUtils;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServlet
> @@ -169,6 +170,13 @@
>                      request
>                             
> .setAttribute(Globals.ERROR_KEY, context
>                                      .getErrors());
> +                log.debug("Looking for TilesContext
> ...");
> +                if (context.getTilesContext() !=
> null) {
> +                
> request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,
> context.getTilesContext());                    
> +                	log.debug("TilesContext saved in
> request");
> +            	} else
> +            		log.debug("TilesContext not found!");
> +                
>                  RequestDispatcher dispatcher = null;
>                  if (context.getDispatchNamed())
>                      dispatcher =
> getServletContext().getNamedDispatcher(
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (working copy)
> @@ -30,6 +30,8 @@
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
>  import org.apache.struts.config.ActionConfig;
> +import org.apache.struts.tiles.ComponentContext;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServletRequestDispatcher
> @@ -92,6 +94,11 @@
>                     
> .getAttribute(Globals.MESSAGE_KEY));
>              context.setErrors((ActionMessages)
> request
>                     
> .getAttribute(Globals.ERROR_KEY));
> +            // Store tiles context
> +           
> context.setTilesContext((ComponentContext)request.getAttribute(ComponentConstants.COMPONENT_CONTEXT));
> +            log.debug("TilesContext in
> StrutsPortletRenderContext");
> +            
> +                    
>              if (context.getErrors() != null)
>              {
>                  String originURL =
> StrutsPortletURL.getOriginURL(request);
> Index:
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (working copy)
> @@ -19,6 +19,7 @@
>  
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
> +import org.apache.struts.tiles.ComponentContext;
>  
>  /**
>   * StrutsPortletRenderContext
> @@ -34,6 +35,9 @@
>      private boolean requestCancelled;
>      private ActionMessages messages;
>      private ActionMessages errors;
> +    // Tiles context
> +    private ComponentContext tilesContext;
> +    
>      public String getPath()
>      {
>          return path;
> @@ -82,4 +86,12 @@
>      {
>          this.errors = errors;
>      }
> +    public ComponentContext getTilesContext()
> +    {
> +	    return tilesContext;
> +	}
> +	public void setTilesContext(ComponentContext
> tilesContext)
> +	{
> +		this.tilesContext = tilesContext;
> +	}
>  }
> ##########################

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-41) Tiles Context gets lost "Struts Bridge - error with tiles"

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/PB-41?page=comments#action_12435224 ] 
            
Ate Douma commented on PB-41:
-----------------------------

After getting another report on this "issue" recently, I've looked into resolving this transparently without need to define a render-context attribute org.apache.struts.taglib.tiles.CompContext anymore in struts-portlet-config.xml.

I've already have a working version ready which only needs a little more testing. Once that's complete, I'll commit this enhancement.

> Tiles Context gets lost "Struts Bridge - error with tiles"
> ----------------------------------------------------------
>
>                 Key: PB-41
>                 URL: http://issues.apache.org/jira/browse/PB-41
>             Project: Portals Bridges
>          Issue Type: Bug
>          Components: struts
>    Affects Versions: 1.0
>         Environment: Liferay 4.0 / JBoss 4.0.2 / Struts 1.2.7 / Bridges 1.0
>            Reporter: James Schopp
>         Assigned To: Ate Douma
>             Fix For: 1.0.1
>
>
> There is a bug where the tiles context can get lost, and using tiles in your struts portlet will result in an NPE.
> This happened to me, and after googling the problem, it appears that it had also happened to Max Hammers, who also posted a patch for the error. After searching jira, it apears that this issue is not being tracked yet (so that's why I am opening this one). I manually applied the patch to my copy of the source files (it is very simple), and it works perfectly (thanks Max!).
> So, Ate et al, please apply Max's patch!
> The newsgroup posting can be found at
> http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200602.mbox/%3C20060213165747.32184.qmail@web25002.mail.ukl.yahoo.com%3E
> And the patch is as follows (copy pasted from the above post)
> ##########################
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (working copy)
> @@ -34,6 +34,7 @@
>  import org.apache.struts.config.PlugInConfig;
>  import org.apache.struts.tiles.TilesPlugin;
>  import org.apache.struts.util.RequestUtils;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServlet
> @@ -169,6 +170,13 @@
>                      request
>                             
> .setAttribute(Globals.ERROR_KEY, context
>                                      .getErrors());
> +                log.debug("Looking for TilesContext
> ...");
> +                if (context.getTilesContext() !=
> null) {
> +                
> request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,
> context.getTilesContext());                    
> +                	log.debug("TilesContext saved in
> request");
> +            	} else
> +            		log.debug("TilesContext not found!");
> +                
>                  RequestDispatcher dispatcher = null;
>                  if (context.getDispatchNamed())
>                      dispatcher =
> getServletContext().getNamedDispatcher(
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (working copy)
> @@ -30,6 +30,8 @@
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
>  import org.apache.struts.config.ActionConfig;
> +import org.apache.struts.tiles.ComponentContext;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServletRequestDispatcher
> @@ -92,6 +94,11 @@
>                     
> .getAttribute(Globals.MESSAGE_KEY));
>              context.setErrors((ActionMessages)
> request
>                     
> .getAttribute(Globals.ERROR_KEY));
> +            // Store tiles context
> +           
> context.setTilesContext((ComponentContext)request.getAttribute(ComponentConstants.COMPONENT_CONTEXT));
> +            log.debug("TilesContext in
> StrutsPortletRenderContext");
> +            
> +                    
>              if (context.getErrors() != null)
>              {
>                  String originURL =
> StrutsPortletURL.getOriginURL(request);
> Index:
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (working copy)
> @@ -19,6 +19,7 @@
>  
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
> +import org.apache.struts.tiles.ComponentContext;
>  
>  /**
>   * StrutsPortletRenderContext
> @@ -34,6 +35,9 @@
>      private boolean requestCancelled;
>      private ActionMessages messages;
>      private ActionMessages errors;
> +    // Tiles context
> +    private ComponentContext tilesContext;
> +    
>      public String getPath()
>      {
>          return path;
> @@ -82,4 +86,12 @@
>      {
>          this.errors = errors;
>      }
> +    public ComponentContext getTilesContext()
> +    {
> +	    return tilesContext;
> +	}
> +	public void setTilesContext(ComponentContext
> tilesContext)
> +	{
> +		this.tilesContext = tilesContext;
> +	}
>  }
> ##########################

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org


[jira] Commented: (PB-41) Tiles Context gets lost "Struts Bridge - error with tiles"

Posted by "Ate Douma (JIRA)" <br...@portals.apache.org>.
    [ http://issues.apache.org/jira/browse/PB-41?page=comments#action_12416239 ] 

Ate Douma commented on PB-41:
-----------------------------

Well, AFAIK it should work so if it doesn't I would need more info and if possible a testcase (e.g. demo/test app) I can check.
So, please provide me with something like that (if you prefer you can contact me by mail) and I'll try to solve it. 

> Tiles Context gets lost "Struts Bridge - error with tiles"
> ----------------------------------------------------------
>
>          Key: PB-41
>          URL: http://issues.apache.org/jira/browse/PB-41
>      Project: Portals Bridges
>         Type: Bug

>   Components: struts
>  Environment: Liferay 4.0 / JBoss 4.0.2 / Struts 1.2.7 / Bridges 1.0
>     Reporter: James Schopp
>     Assignee: Ate Douma

>
> There is a bug where the tiles context can get lost, and using tiles in your struts portlet will result in an NPE.
> This happened to me, and after googling the problem, it appears that it had also happened to Max Hammers, who also posted a patch for the error. After searching jira, it apears that this issue is not being tracked yet (so that's why I am opening this one). I manually applied the patch to my copy of the source files (it is very simple), and it works perfectly (thanks Max!).
> So, Ate et al, please apply Max's patch!
> The newsgroup posting can be found at
> http://mail-archives.apache.org/mod_mbox/portals-bridges-dev/200602.mbox/%3C20060213165747.32184.qmail@web25002.mail.ukl.yahoo.com%3E
> And the patch is as follows (copy pasted from the above post)
> ##########################
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServlet.java
> (working copy)
> @@ -34,6 +34,7 @@
>  import org.apache.struts.config.PlugInConfig;
>  import org.apache.struts.tiles.TilesPlugin;
>  import org.apache.struts.util.RequestUtils;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServlet
> @@ -169,6 +170,13 @@
>                      request
>                             
> .setAttribute(Globals.ERROR_KEY, context
>                                      .getErrors());
> +                log.debug("Looking for TilesContext
> ...");
> +                if (context.getTilesContext() !=
> null) {
> +                
> request.setAttribute(ComponentConstants.COMPONENT_CONTEXT,
> context.getTilesContext());                    
> +                	log.debug("TilesContext saved in
> request");
> +            	} else
> +            		log.debug("TilesContext not found!");
> +                
>                  RequestDispatcher dispatcher = null;
>                  if (context.getDispatchNamed())
>                      dispatcher =
> getServletContext().getNamedDispatcher(
> Index:
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/PortletServletRequestDispatcher.java
> (working copy)
> @@ -30,6 +30,8 @@
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
>  import org.apache.struts.config.ActionConfig;
> +import org.apache.struts.tiles.ComponentContext;
> +import
> org.apache.struts.taglib.tiles.ComponentConstants;
>  
>  /**
>   * PortletServletRequestDispatcher
> @@ -92,6 +94,11 @@
>                     
> .getAttribute(Globals.MESSAGE_KEY));
>              context.setErrors((ActionMessages)
> request
>                     
> .getAttribute(Globals.ERROR_KEY));
> +            // Store tiles context
> +           
> context.setTilesContext((ComponentContext)request.getAttribute(ComponentConstants.COMPONENT_CONTEXT));
> +            log.debug("TilesContext in
> StrutsPortletRenderContext");
> +            
> +                    
>              if (context.getErrors() != null)
>              {
>                  String originURL =
> StrutsPortletURL.getOriginURL(request);
> Index:
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> ===================================================================
> ---
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (revision 365364)
> +++
> src/java/org/apache/portals/bridges/struts/StrutsPortletRenderContext.java
> (working copy)
> @@ -19,6 +19,7 @@
>  
>  import org.apache.struts.action.ActionForm;
>  import org.apache.struts.action.ActionMessages;
> +import org.apache.struts.tiles.ComponentContext;
>  
>  /**
>   * StrutsPortletRenderContext
> @@ -34,6 +35,9 @@
>      private boolean requestCancelled;
>      private ActionMessages messages;
>      private ActionMessages errors;
> +    // Tiles context
> +    private ComponentContext tilesContext;
> +    
>      public String getPath()
>      {
>          return path;
> @@ -82,4 +86,12 @@
>      {
>          this.errors = errors;
>      }
> +    public ComponentContext getTilesContext()
> +    {
> +	    return tilesContext;
> +	}
> +	public void setTilesContext(ComponentContext
> tilesContext)
> +	{
> +		this.tilesContext = tilesContext;
> +	}
>  }
> ##########################

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: bridges-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: bridges-dev-help@portals.apache.org