看板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