0 Replies Latest reply on Jan 31, 2013 9:33 PM by jankos

    rich:mediaOutput RF 3.3.3

    jankos Newbie

      I am using rf 3.3.3 and having a problem with <rich:mediaOutput> over https. Http everything works fine. So I have two tags on one page <rich:fileUpload> and <rich:mediaOutput>. Until last las night I have been using RF 3.3.2 and both tags did not work. In fact while trying to upload I was gettin arrayoutofbounds exception and it was consuming huge amount of resources. I would try three times and it would consume 100% cpu. It was like that over https, http was fine no problem at all. Yesterday I upgraded to RF 3.3.3 and problem with rich:fileUpload seems to be gone but rich:mediaOutput is still not working right.

      createContent is being executed, I write to a stream but image is not printed. No exception , nothing. I am using JBoss 5.1 and seam 2.2. Again everything works just as desired when I am not using https.

       

                                                <a4j:mediaOutput element="img"

                                                               mimeType="#{image.contentType}"

                                                               createContent="#{picAddingOperator.paintIt}"

                                                               createContentExpression=""

                                                               value="#{row}"

                                                               style="width:99px;height:99px;float:left;margin-left:0px;padding-left:0px"

                                                               cacheable="false"

                                                               session="true"

                                                               standby="#{messages.pic_uploadeding}"

                                                               >

                                                  <f:param value="#{picAddingOperator.timeStamp}" name="time"/>

                                                  <s:conversationId value="#{conversation.id}"/>

                                              </a4j:mediaOutput >

       

      create content is pretty normal as well .

       

      p ublic void paintIt(OutputStream stream, Object object) throws IOException {

              if (object == null || getImages() == null || getImages().isEmpty()) {

                  return;

              }

              if (getImages().size() >= ((Integer) object)) {

                  stream.write(getImages().get((Integer) object).getData());

                  System.out.println("WRITE TO STREAM " + stream.getClass());

              }

              stream.close();

          }

       

      Is this richfaces or Jboss problem. Can you please point me in the right direction to resolve it. I am using self signed certs. Could this cause a problem? Since I get no error messages I am clueless.

       

      printed image html in https and http look the same

      <img id="newTextForm:j_id256:0:j_id261" src="/myapp/a4j/s/3_3_3.Finalorg.ajax4jsf.resource.UserResource/n/s/-1487394660/DATA/eAF9Uk1rFEEUfDsYjEbBZEURDKxRFER7LklQYsCvqAv7Aa5RjKfembeTXmam2-43m8Gg4EEFA17UmwdBj!Giv8BrwEt-gYggIoIIkqvds9GYHJzbG6qr6lW95e8wYDQclzpivMvz8a7pMI1GZjpANmtQX10fjsxqcZETB!eVJ755sK0GuwONnPCCTAlTIhipdXmP-zFPI7!Z7mJAUzXYjrkSlvM23INSDQYTGYqOwHB9HujxOMNiyJX1ctRR5KzDAzQskImSqeVmLbJCV2Qcom7xHuqbK--mn774UPfAq8GOIObGNHiCmz20SIs0sh52GvsmLDgI9vVdCum3UAseizu8HeNUrpz8MSvJTJYWBmIkwzBm13hUR5qX4Uyu7CZGyLTIAaC0CyDXcKBv2kK34t76K0uf18afeAWu!Be3wfTqwePWz7nVMw7hHBxyZXTb0hTSW!mqiYrbP!b!Gno!XHfaLrjBhQocPLyoRHAuDO3CTYWak9RMcZFSle4CZBrKt4q9mWvHxlkk82b1-pevo4uXC227kkew11lkQrJmRiojC0SeEOwpfhdv-80qlS9EgP6NmfMnq41LvivM5eUT5uRbL5TZqOo8FSqLOdnIWD5PSVw5Ozl5YuJ0ZdPpTI!9z!5Yv5rhDQtVe3AR6pFPL1-v3X90yoNSFfqHZMv4x2ojS9qoHy4!Hx169nHpz5bwG1WEBro_?time=1359684858301&amp;conversationId=3" style="width:99px;height:99px;float:left;margin-left:0px;padding-left:0px">

       

      When I copy a link to the image and try to access it directly I can do that again when I am using http when using https it is unavailable and I get

      The requested resource (/myapp/org.ajax4jsf.resource.UserResource/n/s/-1487394660) is not available.

       

      Thank You for any pointers.