<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ page contentType="text/html; charset=utf-8" %>
<%@ page language="java" %>
<%@ page import="com.mysql.jdbc.Driver" %>
<%@ page import="java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
Problem accessing /MyFirstWeb/login.jsp. Reason:
PWC6033: Error in Javac compilation for JSP
PWC6199: Generated servlet error:
string:///login_jsp.java:6: ??? com.mysql.jdbc ???
PWC6197: An error occurred at line: 13 in the jsp file: /login.jsp
PWC6199: Generated servlet error:
string:///login_jsp.java:83: ?????
??? ?? setAttribue(java.lang.String,java.lang.String)
??? ?? javax.servlet.http.HttpSession
Caused by:
org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP
PWC6199: Generated servlet error:
string:///login_jsp.java:6: ??? com.mysql.jdbc ???
PWC6197: An error occurred at line: 13 in the jsp file: /login.jsp
PWC6199: Generated servlet error:
string:///login_jsp.java:83: ?????
??? ?? setAttribue(java.lang.String,java.lang.String)
??? ?? javax.servlet.http.HttpSession
****##** 貌似第一步Class.forName就錯了,哪裡錯了了,我在項目右鍵properties-----java buile path------add external jars裡加入了jmysql-connector-java-5.0.6-bin.jar啊 求大蝦指點
你的session定義在哪裡,上面的代碼上沒有看到。如果沒有定義,將上面的request.getSession(true);改成HttpSession = request.getSession(true);