You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by "James Liao (JIRA)" <je...@portals.apache.org> on 2005/11/13 02:11:23 UTC

[jira] Updated: (JS2-406) CotentServer can not set attribute "org.apache.jetspeed.content.filtered" because of FileNotFoundException

     [ http://issues.apache.org/jira/browse/JS2-406?page=all ]

James Liao updated JS2-406:
---------------------------

    Attachment: ContentFilter.diff

> CotentServer can not set attribute "org.apache.jetspeed.content.filtered" because of FileNotFoundException
> ----------------------------------------------------------------------------------------------------------
>
>          Key: JS2-406
>          URL: http://issues.apache.org/jira/browse/JS2-406
>      Project: Jetspeed 2
>         Type: Bug
>   Components: ContentServer
>     Versions: 2.0-M4
>  Environment: JDK 1.4.2_10, WinXP SP2
>     Reporter: James Liao
>     Priority: Critical
>  Attachments: ContentFilter.diff
>
> There is a bug about contentfilter.
> 1. Login j2 as a portal user(admin).
> 2. Click the CSS Demo page.
> 3. Click the CSS portlet maximize windown icon.(a java.lang.IllegalStateException had been logged in jetspeed.log)
> 4. Click the default-page.psml.
> 5. The following is the displayed in browser.
> javax.servlet.ServletException: Fatal error encountered while processing portal request: org.apache.jetspeed.pipeline.PipelineException: org.apache.jetspeed.pipeline.PipelineException: org.apache.jetspeed.pipeline.PipelineException
> : org.apache.jetspeed.pipeline.PipelineException: java.lang.IllegalStateException: You cannot invoke getRenderedContent() until the content has been set.
> 	org.apache.jetspeed.engine.JetspeedServlet.doGet(JetspeedServlet.java
> :235)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> 6. The current browser can not view j2 anymore.
> The cause of this is a FileNotFoundException throw in ContentFilter. The following is the detail:
> 1. The css-demo.psml use blue-gradient as its portlet-decorator. The following lines are from blue-gradient's css file
> .blue-gradient .portlet-msg-status {
>     background: url(content/tigris/images/icon_status_sml.gif);
>     background-repeat: no-repeat;
>     padding-left: 20px;
>     min-height: 15px;
> }
> The above gif file could never be found according to the current content list paths.
> 2. A FileNotFoundException will be thrown out when browser try to request for these gif files at the following code:
> SimpleContentLocator contentLocator = new SimpleContentLocator(this.contentDir, urlHints, useCache, httpRequest                       .getContextPath(), requestURI, getContentSearchPathes(httpRequest));
> so the following code could never be called:
> httpRequest.setAttribute("org.apache.jetspeed.content.filtered", "true");
> 3. This will lead to when browser request a *.gif file, the jetspeed pipeline get called and then a java.lang.IllegalStateException got fired.
> A quick fix is moved the line "httpRequest.setAttribute("org.apache.jetspeed.content.filtered", "true");" before creating SimpleContentLocator.
> I also notice that JS2-398 might fix this issue gracefully too, then just ignore me.

-- 
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: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org