错误[我是一个新用户,所以我不能发表图片(只是链接) 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