jsp java小脚本_jsp小脚本在前端不输出怎么解决

String path = request.getContextPath();

String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

%>

My JSP 'index.jsp' starting page

String s = null;

String file="shoes10059.stl";

try {

// run the Unix "slic3r —load config_m2.ini xxxx.stl" command

// using the Runtime exec method:

Process p = Runtime.getRuntime().exec("C:/Program Files (x86)/Slic3r/slic3r-console --load D:/m2/config_m2.ini"+" "+"D:/m2/"+file+"> D:/m2/log.tex");

BufferedReader stdInput = new BufferedReader(new

InputStreamReader(p.getInputStream()));

BufferedReader stdError = new BufferedReader(new

InputStreamReader(p.getErrorStream()));

// read the output from the command

out.println("Here is the standard output of the command:\n");

while ((s = stdInput.readLine()) != null) {

out.println(s);

}

// read any errors from the attempted command

out.println("Here is the standard error of the command (if any):\n");

while ((s = stdError.readLine()) != null) {

out.println(s);

}

System.exit(0);

}

catch (IOException e) {

out.println("exception happened - here's what I know: ");

e.printStackTrace();

System.exit(-1);

}

%>

这个jsp执行完前端没输出。后台显示结果是

6e6fbfe31cd69da1a48feb63e79e3b6a.png

怎么解决????在线等!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值