Issue the following
Org. Apache. Jasper. JasperException: Unable to compile class for JSP:
The JSP file: [/./showhistory. JSP] is a mistake in the first line [56]
The constructor History (String, String, float, float, float, float, Date, String) is undefined
Code:
<% @ page language="Java" contentType="text/HTML. Charset=utf-8 "
PageEncoding="utf-8"
The import="Java. SQL. *"
The import="Java. Util. *"
The import="Floyd. *
"%>
//can be initially, but later I joined a parameter in the method of constructing, has been shown may not be the
<body background="backgroundpic. JPG" & gt;
<% request. The setCharacterEncoding (" utf-8 ");
The Object name=session. The getAttribute (" name ");
Object the password=session. The getAttribute (" password ");
%>
<%
The String URL="JDBC: mysql://localhost: 3306/carcontrollner";
Final String USERNAME="root";
Final String PWD="723428";
Try {
Class.forName("com.mysql.jdbc.Driver");
} the catch (Exception e) {}
The Connection Connection=DriverManager. GetConnection (URL, USERNAME, PWD);
String SQL="select * from history where the username=?" ;
PreparedStatement PSTMT=connection. PrepareStatement (SQL);
PSTMT. SetObject (1, name);
The ResultSet rs=PSTMT. ExecuteQuery ();
The History the History=new History ();
List
While (rs), next ()) {
The history=new history (rs. Get string (history_id "), rs. Get string (" username "), rs. GetFloat (" length_preference "), rs. GetFloat (" danger_preference "), rs. GetFloat (" time_preference "), rs. GetFloat (" crossing_preference "), rs, getDate (" datetime "), rs. Get string (" historypath "));
Historys. Add (history);
}
%>
<%
Int count=0;
For (the History a: historys) {
count++;
String id=a.u sername;
%>
<%}
%>