This week's book giveaway is in the
Agile and other Processes
forum.
We're giving away four copies of
The Mikado Method
and have Ola Ellnestam and Daniel Brolund on-line!
See
this thread
for details.
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Java
»
Servlets
Author
hyperlinking files in a servlet
ramu av
Greenhorn
Joined: Feb 25, 2003
Posts: 28
posted
Nov 17, 2004 06:34:00
0
hello
i'm not able to hyperlink the files with extensions other than .txt or .doc
or .html
if extension is .xls or .zip the file is displaying the files in binary format
the code is
out.println("<a href='/titans/something.xls>something</a>");
it works fine if i give the absolute path.
do i need to chand the content type??
somebody help me please.
Balaji Loganathan
author and deputy
Bartender
Joined: Jul 13, 2001
Posts: 3150
posted
Nov 18, 2004 08:33:00
0
Have you tried setting MIME mappings in web.xml file ?
Example
Extension:
pdf
MIME Type: application/pdf
is it only occuring in
servlet
or in static html files as well ?
Spritle Software Blogs
ramu av
Greenhorn
Joined: Feb 25, 2003
Posts: 28
posted
Nov 19, 2004 04:47:00
0
thanks balaji,
but the problem comes only in the
servlets
and not in the static pages.
ramu av
Greenhorn
Joined: Feb 25, 2003
Posts: 28
posted
Nov 19, 2004 04:56:00
0
thanks a lot balaji,
i tried what you had mentioned and my problem is solved.
thanks again.
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: hyperlinking files in a servlet
Similar Threads
SVG slidetool
Logging ..adivse
Send and Receive Binary Data in XML
XStream --> getting "id=someId"
not logging as coded
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter