Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Viewing Excel files using JSP

Reply
Thread Tools

Viewing Excel files using JSP

 
 
BenJose
Guest
Posts: n/a
 
      11-20-2004
Iam using a simple webpage to view/download excel files. But for some
reason I use the <a href> tag to point to the excel file and it shows
up garbled. I tried altering the content type and also did some tweaks
but nothing works... Any pointers in this regards ??

Iam using a Apache Tomcat server.

This is the script itself:
<html>

<head>

<meta http-equiv="Content-Language"
content="application/vnd.ms-excel">
<meta http-equiv="Content-Type" content="application/vnd.ms-excel;
charset=windows-1252">

<title>Maine Educational Assessment</title>
<style type="text/css">
<!--
..style1 {font-size: 10px}
-->
</style>

<!-- End of: /portal/sliverheader/sliverhead.html -->

</head>
<body marginheight="0" marginwidth="0">

<a href="tst.xls">Excel Tst</a>

</body>

</html>

-Ben
 
Reply With Quote
 
 
 
 
Tony Morris
Guest
Posts: n/a
 
      11-20-2004
"BenJose" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> Iam using a simple webpage to view/download excel files. But for some
> reason I use the <a href> tag to point to the excel file and it shows
> up garbled. I tried altering the content type and also did some tweaks
> but nothing works... Any pointers in this regards ??
>
> Iam using a Apache Tomcat server.
>
> This is the script itself:
> <html>
>
> <head>
>
> <meta http-equiv="Content-Language"
> content="application/vnd.ms-excel">
> <meta http-equiv="Content-Type" content="application/vnd.ms-excel;
> charset=windows-1252">
>
> <title>Maine Educational Assessment</title>
> <style type="text/css">
> <!--
> .style1 {font-size: 10px}
> -->
> </style>
>
> <!-- End of: /portal/sliverheader/sliverhead.html -->
>
> </head>
> <body marginheight="0" marginwidth="0">
>
> <a href="tst.xls">Excel Tst</a>
>
> </body>
>
> </html>
>
> -Ben


Which has what to do with Java?

--
Tony Morris
http://xdweb.net/~dibblego/


 
Reply With Quote
 
 
 
 
shakah
Guest
Posts: n/a
 
      11-20-2004
You probably have to add Excel to Tomcat's MIME types in order for it
to send the correct response header.

I think you just have to add the following to the webapp's web.xml (as
a child of the web-app tag):

<mime-mapping>
<extension>xls</extension>
<mime-type>application/msexcel</mime-type>
</mime-mapping>

 
Reply With Quote
 
Kaushiksaha05 Kaushiksaha05 is offline
Junior Member
Join Date: May 2010
Posts: 1
 
      05-20-2010
shakah,

Thank you .It's work....in Bea Weblogic server also....Thank you very much....
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Excel reports ::::Excel 2003 Migration To Excel 2007 =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?= ASP .Net 15 10-24-2007 01:34 PM
A program to replace all JS comments with JSP comments in jsp files tungchau81@yahoo.com Javascript 4 06-03-2006 02:00 PM
[JSP] difference between jsp:forward and jsp:include alexjaquet@gmail.com Java 0 06-02-2006 01:21 PM
A program to replace all JS comments with JSP comments in jsp files tungchau81@yahoo.com Java 0 06-02-2006 06:35 AM
PC Viewing vs DVD Player Viewing - MP3 play very fast Ray Donzdorf Computer Support 0 12-11-2004 01:07 PM



Advertisments