Only a type can be imported. jav

2017-06-01  本文已影响0人  程序员学园
Type Exception Report
Message Unable to compile class for JSP:
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: [14] in the generated java file: [D:\Tomcat\apache-tomcat-9.0.0.M21\work\Catalina\localhost\JspProject\org\apache\jsp\define_jsp.java]
Only a type can be imported. javax.transaction.Synchronization resolves to a package

大致意思是只能导入一种类型,而不是一种一个包。

Paste_Image.png

解决办法是

javax.transaction.Synchronization

改成

javax.transaction.*

即可。

我的GitHub
我的CSDN
我的简书
开发笔记

上一篇下一篇

猜你喜欢

热点阅读