getting error
hi
when i run following code i m getting exception which given after code plz help me out:
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/sql_rt" prefix="sql" %>
<sql:setDataSource var="datasource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/attendance_ceit"
user="root" password="par788"/>
<sql:query var="faculty_logins" dataSource="${datasource}">
select * from faculty_login where faculty_code='${param.faculty_id}' && passward='${param.passward}'
</sql:query>
<html>
<head>
<title>Welcome</title
</head>
<body>
<c:if test="${faculty_logins==0}">
You are invalid user!!!
</c:if>
<c:if test="${faculty_logins==1}">
faculty_add_attendance.html
</c:if>
</body>
</html>
javax.servlet.ServletException: Attempt to coerce a value of type "org.apache.taglibs.standard.tag.common.sql.Result Impl" to type "java.lang.Long"
org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:758)
org.apache.jsp.faculty_005flogin_jsp._jspService(f aculty_005flogin_jsp.java:93)
org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
|