2015-06-01 21 views
-1

類型異常報告當我運行我的jsp pgogram我得到這個異常錯誤類型異常報告

消息無法編譯類JSP:

說明服務器遇到阻止其 從內部錯誤履行這一要求。

例外

org.apache.jasper.JasperException:無法編譯類JSP:44在jsp文件: /jsp/ShoppingCart/AddBook.jsp所述線發生

錯誤方法GetValue(字符串)是未定義 爲

類型的HttpServletRequest

int int_BookID,int_CategoryID,int_Price,int_Quantity; 
    String str_Title, str_Author, str_Publisher,str_Edition,str_Description; 
      int_BookID=(int)(10000*Math.random()+1); 
      int_CategoryID=Integer.parseInt(request.getValue("cat")); 
      str_Title=request.getParameter("title"); 
      str_Author=request.getParameter("author"); 
      str_Publisher=request.getParameter("pub"); 
+1

那麼,你的問題是什麼? – dnuka

回答

0

request.getValue(「cat」)是這裏的問題。 我想'貓'是一個參數。 而是使用request.getParameter(「cat」)

PS-我建議您先閱讀JSP的基礎知識,首先嚐試使用HeadFirst系列。

相關問題