Only a type can be imported
2014-09-05 10:45
603 查看
运行jsp报异常: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 7 in the generated java file Only a type can be imported. com.centfor.www.report.GetDate resolves to a package An error occurred at line: 18 in the jsp file: /Test.jsp GetDate cannot be resolved to a type 网上找了一些信息几乎都说没有导如包,但是我导入包了还是报这个异常,导包的方法和路径绝对正确,其他的工程就没有问题,我导入的类里边还引入了其他包不知道是不是这个问题
问题解决了,我用<%@ page import=""%>导入类就报这个错,<jsp:directive.page import=""/>用这个就没有错误了,很奇怪其他什么都一样就标签不一样
相关文章推荐
- Only a type can be imported. com.xxx.xxx.XXX resolves to a package 解决方法 .
- Liferay hook only a type can be imported
- JSP页面500异常:Only a type can be imported. com.testtest.LineCharset resolves to a package
- Only a type can be imported
- tomcat6异常:Only a type can be imported解决方法
- Jsp-引包问题-Only a type can be imported. com.sw resolves to a package
- Only a type can be imported. leier.JDBC_Connection resolves to a package
- Only a type can be imported. com.xxx.xxx.XXX resolves to a package 解决方法
- only a type can be imported: XXX resolves to a package
- Java错误提示--------Only a type can be imported. java.awt.event resolves to a package
- Unable to compile class for JSP: Only a type can be imported. com.gao.model.OutputStatistics resolve
- Only a type can be imported. javax.persistence.Id resolves to a package
- Only a type can be imported. javax.transaction.Synchronization
- Only a type can be imported. resolves to a package
- Only a type can be imported. com.xxx.xxx.XXX resolves to a package 解决方法
- Only a type can be imported. classname resolves to a package的解决
- An error occurred at line: 7 in the generated java file Only a type can be imported. java.util.list
- 解决Only a type can be imported. * resolves to a package
- Only a type can be imported. xxxx resolves to a package
- 解决Only a type can be imported. * resolves to a package