passjia 2011-07-13 19:34
浏览 274
已采纳

Ajax调用时不进入service层方法直接返回(windows下正常,linux不能运行)

[code="java"]
public String resumeJob(){
String exeResult = "";
PrintWriter out = null;
response.setContentType("text/json; charset=GBK");
JSONObject obj = new JSONObject();
try{
out = response.getWriter();
[b]boolean flag = downloadSchedulerService.resumeScheduler();[/b] if(flag){
exeResult = "success";
}else{
exeResult = "error";
}
}catch(Exception e){
exeResult = "error";
e.printStackTrace();
}finally{
System.out.println("exeResult = "+exeResult);
out.write(exeResult);
out.flush();
}
return null;
}
[/code]

前台Ajax调用上面的方法。windows系统下正常运行,linux下出现以下情况:

执行到downloadSchedulerService.resumeScheduler();时不进入resumeScheduler方法,后续代码也不执行,直接返回exeResult 对象。

请大牛们帮助解决下!!!!!!!!小弟内急泪奔中~~~~~~~

  • 写回答

1条回答 默认 最新

  • iteye_8658 2011-07-15 14:30
    关注

    返回的对象应该是null吧。 如果是null的话,肯定是发生异常了。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?