Hello everybody. I am trying to use displaytag for the first time and having a problem with the displaytag, that i seems not be able to solve. I googled for solution, but couldn't find nothing over internet. Everything else is working it is the only thing thats not working.
Pretty much i am trying just do simple display of table.
the error i get is:
org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: org.apache.jasper.JasperException: Unable to load class for JSP
The JSP page is:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="dt" %>
<%--<jsp:useBean id="ForumList" scope="session" class="mysql.Forum" />--%>
<% session.setAttribute( "test2", mysql.Forum.getMyTopics() ); %>
<dt:table name="sessionScope.test2" />
and my class which is really simple one
package mysql;
import java.sql.*;
import java.sql.Connection;
import java.lang.*;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.jstl.sql.Result;
import javax.servlet.jsp.jstl.sql.ResultSupport;
public class Forum {
public Connection con = null;
public Result myTopics = null;
public MysqlBase mysql = new MysqlBase();
public Result getMyTopics()
{
try
{
con = mysql.getConnection();
Statement stmt = con.createStatement();
ResultSet result = stmt.executeQuery("Select * from lawers_topics");
myTopics = ResultSupport.toResult(result);
con.close();
stmt.close();
}
catch(Exception e)
{
}
//request.setAttribute("MyTopics", this.myTopics);
return this.myTopics;
}
}
I would really appreciate if somebody can point me in the right direction.
EDIT: I forgot to say that I use NetBeans and Tomcat6.0 for the development.