Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Lee Fei Tye
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic