This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Changing Writer File Name

 
Butch C
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In a servlet I am setting the content type to be a
specific content type for a custom application.
res.setContentType("text/apf");
What I can't seem to find is a method to change the
filename that gets created. For example, if I have a servlet
called IOServlet then the servlet engine defaults the
filename to ioservlet.html. Is there a method to change
this name?
Thanks in advance,
Butch
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Butch C",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements.
Thanks.
 
Butch Car
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Name is fixed. Any idea how to solve this issue?
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe what you are looking for is the content disposition header. See the old thread at http://www.javaranch.com/ubb/Forum7/HTML/000224.html .
 
Butch Car
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excellent! I will give that a shot.
 
Butch Car
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Worked like a champ.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic