Using JSP to run batch file - command launches excel but doesn't open file

I have written a jsp on a server which runs a batch file. Every command line in the batch works fine except the following:
CALL "C:\Program Files\Microsoft Office\Office\Excel.exe" C:\Temp\spreadsheet.xls
I can see that a command prompt has been opened and an instance of Excel has been created, but it does not open the file.
I tried running the batch file on its own. It worked fine. I tried putting the java code in the jsp into a java class, that worked okay too. I think it might be to do with the fact that the client is trying lauch the application through the web, but it's missing some information such as paths.
I am totally running out of ideas.. please help

I guess if I know JSP stands for Java Server Pages..
I would most probably know it runs on servers.Yes, you might, but if you were assuming that the path you gave would always lead to an executable running on the client you'd have a problem. It's worth asking.
I must admit it's probably not the best idea, but if
you can give me some advice on that, that would be
greatJSPs shouldn't have code in them that doesn't pertain to view. I'd wrap something like a system call or Runtime.exec in a Java Bean that you can test off-line without the JSP. Then have the JSP instantiate an instance, invoke its method, and display the value that's returned.
You've read this, of course:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
Everyone who uses Runtime.exec should.
%

Similar Messages

  • Clicking JPEG icon launches Photoshop but doesn't open file

    I run an IMAC Power PC G5 with Tiger 4.11 and recently did a system "archive and install". My JPEG files can only be opened within PhotoshopCS with Command+O. Double clicking an icon from the finder launches Photoshop but does not open the file. Neither does dragging icon on to application icon in the dock.
    I ran the disk utility to verify and repair preferences and repair disk.
    I reset "Launch Services". Then, I trashed "Adobe Photoshop CS Settings" and relaunched the program -- no change.
    Other files (ai, pdf, etc.) open fine. I'm only having trouble with PhotoshopCS.
    Jules

    This is covered in the FAQs of this forum.

  • InDesign tries, but doesn't open files on server.

    When using a finder window to open CS3 and CS4 InDesign files from our server, I get the opening effect but not the open file.  I'm using Snow Leopard on a Mac. Double-clicking will not work, dragging the file into the application icon will not work, only the File > Open menu does the trick and opens the file. Note: double-clicking and dragging into the app icon does work for local files. Any fixes for the server file issue? Thanks!

    i have this problem too at random, i click on the indesign cs4 file in the snow leopard finder, indesign actually makes that temporary whatever it is in the finder but the layout pages don't open. my workaround is to quit indesign and start again and this usually works. but i am wondering if there is any other solution? when the file doesn't open it doesn't help to try to open it through the file menu. so i just quit and start again. (this may be a feature of indesign since sometimes at random the font sizing buttons don't work.)

  • "Edit in Photoshop CC" launches Photoshop, but doesn't open the image.

    I'm working on a Mac with Lightroom 5 and Photoshop CC. When I select "Edit in Photoshop CC" from Lightroom, Photoshop launches, but the image doesn't open up. What is going on? This is a new problem since loading Lightroom 5 & Photoshop CC - it worked normally on my machine with previous versions.
    Thanks!

    Hi,
    I've been dealing with this problem for almost a month now and still no solution. Here's what I've tried:
    - Installed PS 2014 with pre-existing PS CC and LR 5.5 with pre-existing LR 5.4. Then...
    - Uninstalled LR 5.5 and PS 2014, reinstalled PS2014 first, LR second. Didn't work.
    - Did the opposite - reinstalled LR5.5  first, PS2014 second. Didn't work.
    - Removed PS CC and LR 5.4, reinstalled LR 5.5 and PS 2014 (in both orders). Didn't work.
    - Removed everything Adobe from the computer:
       - Creative Cloud, PS CC, PS 2014, LR 5.4 and 5.5
       - Deleted everything I could find relating to PS CC, PS 2014, LR 5.4 and 5.5.
       - Ran AdobeCreativeCloudCleanerTool.exe to remove all traces.
       - Reinstalled Creative Cloud, PS 2014 and LR 5.5. Didn't work.
       - Uninstalled PS 2014 and LR 5.5, reinstalled in reverse order. Didn't work.
    One clue to the problem I stumbled across by accident leads me to believe the problem is something to do with ACRaw. If I try to open a JPG in LR 5.5 it opens fine in PS 2014. However if I try to open a RAW file (Nikon's NEF format) I get the "The file could not be edited because Adobe Photoshop CC 2014 could not be launched" message.
    This is driving me buggy. Without the ability to go back and forth between LR and PS, the whole workflow is ruined.
    Any new thoughts?
    Thanks, EdB

  • Project launches iMovie HD, but doesn't open

    I have an edit on iMovie HD, which for some reason launches iMovie, but doesn't open. Has anyone got any suggestions?

    Try deleting the imovie preference file.
    Close Imovie.
    Then locate a file named com.apple.imovie.plist and get rid of it. Then empty the trash, run a permissions repair with disk utility and restart. That should do it. The files you need to delete are found in:
    /Users/YourName/Library/Preferences/com.apple.imovie.plist
    Sue

  • Double clicking on a file launches the app but doesn't open the file anymore. Why?

    Double clicking on a file launches the app but doesn't open the file anymore. Why?

    I would post in the Illustrator forum here http://forums.adobe.com/community/illustrator or the Dreamweaver forum here http://forums.adobe.com/community/dreamweaver. One of these product forums will be able to help.

  • I am running windows 8, 64 bit, & suddenly have a problem opening files, I have to keep re-booting

    I am running windows 8, 64 bit, & suddenly have a problem opening files, I have to keep re-booting - is there anything in preferences I can change?

    The clipboard error means that the OS or some other application messed up when placing data on the clipboard.
    The reboot to open files means that something has gone wrong at the OS level (otherwise just relaunching Photoshop would work).  We've heard from a few other users with that problem, but never heard back from them what was wrong with their system to cause that behavior.  My guess is a bad driver or malware.

  • Simply put, I do not like like the new color coding "dots" and I do not like having to press the Command key before double clicking to open files in a new window. How hard would have been to include the old version of these two features?

    Simply put, I do not like like the new color coding "dots" and I do not like having to press the Command key before double clicking to open files in a new window. How hard would have been to include the old version of these two features?

    Apple - Mac OS X - Feedback

  • "open with" launches CS5, but doesn't load JPG?

    I am a newbie to Mac, but loving it. When I right-mouse click an image file (such as a JPG) and choose "open with" Photoshop CS5, Photoshop launches but doesn't open the image. The image opens fine from the CS5 open dialog box. "Open with" works well for my other apps. I don't want to permanently associate CS5 to my image files. I've spent hours searching the net for an answer only to find this same question in a couple of places with no replies.
    I'm running an 8 core MacPro with OS X 10.6.3. Any help would be greatly appreciated. BTW, CS5 rocks!

    Launch the Terminal app (/Applications/Utilities/), copy & paste in this one-line command, hit the return key, quit Terminal, and restart. The command resets the LaunchServices database.
    */System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchS ervices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user*
    After you sort this out, see:
    Switching from Windows to Mac OS X,
    Basic Tutorials on using a Mac,
    Mac 101: Mac Essentials,
    Anatomy of a Mac,
    MacTips, and
    Switching to the Mac: The Missing Manual, Snow Leopard Edition.
    Additionally, *Texas Mac Man* recommends:
    Quick Assist.
    Welcome to the Switch To A Mac Guides,
    Take Control E-books, and
    A guide for switching to a Mac.

  • "Unable to read file" error in Excel 2010 when downloading .xls file from IE11

    We have lots of reports that have links for our users to be able to download report results in Excel format. We accomplish this by using the Excel mime type in our .asp pages. Sporadically, we are seeing "Unable to read file" errors in Excel 2010
    after choosing Open from the IE11 save dialog. Choosing Save/Save As and the file will open just fine.
    Also, we can sometimes cause the error to occur more frequently by switching windows during the time when the file is downloading.
    If the file is opened directly from /Temporary Internet Files then it opens just fine.
    Window 7 64-bit
    Thanks in advance!

    Hi,
    I found you replied in a similar thread, did you try the workaround (Reset the IE) that provided there? Did you change a browser to test?
    Then, I suggest we use Process Monitor to do further troubleshooting. Please collect all the actions of IE.exe and Excel.exe, and check the if there are some
    error message/code during you open XLS file from IE 11.
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Textedit doesn't open files. I think I have an old version, version 1.1. How do I update it?

    textedit doesn't open files. I think I have an old version, version 1.1. How do I update it?

    What OS are you on?
    Are you certain it is not compatible with this OS?
    Is there an error message presented?
    What type of file are you trying to open?
    TextEdit is a built in app, shipped with the OS, it can't be downloaded from the store, have you copied TextEdit from a backup or is it trying to run from a backup disk or other copy of the OS - Spotlight can sometimes find & try to run other versions. Eject any backup disks & retry.
    Try opening directly from /Applications (the Finders 'Go menu > Applications' will take you there).
    If you need to restore the App you will need to have it in a backup or use the OS installer.

  • ICal doesn't open files (my own music files) when an event's time arrives.

    Hi apple community, I have a problem. I use to remember things by creating events in iCal with a music file added, but now I can´t, I have updated my iMac to Mavericks and iCal only remembers me an event but doesn't open the songs (with iTunes). (Some times I use events with music files to wake me up jejeje). How can I solve it? Thanks.

    I'd like to comment too here. I used to wake up all the time to music played in iCal, and before 10.8, I also used Applescript iCal events (all of this on my late 2011 Macbook Pro) in place of automator workflows. Since updating, my alarms simply haven't gone off, iCal not opening iTunes the way it should. I would be eager to find a solution.

  • I have mountain lion OSX and parallels with Windows.  Every time I click on a hyperlink in other applications it opens - some 7 Zip file explorer inside Parallels but doesn't go to Safari.  Does anyone know solution?

    I have mountain lion OSX and parallels with Windows.  Every time I click on a hyperlink in other applications it opens - some 7 Zip file explorer inside Parallels but doesn't go to Safari.  Does anyone know solution?

    I suggest that you run software update, after which you should have Safari 6.0.5 - then check Safari - Preferences - Privacy & see that 'Block cookies' is not set to Always.
    Failing that - switch Safari extensions Off via Safari - Preferences - Extensions & test again

  • I want to ask why my invoice lost header title..in my mac i can see my invoice title..but when i open file lost my office name and address on number

    my invoice got my company name and address..when i see in my macbook can see the title..but when i open file to edit lost my title.many customer ask me why..
    i just know lost title.i did't change other setting in my number..hope can gv me answer..last week i use still ok..now lost it.

    Possible problem: You designed the invoice using Numbers '09 but you are now editing it in Numbers 3.  The company name and address are in a page header or footer, something Numbers 3 does not have so it deletes it from the document.
    Possible solution: Return to using Numbers '09.  It should still be in the Applications forlder on your computer.
    Another Possible Solution: Use a text box for your company name and address.
    If you are trying to use Numbers 3, you might want to see if your invoice will print correctly (with or without the company name and address)

  • Why can't I open and retrieve my files from iPhoto and my address book after importing the files from my Power mac G5 to my new Mac Pro? I get a warning that says the new OS on my Pro doesn't open files from a Power Mac. Any idea how I can fix this?

    Why can't I open and retrieve my files from iPhoto and my Address Book after importing the files from my Power Mac G5 to my new Mac Pro? I get a warning that says the new OS on my Pro doesn't open files from a Power Mac. Any idea how I can fix this?

    For your addressbook, export the files to vCard on the PowerMac, then bring them over to your Mac Pro. For your iPhoto, copy the Users -> yourname -> Pictures folder to your Desktop on the Mac Pro, and open iPhoto on the Mac Pro holding the command and option keys.  Select the library file from that Pictures folder and open it.  It should import all the pictures into iPhoto as part of the rebuild process.  Other PowerPC to Intel migration issues are covered here: https://discussions.apple.com/docs/DOC-2295

Maybe you are looking for

  • My Safari Browser doesn't surf on web.

    My Safari Browser (version 6.0 - 7536.25) doesn't surf on web. Chrome and Firefox works fine. But, with my Safari mal-function, my Software Update doesn't work too. Somebody help-me, please?

  • Create activity from survey reponse

    Hi Experts, I'm trying to implement a scenario in campaign automation (CRM2007) where an activity is created when in a survey response a particular questions is answered with a specific answer (for example, when question X has answer Y, an activity (

  • UTL File output shows junk characters

    Hi, I have a interface where i'am displaying the details in a text file using the UTL package. The output is showing correctly but there are few junk characters at the end of the string like small boxes. Can anybody advice as why this is happening an

  • Extra jar fetched but not loaded ?

    Hi there ! I have a very strange issue. I have planned to use JNLP to "deploy" a Java application via HTTP, but I ran into some issues I was able to reproduce even using very simple projects (e.g. a Blank desktop app). The problem I have is that even

  • When are we getting a working version of BB Link?

    Seen all the troubles affecting BlackBerry Link (for example it doesnt connect to my Z10 so I havent even been able to do a backup since I got the device, more the 3 weeks ago), when can we expect a new and working update? Thanks.