67,512
社区成员
发帖
与我相关
我的任务
分享
@Test
public void getAllData()
{
try{
Runtime rt = Runtime.getRuntime();
System.out.println("start");
Process proc = Runtime.getRuntime().exec("python getCodes.py");
proc.waitFor();
System.out.println("end");
} catch (Exception e){
e.printStackTrace();
}
}
public class WindServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
WindService windService = new WindService();
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
windService.getAllData();
System.out.println("hahahaha");
request.setAttribute("msg", "done");
request.getRequestDispatcher("/msg.jsp").forward(request, response);
}
}