Cannot be resolved to be a type, what does this mean?
843838Feb 13 2006 — edited Jul 18 2009I have a welcome.jsp page, which has a button. when user clicks the button, a new jsp page providing a welcome message is shown. I have java program, in which i have written the connections. The java program is working properly. But when the control transfers to the second jsp page, am encountering a server error.
To link the java program with the second jsp page, i have written the code in second jsp page as :
<%@ page import="project.LoginJdbc"%>
I also created a object for the java program to call it,
<% LoginJdbc obj =new LoginJdbc(); %>
when i execute the program, i get the error as :
Generated servlet error:
Only a type can be imported. project.LoginJdbc resolves to a package
An error occurred at line: 6 in the jsp file: /two.jsp
Generated servlet error:
LoginJdbc cannot be resolved to a type
An error occurred at line: 6 in the jsp file: /two.jsp
Generated servlet error:
LoginJdbc cannot be resolved to a type
****************************************************
Here LoginJdbc is my java page. It is inside the package project
what does this cannot be resolved to a type mean?
what is only a type can be imported mean?
In the same code, when i used * with the import statement, am not getting the only a type can be imported error..
<%@ page import="project.LoginJdbc.*"%> // like this
can anyone help me with including java code with jsp. I need to use seperate code for java and jsp. That is the java page should have all the connection establishment, and when i import the java page in jsp, it should work?
please help