第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定

運(yùn)行后對話頁面顯示的問題

/**
?*?對話頁的初始化控制??InitTalkServlet.java
?*/
@SuppressWarnings("serial")
public?class?InitTalkServlet?extends?HttpServlet?{
????@Override
????public?void?doGet(HttpServletRequest?req,?HttpServletResponse?resp)
????????????throws?ServletException,?IOException?{
????????//設(shè)置編碼
????????req.setCharacterEncoding("utf-8");
????????//頁面跳轉(zhuǎn)
????????req.getRequestDispatcher("/WEB-INF/jsp/front/talk.jsp").forward(req,?resp);
????}
?
????@Override
????protected?void?doPost(HttpServletRequest?req,?HttpServletResponse?resp)
????????????throws?ServletException,?IOException?{
????????this.doGet(req,?resp);
????}
}

talk.jsp

<!DOCTYPE?html>
<%@?page?language="java"?contentType="text/html;?charset=utf-8"
????pageEncoding="utf-8"%>
<%
String?path?=?request.getContextPath();
String?basePath?=?request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
	<head>
	<meta?http-equiv="Content-Type"?content="text/html;?charset=UTF-8"?/>
	<title>微信公眾號</title>
	<!--討論區(qū)滾動條begin-->
	<link?rel="stylesheet"?type="text/css"?href="<%=basePath?%>resources/css/jscrollpane1.css"?/>
	<script?src="<%=?basePath?%>resources/js/common/jquery-1.8.0.min.js"?type="text/javascript"></script>
	<!--?the?mousewheel?plugin?-->
	<script?type="text/javascript"?src="<%=basePath?%>resources/js/common/jquery.mousewheel.js"></script>
	<!--?the?jScrollPane?script?-->
	<script?type="text/javascript"?src="<%=basePath?%>resources/js/common/jquery.jscrollpane.min.js"></script>
	<script?type="text/javascript"?src="<%=basePath?%>resources/js/common/scroll-startstop.events.jquery.js"></script>
	<!--討論區(qū)滾動條end-->
	<script?type="text/javascript"?src="<%=basePath?%>resources/js/front/talk.js"></script>
	</head>
	<body>
		<input?type="hidden"?value="<%=basePath?%>"?id="basePath"/>
		<br/>
		<div?class="talk">
			<div?class="talk_title"><span>正在與公眾號對話</span></div>
			<div?class="talk_record">
				<div?id="jp-container"?class="jp-container">
				
				</div>
			</div>
			
			<div?class="talk_word">
				&nbsp;
				<input?class="add_face"?id="facial"?type="button"?title="添加表情"?value=""?/>
				<input?id="content"?class="messages?emotion"???/>
				<input?class="talk_send"?onclick="send();"?type="button"?title="發(fā)送"?value="發(fā)送"?/>
			</div>
		</div>
		<div?style="text-align:center;margin:50px?0;?font:normal?14px/24px?'MicroSoft?YaHei';"></div>
	</body>
</html>

現(xiàn)在第一條對話顯示了呢,不過漢字都是亂碼,發(fā)送按鈕還是沒作用的 呢

正在回答

4 回答

ajax里面使用的數(shù)據(jù)傳送方式是post,你看下你的后臺servlet的方法是不是doPost,就是doPost方法里面處理事務(wù)。

0 回復(fù) 有任何疑惑可以回復(fù)我~

是怎么解決的?我發(fā)送按鈕也發(fā)送不了東西

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕粉4016800 提問者

其他代碼都和老師的一樣,開始我用的jQuery-1.12.0 就老出錯,后來換成1.8.0的 再重新部署一下,就可以了,不知道是否和這個有關(guān)
2017-03-14 回復(fù) 有任何疑惑可以回復(fù)我~
#2

qq_琉璃時間_0 回復(fù) 慕粉4016800 提問者

換成1.8.0也沒有用納!發(fā)送不出去東西
2017-07-03 回復(fù) 有任何疑惑可以回復(fù)我~
/**
?*?對話頁的初始化控制??InitTalkServlet.java
?*/
@SuppressWarnings("serial")
public?class?InitTalkServlet?extends?HttpServlet?{
	@Override
	public?void?doGet(HttpServletRequest?req,?HttpServletResponse?resp)
			throws?ServletException,?IOException?{
		//設(shè)置編碼
		req.setCharacterEncoding("utf-8");
		//頁面跳轉(zhuǎn)
		req.getRequestDispatcher("/WEB-INF/jsp/front/talk.jsp").forward(req,?resp);
	}

	@Override
	protected?void?doPost(HttpServletRequest?req,?HttpServletResponse?resp)
			throws?ServletException,?IOException?{
		this.doGet(req,?resp);
	}
}


0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕粉4016800 提問者

亂碼已解決,可是依舊發(fā)送不出消息
2017-03-07 回復(fù) 有任何疑惑可以回復(fù)我~

貼出關(guān)鍵代碼。

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

慕粉4016800 提問者

瞎搗鼓了一下 終于弄好了,謝謝你啊~~
2017-03-07 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

運(yùn)行后對話頁面顯示的問題

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號