我在jsp上創建列表時出現問題。我不確定它是否存在一個錯誤(雖然不太可能),或者我正在實現它的方式存在一些問題。 當我嘗試保存在我的列表對象的值,我得到這個例外在jsp上創建列表時出現異常
type Exception report
messageInternal Server Error
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP
PWC6199: Generated servlet error:
source value 1.5 is obsolete and will be removed in a future release
PWC6199: Generated servlet error:
target value 1.5 is obsolete and will be removed in a future release
PWC6199: Generated servlet error:
To suppress warnings about obsolete options, use -Xlint:-options.
PWC6197: An error occurred at line: 18 in the jsp file: /OrderCheckOut.jsp
PWC6199: Generated servlet error:
diamond operator is not supported in -source 1.5
(use -source 7 or higher to enable diamond operator)
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1 logs.
首先,我儘管這可能是會話對象未持有的價值,所以我在獲取一個字符串值,其工作的罰款。但我在列表中遇到了問題。以下是我的Jsp代碼.` <% 嘗試購物車displayCart =(Cart)session.getAttribute(「getValue」);
String firstname=displayCart.getProdRefCode().toString();
//This is causing problem I suppose
ArrayList<String>ProdRefCode=new ArrayList<>();
ProdRefCode.add(firstname);
} catch (Exception ex) {
%><p> There is some problem..check..!
<%
}
%>`
誰能幫我把..
任何幫助,將不勝感激..
感謝
@Masud贏得不能修復dia的使用mond運營商在1.5以下。 – 2015-04-04 16:58:37
@DaveNewton,是的你是對的。 – Masudul 2015-04-04 17:02:18
我還想補充一點,我使用Netbeans 8.0.2和servlet版本是3.1 ..如果這有幫助 – 2015-04-04 17:03:51