Having problem in exporting data while using "Display Tag" from

Posted on 2006-04-12
Last Modified: 2010-04-01
Hi I am trying to use display tag in my JSP file. The tag shows the data perfectly fine. But when I click on the export options to export the data in excel or pdf it opens the appropriate application but no data is transferred. I have also included the filter in my web.xml file but still it is not working.
Question by:royalcyber
    LVL 2

    Expert Comment

    specify the header field Content-Length.
    Sometimes Internet Explorer makes the query to your URL twice, take any actions if you depend on that.

    Your servlet that returns data should look like:

    ServletContext ctx = this.getServletContext();
    mime = ctx.getMimeType(fileName);
    OutputStream out = aResponse.getOutputStream();
    aResponse.setContentLength( (int)lengthOfFile );
    aResponse.setHeader("Pragma", "no-cache"); //HTTP 1.0
    aResponse.setDateHeader("Expires", 1); //prevents caching at the proxy server
    aResponse.setHeader("Cache-Control", "max-age=0");



    Author Comment

    I am actually using pre-made "display tag" from
    I insatalled the .jar files and .tld files as needed and am just passing an arraylist to these tag in JSP and they display
    the daata in a table and give options such as sorting or export data to excel, xml etc.

    I am not sure how to check teh code for this tag

    Please help
    LVL 23

    Accepted Solution


    I think you might have checke this link already any way just try out that page buffer tag in th solution it may solve your problem and also make sure that all your configurations are correct.

    LVL 2

    Expert Comment

    Anyway what is the URL on this link that is problematic, can you copy paste it so we can analyze it?

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    Run jasper report from servlet 1 202
    html form inside div 3 81
    parse example 13 81
    spring example errors 33 152
    Digital marketing agencies have encountered both the opportunities and difficulties that emerge from working with a wide-ranging organizations.
    For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now