<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="check.jsp"%>
<%@page import="com.vote.bean.*"%>
<%@page import="com.vote.service.*"%>
<%
ObjectBeanService obs=new ObjectBeanService();
FileUtil fu=new FileUtil();
ObjectBean ob = new ObjectBean();
String title = request.getParameter("title");
String discribe = request.getParameter("discribe");
String anonymousFlag = request.getParameter("anonymousFlag");
String remark = request.getParameter("remark");
ob.setTitle(title);
ob.setDiscribe(discribe);
ob.setAnonymousFlag(anonymousFlag);
ob.setRemark(remark);
int id = obs.intsertObjectBean(ob);
String pathinfo=request.getRealPath("");
String from=pathinfo+"/view/diaocha.txt";
String to=pathinfo+"/view/diaocha_"+id+".jsp";
String wj="<% String id=\""+id+"\";"+"%"+">";
** fu.copyFile(from,null,to,"UTF-8",wj);**
System.out.println(pathinfo);
if(id >0){
response.sendRedirect("wjList.jsp");
}else{
%>
<br>
alert("创建失败");<br>
<%response.sendRedirect("wjNew.jsp");
}
%>
想要一个问卷调查系统。在CSDN里面下载了这么一个问卷调查。
在部署运行的时候
fu.copyFile(from,null,to,"UTF-8",wj);
这句报错。然后把这句代码给屏蔽掉之后,能成功运行,但是里面输入的中文字符全部变成乱码,查看数据库里面的也是乱码。
请各位大神指点下,在这些代码的基础上,怎么修改下才能在LINUX中正常显示中文。
另fu.copyFile(from,null,to,"UTF-8",wj);这个是啥意思啊?完全不懂。
或者,如果哪里有能成功运行的问卷调查系统,也请指点下啊。
要linux+java+tomcat+mysql的。。。谢谢