美文网首页
Only a type can be imported. jav

Only a type can be imported. jav

作者: 程序员学园 | 来源:发表于2017-06-01 16:06 被阅读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
    我的简书
    开发笔记

    相关文章

      网友评论

          本文标题:Only a type can be imported. jav

          本文链接:https://www.haomeiwen.com/subject/zujefxtx.html