aspose file tools*
The moose likes Servlets and the fly likes Run a batch file (.bat) in a servlet application through localhost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Run a batch file (.bat) in a servlet application through localhost" Watch "Run a batch file (.bat) in a servlet application through localhost" New topic
Author

Run a batch file (.bat) in a servlet application through localhost

Lee Fei Tye
Greenhorn

Joined: Nov 26, 2008
Posts: 12
Hi,

I'm having a problem with the issue above.

When i test it on eclipse, it works perfectly fine.

However when i wrap it as WAR and deploy it on localhost, Apache Tomcat 6.0, the batch file just wont run.

fyi, I'm using struts 2 framework.

code (execute method in the servlet):





I've been struggling with this for the past few days already.

Any opinion is well appreciated.


Thanks in advance
~Nick


Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Do you read both the inputstream and errorstream of the process?

Carefully read this article for hints, all the 4 pages: http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Run a batch file (.bat) in a servlet application through localhost