1 Reply Latest reply on Apr 18, 2012 9:20 PM by Luis Garcia

    SOLVED: a4j:mediaOutput - Error with Images larger than 2Kb

    Luis Garcia Newbie


      On a default JBoss 7.1.1 the following code won't display Images larger than 2Kb.

      It seems that Request is too big and the server does not see the HTTP/1.1

      I get a HEADER Response

      1. Request Method:GET
      2. Status Code:505 HTTP Version Not Supported


      I'm using the code from the RichFaces Showcase





      <rich:dataTable value="#{tBean.files}" var="ff">


        <f:facet name="header">



        <a4j:mediaOutput element="img" mimeType="#{ff.contentType}"

        style="width:100px; height:100px;" createContent="#{tBean.paint}"

                                                        value="#{ff}" />






                public void paint(OutputStream stream, Object object) throws IOException {

                          if(object instanceof TFile){

                                    TFile ff = (TFile) object;

                                    System.out.println("Writting: "+ ff.getFsName() + " Bytes: "+ ff.getSize());

                                    stream.write(ff.getData(),0, ff.getSize().intValue());