錯誤[我是一個新用戶,所以我不能發表圖片(只是鏈接) http://i.imgur.com/AEjev.pngJSP Servlet的腳本,傳遞參數
我ask.jsp(線15-20)----- -------------------------------------------------
<%!
String corpus = new String();
String getStory()
{
corpus = request.getParameter("story");
return corpus;
}
%>
這似乎是說,它無法找到符號「請求」雖然我已經從我的「processStory」 Servlet發送,如下所示: -
finally {
RequestDispatcher rd = request.getRequestDispatcher("/ask.jsp");
request.setAttribute("story", storyTold);
rd.forward(request, response);
out.close();
}
丟失感嘆號。但是這種代碼不應該在scriptlet中。此外,您設置一個屬性,但嘗試獲取參數。他們不同。 – 2012-03-10 03:38:05