Subject: getting error
Posted By: parth_788 Post Date: 12/13/2005 5:34:33 AM
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.ResultImpl" to type "java.lang.Long"
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    org.apache.jsp.faculty_005flogin_jsp._jspService(faculty_005flogin_jsp.java:93)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)




Go to topic 37558

Return to index page 418
Return to index page 417
Return to index page 416
Return to index page 415
Return to index page 414
Return to index page 413
Return to index page 412
Return to index page 411
Return to index page 410
Return to index page 409