?
Solved

Opening non html files from jsp

Posted on 2003-02-24
8
Medium Priority
?
193 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Media Temple is thrilled to announce the launch of our new Partner Program, specifically designed to empower digital agencies and adtech platforms by offering white-glove support and exclusive hosting enhancements to optimize their sites and their c…
Welcome back to our beginners guide of the popular Unix tool, cron. If you missed part one where we introduced this tool, the link is below. We left off learning how to build a simple script to schedule automatic back ups. Now, we’ll learn how to se…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…
Suggested Courses

616 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