疯了,疯了

这网络到底要考啥啊????

如果这么个考法,我出题给老爷爷,他肯定挂掉。。。

郁闷!!!!

要是都这么考试我宁可提前退学!

阅读更多

疯了 彻底疯了 jsf

07-25

最近刚学JSF,用SPRING HIBERNATE JSF集成开发个增删查改的小程序,但是查数据库显示的地方就出错了,现在改成个测试,但是页面空白,日志显示的是:rn[2007-07-25 13:30:59,059] [WARN] (VariableResolverImpl.java:348) - Variable 'DotaAcBean' could not be resolved.rn[2007-07-25 13:30:59,059] [WARN] (VariableResolverImpl.java:348) - Variable 'DotaAcBean' could not be resolved.rnrnrn现在将代码给大家看看.rnWEB.XML rnrnrn rn 30rn rn rn org.apache.myfaces.webapp.StartupServletContextListenerrnrn rn rn javax.faces.CONFIG_FILESrn /WEB-INF/faces-config.xmlrn rnrncontextrnrnorg.springframework.web.context.ContextLoaderServletrnrn1rnrn rn Faces Servletrn javax.faces.webapp.FacesServletrn 1rn rn rn Faces Servletrn *.facesrn rnrn rn contextConfigLocationrn /WEB-INF/applicationContext.xmlrn rnrnrnrn--------------------------------------------------------------------------rnface-config.xmlrnrnrnrnrnrn rn org.springframework.web.jsf.DelegatingVariableResolverrn rnrnrn rn DotaAcBeanrn com.dhc.dota.control.DotaAcrn sessionrn rn rn rnrn--------------------------------------------------------------------------rnrnapplicationContext.xmlrnrnrnrnrnrnrn rn rn rn oracle.jdbc.driver.OracleDriverrn rn rn jdbc:oracle:thin:@172.16.91.106:1521:zjmediarn rn rn testrn rn rn testrn rn rn rn rn rn rn rn rn rn rn com/dhc/dota/Dota.hbm.xmlrn rn rn rn rn org.hibernate.dialect.OracleDialectrn truern rn rn rn rn rn rn rn rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn PROPAGATION_REQUIREDrn PROPAGATION_REQUIREDrn PROPAGATION_REQUIRED,readOnlyrn rn rn rn rn rn rn rnrn----------------------------------------------------------------rnrnDotaAc.javarnrnpackage com.dhc.dota.control;rnrnimport java.io.FileInputStream;rnimport java.io.FileNotFoundException;rnimport java.io.InputStream;rnrnimport java.util.List;rnrnimport javax.faces.model.DataModel;rnimport javax.faces.model.ListDataModel;rnrnimport org.springframework.beans.factory.xml.XmlBeanFactory;rnimport org.springframework.core.io.Resource;rnrnrnrnimport com.dhc.dota.Dota;rnimport com.dhc.dota.DotaIml;rnimport com.dhc.dota.DotaVoForm;rnimport com.dhc.framework.common.util.SpringUtil;rnimport com.dhc.dota.control.SpringFacesUtil;rnpublic class DotaAc rn rn rn private String str="16325";rnrn public String getStr()return str;rnrn rn---------------------------------------------------------------rnDotaList.jsp rn<%@ page language="java" import="java.util.*" pageEncoding="gb2312"%>rn<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> rn<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> rn rnrn rn rn rnrnrn rn rn rn rnrn rnrn rn rn rnrn rn rn rn现在什么都显示不出来,郁闷啊

疯了 疯了!!!~~~ 快来救我~~~~~~

08-14

exception rnrnorg.apache.jasper.JasperException: Exception in JSP: /chklogin.jsp:11rnrn8: String sql = "SELECT * FROM userpassword WHERE USER_ID='"+userid+"' AND USER_PASSWORD='"+password+"'";rn9: DBSQLManager dbsm = new DBSQLManager();rn10: dbsm.setsqlstr(sql);rn11: dbsm.executequery();rn12: ResultSet rs = dbsm.getrs();rn13: if (!rs.next()) rn14: rnrnrnStacktrace:rn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:467)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:389)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnroot cause rnrnjava.lang.NullPointerExceptionrn shell.DBSQLManager.executequery(DBSQLManager.java:59)rn org.apache.jsp.chklogin_jsp._jspService(chklogin_jsp.java:84)rn org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rnrnrnrnrn下面是相关的文件.rnpackage shell;rnrnrnimport java.sql.*;rnimport shell.*;rnpublic class DBSQLManagerrnrn protected Connection conn=null;rn protected Statement stmt=null;rn protected ResultSet rs=null;rn protected String sqlstr;rn rn public DBSQLManager()rn rn tryrn rn sqlstr="";rn rn DBConnectionManager dcm=new DBConnectionManager();rn conn=dcm.getconnection();rn stmt=conn.createStatement();rn rn rn rn catch (Exception e)rn rn e.printStackTrace();rn rn rn rn public Statement getstmt()rn rn return stmt;rn rn rn public Connection getconn()rn rn return conn;rn rn rn public ResultSet getrs()rn rn return rs;rn rn rn public void setsqlstr(String newsqlstr)rn rn this.sqlstr=newsqlstr;rn rn rn public String getsqlstr()rn rn return sqlstr;rn rn rn public void executequery() throws Exceptionrn rnrn rs=stmt.executeQuery(sqlstr);rnrn rn rn rn public void execeteupdate() throws Exceptionrn rn stmt.executeUpdate(sqlstr);rn rn rn public void close() throws SQLExceptionrn rn if(stmt!= null)rn rn stmt.close();rn stmt=null;rn rn conn.close();rn conn=null;rn rn rnrnrnrnrnrnrnrnrnrnrnrn下面是chklogin.jsprn<%@page contentType="text/html;charset=gb2312"%>rn<%@ include file="incoming/common.jsp"%>rnrn<%rn String userid = new String(request.getParameter("userid").trim().getBytes("ISO-8859-1"));rn String password = new String(request.getParameter("password").trim().getBytes("ISO-8859-1"));rn rn String sql = "SELECT * FROM userpassword WHERE USER_ID='"+userid+"' AND USER_PASSWORD='"+password+"'";rn DBSQLManager dbsm = new DBSQLManager();rn dbsm.setsqlstr(sql);rn dbsm.executequery();rn ResultSet rs = dbsm.getrs();rn if (!rs.next()) rn rn String errmsg="error1";rn response.sendRedirect("login.jsp?errmsg="+errmsg);rn return;rn rn rn request.getSession(true);rn String chk="true";rn session.setAttribute("Enter",chk);rn session.setAttribute("userid",userid);rn response.sendRedirect("booklist.jsp");rn%>rnrnrnrnrn

没有更多推荐了,返回首页