首页 > jsp小脚本在前端不输出怎么解决

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

<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="java.io.InputStreamReader"%>
<%@page import="java.io.IOException"%>
<%@page import="java.io.File"%>
<%@page import="java.io.FileInputStream"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'index.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--
    <link rel="stylesheet" type="text/css" href="styles.css">
    -->
  </head>
  <body>
    <% 
         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);
        }
    %>
  </body>
</html>

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

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

【热门文章】
【热门文章】