aspose file tools*
The moose likes Servlets and the fly likes word doc servlet  filename question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "word doc servlet  filename question" Watch "word doc servlet  filename question" New topic
Author

word doc servlet filename question

william cipolli
Greenhorn

Joined: Aug 03, 2009
Posts: 4


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)"

I am using IE 6!!
binayakumar patel
Greenhorn

Joined: Jun 26, 2009
Posts: 27
Hi william,

This can help you ....





Regards
Binaya
william cipolli
Greenhorn

Joined: Aug 03, 2009
Posts: 4
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.
binayakumar patel
Greenhorn

Joined: Jun 26, 2009
Posts: 27
Hi,

No need to rewrite doGet() method,
Just replace the line



with



or add this line in your code and check it is working fine or not.



Keep the other thing same. This will resolve the issue. because "inline" will try to open the attached document in the same browser... where many places IE is not support the "inline"


william cipolli
Greenhorn

Joined: Aug 03, 2009
Posts: 4



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


3 is the problem

william cipolli
Greenhorn

Joined: Aug 03, 2009
Posts: 4


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

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: word doc servlet filename question