I'm trying to invoke EXCEL or POWERPOINT file into the browser IE 6.0.  The

I'm running TOMCAT locally on my PC (running Windows NT).
I'm trying to invoke EXCEL or POWERPOINT file into the browser IE 6.0.
The output is coming out all scrambled (almost like ASCII code or something),
where it seems like the applications are not firing up.
However, an MSWord file shows up fine. So I go to the WEB.XML file in the TOMCAT\CONF
folder and notice that a MIME type has been set up for MSWord and not the other two.
I set one up for EXCEL and POWERPOINT but the XLS or PPT files still don't work.
So, just for kicks, I comment out the MSWord MIME definition but the MSWord file still worked!!!
I can't figure out what's going on here.
I'm stopping and starting the TOMCAT service each time I make changes to the WEB.XML file,
but it seems like none of the changes are taking affect.
I install all the viewers for MS-Word, ppt, and excell.
But in Netscape it works fine.

To support various file formats in IE browser while using window.open like .doc, .docx, .ppt, .pptx, .xls, xlsx etc.,
The following code can also be used to force any format to get launch outside IE
For these first configure a filter in web.xml and then include the filter class in given path
<filter>
<filter-name>MimeFilter</filter-name>
<filter-class>com.srk.MimeFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>MimeFilter</filter-name>
<url-pattern>*.xls</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MimeFilter</filter-name>
<url-pattern>*.xlsx</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MimeFilter</filter-name>
<url-pattern>*.ppt</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MimeFilter</filter-name>
<url-pattern>*.doc</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MimeFilter</filter-name>
<url-pattern>*.docx</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MimeFilter</filter-name>
<url-pattern>*.pptx</url-pattern>
</filter-mapping>
and then include the filter class in the declared path
import java.io.*;
import java.util.logging.*;
import javax.servlet.*;
import javax.servlet.Filter;
import javax.servlet.http.*;
public class MimeFilter implements Filter {
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletException {
HttpServletResponse httpResp = (HttpServletResponse) response;
HttpServletRequest httpReq = (HttpServletRequest) request;
String fileUrl = httpReq.getRequestURI();
if(fileUrl.lastIndexOf(".xls")!=-1)
fileUrl = fileUrl.substring(fileUrl.lastIndexOf("/")+1);
httpResp.setContentType("application/vnd.ms-excel");
httpResp.setHeader("Content-disposition", "attachment; filename="+fileUrl);
if(fileUrl.lastIndexOf(".ppt")!=-1)
fileUrl = fileUrl.substring(fileUrl.lastIndexOf("/")+1);
httpResp.setContentType("application/powerpoint");
httpResp.setHeader("Content-disposition", "attachment; filename="+fileUrl);
if(fileUrl.lastIndexOf(".doc")!=-1)
fileUrl = fileUrl.substring(fileUrl.lastIndexOf("/")+1);
httpResp.setContentType("application/msword");
httpResp.setHeader("Content-disposition", "attachment; filename="+fileUrl);
chain.doFilter(request, response);
public boolean isLoggable(LogRecord record) {
return false;
public void destroy() {
public void init(FilterConfig arg0) throws ServletException {
Please let me know your feedback.

Similar Messages

  • How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    How do I port my Windows Word, Excel, and Powerpoint files to the MAC?  What software is needed on the MAC to use them?  Thanks.

    You can certainly use iWork, though I hesitate to recommend it to a seasoned Windows user simply because it would add another level of the unfamiliar with which you would have to gain familiarity. The iWork applications are certainly very competent and in most respects both easy to use and surprisingly powerful. They are not 100% compatible however, though that typically manifests itself in document formatting issues rather than anything more significant.
    I have never attempted to import emails from a Windows system into MacOS - other than in Outlook connected to an Exchange server, thus not really an issue at all. I doubt that the Mail app in MacOS can import directly, but of course you could always set the account(s) up on the Mac and then forward emails you want to keep from the PC. Not elegant, but it works. Virtually any Windows document or file, whichever application created it, can be opened or converted for use on a Mac, and using both systems on my desk each day I rarely see any issues switching stuff from one machine to the other. You may stumble over one or two issues, but likely not significant.
    In switching platforms there will be some inevitable issues, not so much with being able to import your stuff because there's usually a workaround or a utility that can help, but just with getting familiar with the platform and the differences between Windows and MacOS that can obscure their similarities. From time to time the support community here hears from a user who has found the migration very problematic and regrets it, but for the most part the phrase 'I should have done this years ago...' is rather more prevalent!

  • I am trying to import BPM Project.zip file into Oracle enterpriserepository

    I am trying to import BPM Project.zip file into Oracle enterpriserepository from admin tab.
    I am getting the following exception. please help if any one know the solution.
    Performing import...
    Import Failed: Error [100]: An unknown server-side error occurred. Please record stack trace (if available) and contact technical support.
    com.flashline.exception.LoggableException: trouble parsing file in import bundle: SampleWScall/activityGuide.agdl
         at com.flashline.cmee.openapi.service.subsystem.impexp.XMLTranslator.decode(XMLTranslator.java:157)
         at com.flashline.cmee.openapi.service.subsystem.impexp.ImportJob.doJob(ImportJob.java:74)
         at com.flashline.cmee.openapi.service.subsystem.impexp.AbstractJob.perform(AbstractJob.java:75)
         at com.flashline.cmee.openapi.service.subsystem.impexp.JobThread.run(JobThread.java:41)
    Audit results stored in:
    C:\Users\AVINAS~1.YEL\AppData\Local\Temp\import-4705112223687937017.log
    Audit for [Import job.] created on [2012-09-24 11:53:59 IST].
    2012-09-24 11:53:59 IST - Adding Import job with ID=[50403] to job queue.
    Thanks in Advance.

    Hi
    Why are you trying to import BPM zip file are you trying to configure the out of the box workflows?
    They are something that need to be deployed from the process admin on BPM.
    There would be the .exp file you would need as its BPM 10g that you would need to use.

  • To open a Excel and Doc file inside the AIR application

    How to open a Excel and Doc file inside the AIR application.  I have opened the PDF file inside the AIR application.  But i got stuck in opening the Exce and Doc file.  Please help me in this issue.

    AIR does not support this inherently. However, you could write code to parse these file formats. For example, the following is an ActionScript 3.0 library for reading and writing Excel files:
    http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1375018

  • Error while trying to import a repository data file in the B2Bconsole

    I am trying to import a repository data file with the delivery-channel element
    and attributes as below. <delivery-channel name="GM_DC" syncReplyMode="none" nonrepudiation-of-origin="false"
    nonrepudiation-of-receipt="false" secure-transport="true" confidentiality="false"
    routing-proxy="false" document-exchange-name="GM_DE" transport-name="GM"/> I have
    modified the WLC.dtd present in the lib\dtd subdirectory of the WebLogic Integration
    installation directory to add the syncReplyMode attribute. When i import the xml
    file,i get the following error com.bea.b2b.B2BException: ERROR: Invalid document,
    file 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\B2B_COV_Export.xml'. at com.bea.b2b.bulkloader.BulkLoader.processDataFile(Unknown
    Source) at com.bea.b2b.bulkloader.BulkLoader.processDataFile(Unknown Source) at
    com.bea.b2b.bulkloader.BulkLoader.load(Unknown Source)
    Please advise,
    Thanks in advance

    Hello Esther,
    the problem seems to be that the temp folder of the target Integration Builder system can't be found:
    'The system cannot find the path specified
    at [..] FileAccess.getTempDirectory([..])'.
    You'll experience the same problem if you try a file based import or export within the Integration Builder directly.
    I would recommend to continue the search there. You could check if the environment variables (for Windows: TEMP and TMP) of the OS of the system with the target Integration Builder to an existing path. Check also if the WebAs can access this path.
    Good luck
    Frank

  • Hi guys well huge issue my Ipod 4th generation shuffle died and I tried to chrge it I plugged it into the USB port and the red light came on and after 5 seconds  turned off the whole Ipod is dead and I've tried in wall chargers as well that doesn't charge

    Hi guys well huge issue my Ipod 4th generation shuffle died and I tried to chrge it I plugged it into the USB port and the red light came on and after 5seconds turned off the whole Ipod is dead and I've tried in wall chargers as well that doesn't charge what should I do is there a solution or should I claim my warrenty and have it fixed??

    Also my Itunes and computer won'r reconize it

  • Set Adobe Acrobat XI Pro. When I want to save the file in WORD, EXCEL or esporta file into ... immediately throws an error "save as failed to process this document no file was created". What's the problem?

    Set Adobe Acrobat XI Pro. When I want to save the file in WORD, EXCEL or esporta file into ... immediately throws an error "save as failed to process this document no file was created".
    What's the problem?
    Any help in finding a solution is greatly appreciated.
    Thank you,

    Installed AcrobatXI PRO 11.0.09  on seven computers and laptops. Two of them gives an error when you try to save a document in WORD, EXCEL, Power Point, or when exporting to... error: Save failed to process this document. No File was created.
    But all good saves in the format of TXT and jpg.
    I have uninstalled and restored and re-installed and updated and registry cleaned and removed using the special utility Cleaner Tool for Acrobat, but nothing helps.
    On one notebook with Windows 8.1 and Microsoft office 2013, on another laptop with Windows 7 and Microsoft office 2010, the same problem, although there are computers with Windows 7 and Microsoft office 2010 and everything works.
    Tell me where to find the problem and how to solve it.
    Thank you.

  • I'm trying to write an Applescript: when I add a file to a folder, I want finder to name it "1" and increment the other files in the folder by 1. i.e. once I drop a new file into the folder, the file originally called "1" will be renamed "2" etc

    I'm trying to write an Applescript. I have never used Applescript but my boss has just asked me to write a script so I dutifully nodded and said "Yes Boss"...
    The funtionality I need is that I want finder to rename the files in folder when I drop a new file in. When I add the new file (file neame: "1") to a folder, I want to increment the other file names in the folder by 1.
    So when I drop a my new "1" file into the folder, the file original file called "1" will be renamed "2", the original file named "2" will be renamed "3" etc
    I'm creating a 'stream' of images. When I add a new image i want it to nudge the other images in the folder along.
    Thanks guys!

    Maybe this will help. If you monitor the "More Like This" box (top right), other threads appear. Opening them usually displays other threads.
    https://discussions.apple.com/message/1986834#1986834

  • How To Split Large Excel or CSV Files into Smaller Files

    Does anyone know how to split a large Excel or CSV file into multiple smaller files?  Or, is there an app that will work with Mac to do that?

    split [-a suffix_length] [-b byte_count[k|m]] [-l line_count] [-p pattern] [file [name]]
    is a native Terminal command. Read up more on https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/ man1/split.1.html
    I prefer to use gSplit which is gnu coreutils.
    You can install gnu coreutils using homebrew.

  • Trying to load pre-2006 lso files into Logic 8 on my new intel Mac Pro

    I'm trying to load pre-2006 lso files into Logic 8 on my new intel Mac Pro, but they crash the app every time. files saved 2006 and later load OK. Anybody shed any light on this or know of a fix (other than the laborious work-around of re-saving all early lso's in logic 8 on the PPC and physically moving them via a portable drive to the new machine)?
    (BTW, those files also crash the Logic 7 installed on the intel Mac.)

    Upon further work with my migration, I find I was incorrect in the time frame assertion of these failed files: apparently, the creation/modification dates have nothing to do with it and the reality is that some files fail at random, while others load just fine. right now it looks to be about 50/50 Beats me why this is.
    Anyway, for those interested, I've discovered a very helpful key to the quick processing of file data for a plethora of files (i. e. re-saving the "bad" lso files as Logic 8 projects on the older CPU and moving them over to my new machine), and that is the 'control key/launch' of the app. I hadn't realized that Apple had added this feature to Logic to enable easier work on multiple song files when one does not require the audio.
    For those who don't know about it, the 'control key/launch' provides an option to disable the core audio at app start-up, thus allowing files to load instantly without loading the plug-in library files associated with tracks - great for copying MIDI data between song files, or in this case, re-saving a batch.
    Still puzzled, though, as to why so many older lso files crash Logic when they attempt to load on my new CPU.

  • I exported my iBook and got the .ibooks file on my Desktop(iMac Retina 5K), I tried to put the file into the iBooks application but I get a message that says "The file "______.ibooks" couldn't opened because it isn't in the correct format.

    I exported my iBook and got the .ibooks file on my Desktop(iMac Retina 5K), I tried to put the file into the iBooks application but I get a message that says "The file "______.ibooks" couldn't opened because it isn't in the correct format.  I took the same file and transferred it in my MacBook Air and was able to put it in the  iBooks application no problem, the MacBook Air runs OS X v 10.9.5
    Please advise as to Why it would work on an older OS X version as oppose to the newer OS X Yosemite
    Thanks
    JP

    Thanks Lyra,
    I may be doing something wrong because looking at the "Purchased" in iBooks I only see all the books that I actually purchased, none of the iBooks that I created in iBooks Author shows up. I can re-download all the iBooks I've purchased and some in iCouds, but the ones I've created  in iBooks Author are no where to be found.
    Any help is much appreciated,
    Best Regards,
    JP

  • I am trying to load an audible book file into Itunes.I have been getting a 1007 message. What does this mean?

    I have been trying to load an audible book file into itunes. I did this the last time successfully but this time I get this message either I007 or 1007.Basically I get a asked for the audible pw. I do thid. Then I get itunes not installed correctly I uninstalled and reinstalled ( I did uninstall all the apple files).Now I get the 1007 error code. Anybody?

    I downloaded Blue Fire Reader and it requested an adobe id. I clicked on the link that was in the error message stated http//adeactivateadobe.com. Found out that if the date and time on my Ipad is wrong that it won't let me download a book. I was off 5 hours. I reset my clock settings and adobe id let me download a book from the library. I am back to using Overdrive and adobe again on my ipad.
    Thank you.

  • I am trying to import an mp3 audio file into garage band for editing.  drag and drop doesn't work. What now?

    I am trying to import an mp3 audio file into garage band for editing.  Drag and drop does not work. any ideas?

    Try reposting in the Garageband forums. You can find it at:
    https://discussions.apple.com/community/ilife/garageband

  • I bought creative suite production 6 2 years ago. On 12/24 I guess an update came thru and screwed my program all up. Its trying to make we buy to go into the cloud. I'm happy with what I have, I don't went to go into the cloud. I truely feel like Im bein

    I bought creative suite production 6 2 years ago. On 12/24 I guess an update came thru and screwed my program all up. Its trying to make we buy to go into the cloud. I'm happy with what I have, I don't went to go into the cloud. I truely feel like Im being ripped off being forced to move into the cloud'

    uninstall, clean and reinstall per, Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • One of my ipod apps has frozen on waiting, I've tried everything. (Restarting it, plugging it into the computer, in setting etc...)  and also I tried deleting it, but no "X" comes up. but nothing is working. Really annoyed. :( please help.  ,

    one of my ipod apps has frozen on waiting, I've tried everything. (Restarting it, plugging it into the computer, in setting etc...)  and also I tried deleting it, but no "X" comes up. but nothing is working. Really annoyed. :( please help.  ,

    See:
    Downloading apps stuck on waiting...: Apple Support Communities
    \Waiting applications: Apple Support Communities

Maybe you are looking for