AnsweredAssumed Answered

Problem previewing binary content

Question asked by jukka on Jun 11, 2007
Latest reply on Aug 3, 2007 by sacco
Hi,

I've just starting to evaluate Alfresco WCM as a management and deployment platform for our webapps. I ran into a small problem with previewing binary content:

I followed the pdf tutorial for evaluating WCM and created the alfrescowww -project and imported the sample war file. With this project I can preview all html and jsp files just fine but all images are "broken" in the preview. They look just fine when browsing files such as:

http://<alfresco-server>/alfresco/d/d/avm/alfrescowww/-1;www;avm_webapps;ROOT;document.gif/document.gif

but through preview in virtual tomcat:

http://alfrescowww.www--sandbox.

the browser fails to display the image.  I've tried both Firefox and IE but the result is the same. It's like something has "touched" or filtered the binary file when viewed through virtualization?

I also created another project and imported my own .war file with some images. This time when viewed through the virtualization I get an error message:


java.lang.IllegalStateException: getWriter() has already been called for this response
        at org.apache.catalina.connector.Response.getOutputStream(Response.java:568)
        at org.apache.catalina.connector.ResponseFacade.getOutputStream(ResponseFacade.java:180)
        at javax.servlet.ServletResponseWrapper.getOutputStream(ServletResponseWrapper.java:101)
        at org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:786)
        at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:354)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.alfresco.filter.CacheControlFilter.doFilter(CacheControlFilter.java:184)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.alfresco.catalina.valve.AVMUrlValve.invoke(AVMUrlValve.java:375)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.alfresco.catalina.valve.AVMUrlValve.invoke(AVMUrlValve.java:718)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        at java.lang.Thread.run(Thread.java:595)

Otherwise it looks like a very interesting and promising product. Just takes a while to see the big picture.

Our environment:

Alfresco Server: alfresco-community-tomcat-2.1.0dev on Linux Fedora Core 6
Alfresco WCM: alfresco-community-wcm-2.1.0dev
JDK:  1.5.0_11-b03

Thanks,
Jukka

Outcomes