0

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���lukPG�U�Y�:)6T���x�����}�P7��

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

Marwa Dosoky
  • 406
  • 7
  • 19
  • This usually indicates that an ajax request was used to trigger the generation of the report. To properly render the PDF, you need to trigger a full HTTP (non-ajax) request – kolossus Dec 26 '13 at 03:27
  • I disn't use AJAX for generating the PDF. anyway when I remove the web.xml configurations , it works fine – Marwa Dosoky Dec 26 '13 at 11:32

1 Answers1

0

I used PrimeFaces upload component instead of myFaces upload component

Marwa Dosoky
  • 406
  • 7
  • 19