程序的最后引用了一个txt文件,但是我把文件存在桌面上,提示错误,怎样才可以把txt文件弄到和程序同一个路径下边。
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
My JSP 'show.jsp' starting pageString 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;charset=gb2312");
}
if(str1.startsWith("excel")){
response.setContentType("application/x-msexcel;charset=gb2312");
}
%>