myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Curtiss Howard (JIRA)" <...@myfaces.apache.org>
Subject [jira] Issue Comment Edited: (MYFACES-1815) Faces servlet returns empty response for resources when using /faces/* as servlet mapping
Date Tue, 12 Feb 2008 21:43:07 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568323#action_12568323
] 

curtiss edited comment on MYFACES-1815 at 2/12/08 1:42 PM:
------------------------------------------------------------------

After looking at the issue, it appears that ViewResponseWrapper.flushToWriter() attempts to
write the contents of the "after view tag content" byte array output to itself instead of
the provided writer.  Since the response writer is already grabbed prior to calling flushToWriter()
(in JspViewHandlerImpl), it is not possible to write the byte array output via the response
output stream.  Instead, I opted to write to the response writer by converting the byte array
to a string using the response character encoding.

The included patch was made against the 1.2.2 branch.

      was (Author: curtiss):
    After looking at the issue, it appears that ViewResponseWrapper.flushToWriter() attempts
to write the contents of the "after view tag content" byte array output to itself instead
of the provided writer.  Since the response writer is already grabbed prior to calling flushToWriter()
(in JspViewHandlerImpl), it is not possible to write the byte array output stream via the
response output stream.  Instead, I opted to write to the response writer by converting the
byte array to a string using the response character encoding.

The included patch was made against the 1.2.2 branch.
  
> Faces servlet returns empty response for resources when using /faces/* as servlet mapping
> -----------------------------------------------------------------------------------------
>
>                 Key: MYFACES-1815
>                 URL: https://issues.apache.org/jira/browse/MYFACES-1815
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.2.2
>            Reporter: Guy Bashan
>         Attachments: MYFACES-1815.patch
>
>
> Hello,
> I have just upgraded from jsf 1.1.5 to 1.2.2 and it seems like all the resources returns
empty response when using /faces/* as servlet mapping.
> During the upgrade I made no changes to web.xml. It looks like this:
>   <servlet>
>     <servlet-name>Faces Servlet</servlet-name>
>     <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>    
>     <load-on-startup>30</load-on-startup>    
>   </servlet>  
>   <servlet-mapping>
>     <servlet-name>Faces Servlet</servlet-name>
>     <url-pattern>/faces/*</url-pattern>
>   </servlet-mapping>
> The web application loaded successfully, but all the resources (images/js/stylesheets)
seems to be broken.
> I copied one of the images url to try and check a request to image directly. For example:
> http://localhost:8080/myapp/faces/images/logo.jpg
> and I got an empty response.
> When I removed the faces:
> http://localhost:8080/myapp/images/logo.jpg
> the image was loaded ok.
> I made further investigation and changed the mapping to: *.faces and it seemed to be
working fine.
> Thanks,
> Guy.

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


Mime
View raw message