又是Struts,要用绝对路径
在jsp开头加上
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
System.out.println(basePath);
%>
写路径的的时候要写成basePath+你的action在xml中的名字