【发布时间】:2015-04-04 16:52:21
【问题描述】:
在 jsp 上创建 List 时遇到问题。我不确定它是一个错误(虽然不太可能)还是我实现它的方式有问题。 当我尝试在我的列表对象中存储值时,我得到了这个异常
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 代码。`
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 这不会修复 1.5 下菱形运算符的使用。
-
@DaveNewton,是的,你是对的。
-
我还想补充一点,我使用的是 Netbeans 8.0.2,servlet 版本是 3.1.. 如果有帮助的话