I am using netbeans 6.9.1 to develop a project using frameworks Hibernate 3.2.5 and JavaServer Faces, i probably followed this tutorial
http://netbeans.org/kb/docs/web/hibernate-webapp.html
In this tutorial it uses GlassFish 3 to setup the p开发者_JS百科roject which i did as well and it works fine. But when i deployed it to my server on apache tomcat 7, it gives this error "Class DBws.DBws is not a Servlet"
I changed the server from glassfish to apache in netbeans and it started giving error in file on this location
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.model.DataModel;
import javax.faces.model.ListDataModel;
with a red line under javax, what to do now, thanks
Add jsf libraries in your WEB-INF/lib folder, libraries can be found here.
Glassfish by default has those libraries but I guess tom-cat doesn't.
精彩评论