Pergunta

I am developing a project that exports PDF reports using "JasperReports", and uses "Tomahawk" for uploading textfiles.

To use Tomahawk I have to add the following to "Web.xml" file:

<filter>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<filter-mapping>
    <filter-name>MyFacesExtensionsFilter</filter-name>
    <url-pattern>*.xhtml</url-pattern>
</filter-mapping>

But the following update somehow conflicts with JasperReport exporting mechanism, it doesn't produce any PDF files, instead it add to the very top of the report page garbage data that looks like followings:

%PDF-1.4 %���� 3 0 obj <>stream x���m��:�����f��� �z��i��n��x����yΟ��\�h$;oo���xoL��4�����N�%��Xa���:�?B}�qYS._�ǟգ����p:�M�rc���^�~8�Z��Z�Ȫe��tٶ(=�~>R:&+JǪ�8�EK�x:��V�џ.UJ��tT��H՟����,TN�$5C�4�d5�r�sZs��5�a{u �Z?�����bՆPu������Y]&ߘ�:.x�?�oulp�aR�#󉣇 Q]�,#��3�/�+ gW�(�+ g7�)�+ g�.�W-�:f������u�\�ƽ�i��A;�v9^�ҫ���!�3���X�;�Ӟn�(zsl����JUS{��{��:�~�lD��Va�Q�QQL=j>���)�ܣ�NQ��G͇ثCkW����9-��PH�չ-jbh\¨�kit��uQ���Aek V{�[,TY �|��ޫCmG7��Y��Ѷ�q�2FY8ik>M�[`v0|�;�q*�Ӛ��Lp�L� j,�M3�;u���l ukPG�U�Y�:)6T���x�����}�P7��

Is there is anyway to use both of them ? Jasper Report with Tomahawk ?

Foi útil?

Solução

I used PrimeFaces upload component instead of myFaces upload component

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top