Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6638455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:26:16+00:00 2026-05-25T23:26:16+00:00

I am creating pdf report in spring mvc 3 using dynamic jasper report. I

  • 0

I am creating pdf report in spring mvc 3 using dynamic jasper report. I am setting these headers before writting report to stream.

response.setHeader("Content-Disposition", "inline; filename=" + fileName);
response.setContentType("application/pdf");

Report is generated and display correctly in browser but it misses its name when I try to save it, I set name here fileName.

response.setHeader("Content-Disposition", "inline; filename=" + fileName);

What could be the issue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T23:26:16+00:00Added an answer on May 25, 2026 at 11:26 pm

    With attachment, the file will be served with the provided name properly. When inline, browsers seem to ignore filename, and usually give the servletname part of the URL as default name when saving the inline contents.

    You could try mapping that URL to an appropriate filename, if that is suitable. For example, with <servlet-mapping>. I’m not familiar with spring mvc, so maybe there’s an equivalent.

    Here’s a SO related question: Securly download file inside browser with correct filename

    You may also find this link useful: Filename attribute for Inline Content-Disposition Meaningless?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in my grails application using jasper Reports i am creating report in pdf format,
In Asp.Net for creating a huge pdf report iam using ThreadPool.QueueUserWorkItem, My requirement is
I'm creating a 2-column report in SAS using PROC REPORT inside the ODS PDF
We are creating PDF documents on the fly from the database using PDFsharp .
I'm using html2fpdf for creating PDF documents. Now once I have created that, I
I am creating a pdf document using C# code in my process. I need
i am using itextsharp and creating a PDF with images. currently the images i
I'm creating a dynamically generated PDF using FPDF. My PDF requires many exactly horizontal/vertical
I am creating a simple reporting program using java and iReport (from jasper), which
I'm creating HTML (popup window), EXCEL and PDF report and would like to show

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.