已采纳回答 / qq_阿浩_3
在conf的server.xml中修改<Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="utf-8"/>主要加URIEncoding="utf-8"
2016-05-18
已采纳回答 / 慕神3775235
myeclipse和eclipse的区别就在于:myeclipse有很多现成开发好的优秀的插件,目前阶段我们用eclipse来开发动态的web已经很足够了,正规的myeclipse是一个收费软件。
2016-05-18
已采纳回答 / 慕神3775235
修改web服务器端口号是在conf目录下的server.xml文件中修改,用记事本打开,ctrl+f,查找Connector这个单词, <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="utf-8" />把port改为你想要的端口号就行了,默认情况下是80端口
2016-05-18
还有老师request.getRequestDispatcher("request.jsp").forward(request,response);转过去用汉语怎么办???怎么转乱码???
2016-05-16
判断数组的是否为空的方法:判断长度、是否等于null其中一个就好了,字符串才用考虑两个同时,而且严格来说字符串有空格也不是说不存在,视情况而定的,密码昵称只是默认不为空格而已,楼下的有点偏激啊
2016-05-15
改了servlet.xml还是乱码的解决方法:
req.jsp端的代码<a href="request.jsp?username=张三">通过URL传参数</a>
request.jsp的代码
<% String strPtname=request.getParameter("username");
strPtname = new String(strPtname.getBytes("ISO-8859-1"), "UTF-8");
%>
<%=strPtname %>
req.jsp端的代码<a href="request.jsp?username=张三">通过URL传参数</a>
request.jsp的代码
<% String strPtname=request.getParameter("username");
strPtname = new String(strPtname.getBytes("ISO-8859-1"), "UTF-8");
%>
<%=strPtname %>
2016-05-15
已采纳回答 / qq_云在风中_0
原因是MySQL在高版本需要指明是否进行SSL连接。解决方案如下:在mysql连接字符串url中加入ssl=true或者false即可,如下所示。url=jdbc:mysql://127.0.0.1:3306/shop?characterEncoding=utf8&useSSL=true
2016-05-15