Opening non html files from jsp

Posted on 2003-02-24
Medium Priority
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!!!
Question by:ramyaas
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
LVL 18

Expert Comment

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


Author Comment

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

Accepted Solution

kennethxu earned 200 total points
ID: 8013855
set mime mapping in yourapp/WEB-INF/web.xml:
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

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

Author Comment

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!!!
LVL 18

Expert Comment

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.
LVL 14

Expert Comment

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

Expert Comment

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

Community Support Moderator @Experts Exchange

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