日期:2014-05-20  浏览次数:20626 次

JSP动作元素求解?
JSP动作元素的相关代码如下:
<body>
  <% String str1=request.getParameter("submit1");
  String str2=request.getParameter("submit2");
  if(str1==null){
  str1="";
  }if(str2==null) str2="";
  if(str1.startsWith("word")) response.setContentType("application/msword");
  if(str2.startsWith("excel")) response.setContentType("application/x-msexcel"); %>
  <jsp:include page="openType.txt" flush="true"></jsp:include>
  </body>
上面画横线的地方出错说是找不到openType.txt文件但我确实将该文件放到和当前目录一样的目录下,求高人赐教?问题出现在哪里?

------解决方案--------------------
可以参考spring之类的从classpath导入.