2011-06-15 79 views
1

我有兩個文件:jasperexception請求不能得到解決

ShortCatalog.jsp:

<form method="POST" action="ShortWroxShopController.jsp"> 
    <input type="submit" value="Add to cart" name="AddToCartButton" /> 
    <input type="hidden" value="1861004958" name="ISBN" /> 
    <input type="hidden" value="AddToCart" name="Action" /> 
</form> 

ShortWroxShopController.jsp:

<% String action = request.getParameter("Action"); 
    String ISBN = reguest.getParameter("ISBN"); 
%> 

<%=action %> 

當我點擊按鈕 「添加到購物車」 我得到:

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: 3 in the jsp file: /ShortWroxShopController.jsp 
reguest cannot be resolved 
1: 
2: <% String action = request.getParameter("Action"); 
3:  String ISBN = reguest.getParameter("ISBN"); 
4: %> 
5: 
6: <%=action %> 

請幫忙。謝謝!

回答

0

它是requestq,而不是g。與您在上面的行中成功使用的完全一樣。

enter image description here


無關到具體問題,您應該在JSP喜歡Servlet作爲控制器。

+0

哦,我,我倒得這麼笨。謝謝。 Servlet?是的,我到了那裏。我正在學習 開始JSP Web開發(http://javaboutique.internet.com/resources/books/BeginJSPWebDev/) – Andrej 2011-06-15 19:44:25