我有以下代码,它在我的本地开发服务器上运行良好,但是当我上传到部署服务器时,我总是点击文件未找到异常
String urlStr = "http://" + getContext().getRequest().getServerName() +
getContext().getServletContext().getContextPath() + "test.action";
URL url = new URL(urlStr);
InputStream input = url.openStream(); //Error always occurs here, it gives me the correct URL but it says file not found.
谁能帮我这个?