?
Solved

Opening non html files from jsp

Posted on 2003-02-24
8
Medium Priority
?
192 Views
Last Modified: 2011-09-20
Hi experts,

I want to open a non-html document (doc, xls) from jsp. The application server i am using is weblogic 6.1.
When i give <a href="xxx.doc"> click here</a> in a jsp file, the document is not getting opened instead a page with some form of text is getting opened.
Is there any way to map the mime or is there any other way in jsp to open non-html documents.
Earlier replies is deeply appreciated.
Thanks in advance!!!
ramyaas
0
Comment
Question by:ramyaas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 18

Expert Comment

by:bobbit31
ID: 8013335
response.getContentType("<mime type>");

0
 

Author Comment

by:ramyaas
ID: 8013847
Hi bobbit31
Tx for ur response
but how will this solve the purpose
can u explain it
0
 
LVL 14

Accepted Solution

by:
kennethxu earned 200 total points
ID: 8013855
set mime mapping in yourapp/WEB-INF/web.xml:
<mime-mapping>
<extension>doc</extension>
<mime-type>application/msword</mime-type>
</mime-mapping>
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:kennethxu
ID: 8017324
Hi ramyaas, is there any reason a "B" grade? is there something wrong in my comment? thanks :)
0
 

Author Comment

by:ramyaas
ID: 8022693
Nothing of that sort kenneth!!!
The comment was very much useful
actually before i posted it to EE, i used the same set of snippet in web.xml but it was not reflecting.
Your answer confirmed that it was right!!!
Thanks a lot!!!
0
 
LVL 18

Expert Comment

by:bobbit31
ID: 8025996
kenneth, you can request a grade review in community support, and after seeing ramyaas' last comment, i'm sure it'll be no problem.
0
 
LVL 14

Expert Comment

by:kennethxu
ID: 8026252
thanks, ramyaas and bobbit. I'll try bobbit's suggestion.
thanks again.
0
 

Expert Comment

by:SpideyMod
ID: 8034154
Grade changed form B to A per recent dialog.

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
Learn how to use the free Acronis True Image app to easily transfer data between iPhones and Android phones.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question