写了一个sevlet获取远程图片不知道为什么在tomcat下可以使用,websphere下运行无结果,LOG里也没信息
web.xml的配置:<servlet>
<servlet-name>GetRemoteMap</servlet-name>
<servlet-class>com.hollyinfo.gis.resourceCenter.servlet.GetMapServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>GetRemoteMap</servlet-name>
<url-pattern>/getmap/*</url-pattern>
</servlet-mapping>
在JS里调用:
var url = "http://wangxiaojun:9080/getmap?layers=" + layerList + "&bbox=" + bbox + "&mapHeight=" + iHeight + "&mapWidth=" + iWidth;
document.theImage1.src = url;
sevlet代码:
String urlString = joinQueryURL(layers, bbox, mapHeight, mapWidth);
URL queryURL = new URL(urlString);
URLConnection connection = queryURL.openConnection();
InputStream is = queryURL.openStream();
byte[] but = new byte[1024];
int len=is.read(but);
ServletOutputStream imag = response.getOutputStream();
imag.flush();
imag.close();
is.close();
求助websphere大侠
补充:企业软件 , WebSphere