• Post Reply Bookmark Topic Watch Topic
  • New Topic

jsp error

 
kali wara
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
jsp code following
<html>
<head><title>Getting totalamount</title></head>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.Date.*" %>
<%@ page import="java.util.*" %>
<%@ page import= "java.SimpleDateFormat" %>
<%@ page import =java.text.DateFormat" %>
<body>

<body>

<%

String start_date = request.getParameter("begindate");
String end_date = request.getParameter("enddate");
SimpleDateFormat sdf = java.text.SimpleDateFormat("dd/MM/yyyy");
java.util.Date d = sdf.parse(start_date);
java.utildate e =sdf.parse(end_date);

java.sql.Date startdate = new java.sql.Date(d);
java.sql.Date enddate = new java.sql.Date(e);





Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection("jdbcracle:thin:@toshiba-user:1521rcl","wara","kali");

Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(" SELECT SUM(sale)total FROM DAILYSALE WHERE saledate BETWEEN startdate AND enddate " );

while (rs.next()) {
int result = rs.getInt("total"); %>
<%= result %>

<% }


conn.close();
stmt.close();


%>
</body>
</html>
When i input fields of html form to run the jsp i get error:jasperException sales.jsp(6 18) qoute symbol expected.
Please help me to solve this.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jasperException sales.jsp(6 18) qoute symbol expected.


How much clearer can it be? It's giving you the line number and column position where you forgot a quote character.

P.S. Please be sure to use UBB code tags when posting code; read this for more information.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!