Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Batch file and JSP

 
Manjunatha HA
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is it possible to invoke a batch file located in some other directory through a JSP page???
Thanks
Manjunatha
 
Mohamed Yousuff
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes. You can execute a batch file through a jsp. Not only that you can execute any file including .exe
Just get the Runtime by using System.getRuntime() and use the exec method to execute a batchfile.

Originally posted by Manjunatha HA:
Hi,
Is it possible to invoke a batch file located in some other directory through a JSP page???
Thanks
Manjunatha

 
Bal Sharma
Ranch Hand
Posts: 273
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please give us little more code example. Thanks

Yes. You can execute a batch file through a jsp.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic