At this point when you click the word download link it opens the download popup with the correct filename printed. If save is clicked it will open the save as box with the correct filename. BUT if we hit open the word doc opens and its title is the servlet name: "WordServlet(Read-Only)"
Would I have to rewrite my previous doGet method? This servlet does both my word and pdf documents. The issue here isn't with the writeContent? I'm new to the servlet world, so i need some hand holding to understand this throughly.
I'm assuming res and response in your code examples were supposed to be httpServletResponse italic and underlined is the code changed. It's still following the same behaivor it was before:
1) prompts user for download with correct name
2) save- saves as correct name
3) opens- as servletname(Read-Only)
4) cancle- cancels dl
Here I separated the function instead of using it for both my pdfs and word documents I used selection to pick. The pdfs should use inline to open in a ie window and word docs should load as an attachment. Everything works fine except the open word doc.
if pdf link is clicked pdf opens in new IE window
if word link is clicked download attchment pop up shows
**if open: word doc opens and title is servername(Read-Only)**
if save: opens save as window with correct filename
if cancel: cancels save