看板java
标 题Re: [JSP ] 如何使用JSP执行外部程式
发信站中正筑梦园 (Thu Jan 18 19:38:30 2007)
转信站ptt!ctu-reader!ctu-gate!news.nctu!news.ccu!reader.ccu!ccudream
※ 引述《[email protected] (舞佾江月任八方N )》之铭言:
> Runtime o_run = Runtime.getRuntime();
> o_run.exec("GA200_onemonth.exe /c C:\Tomcat 5.5\webapps\ROOT\jsptest\45\GA200_onemonth.exe");
这个地方如果不能执行应该会有exception发生
catch然後印出来(当然是印到html...)
application server可能有policy限制某些动作可以执行..某些不行
http://tomcat.apache.org/tomcat-3.2-doc/uguide/tomcat-security-unix.html
像是这个
--
* Origin: 中正筑梦园 (CcuDream.twbbs.org) ★ From: 140.123.235.194