0

I am doing a Web application project for my class at the university, it includes a table where I have to read the data from the Java Derby DB, but it always throughs a lot of errors after I added some Java Code into the jsp file. I have tried it with another approache but it all ended up througing an internal server error when and I am realy frustrated here, hopefuly somebody can help me.

The project is not yet finished and some code is missing I have not added the code to display the results.

also I couldnot realy find anything helpfull to the error message: "illegal character: '\u200c' "

I am using Netbeans with a derbyDB and JaveEE

The line where the error appears is the line where I started with the class

<%!public class Customer{

Error: HTTP Status 500 - Internal Server Error type Exception report

messageInternal Server Error

descriptionThe server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: PWC6033: Error in Javac compilation for JSP

PWC6199: Generated servlet error: source value 1.5 is obsolete and will be removed in a future release

PWC6199: Generated servlet error: target value 1.5 is obsolete and will be removed in a future release

PWC6199: Generated servlet error: To suppress warnings about obsolete options, use -Xlint:-options.

PWC6197: An error occurred at line: 22 in the jsp file: /index.jsp PWC6199: Generated servlet error: illegal character: '\u200c'

PWC6197: An error occurred at line: 22 in the jsp file: /index.jsp PWC6199: Generated servlet error: not a statement

PWC6197: An error occurred at line: 22 in the jsp file: /index.jsp PWC6199: Generated servlet error: illegal character: '\u200c'

PWC6197: An error occurred at line: 22 in the jsp file: /index.jsp PWC6199: Generated servlet error: illegal character: '\u200c'

PWC6197: An error occurred at line: 22 in the jsp file: /index.jsp PWC6199: Generated servlet error: not a statement

My code:



<%@ page import="java.sql.*" %> 
<%@page import="org.apache.derby.jdbc.*" %>
<%Class.forName("org.apache.derby.jdbc.ClientDriver"); %>
<%@ page import="java.util.Date"%>  
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Shop</title>
    </head>
    <body>
        <h1>Shopdatenbank</h1>
        <h2>Kunden</h2>‌ ‌
        <%!public class Customer{
                String URL ="jdbc:derby://localhost:1527/shop";
                String USERNAME="";
                String PASSWORD="";

                Connection connection =null;
                PreparedStatement selectKunde = null;
                ResultSet resultSet = null;

             public Customer(){
                try{
                    connection‌ ‌=‌ ‌DriverManager.getConnection(URL, USERNAME, PASSWORD);

                    selectKunde = connection.prepareStatement(
                            "SELECT* FROM customer");
                    }
                    catch (SQLException e){
                        e.printStackTrace();
                        }
                }
                public ResultSet getCustomer(){
                    try{
                        resultSet = selectCustomer.executeQuery();
                        } catch (SQLException e){
                                e-printStackTrace();
                                }
                         return resultSet;
                    }
            }
            %>
            <%
              Customer customer = new Customer();
              resultSet customer = customer.getKunde();
            %>
 ‌ ‌
<table border="1">
            <thead> 
            <tr>
                            <th> Name </th>
                            <th> Street </th>
                            <th> Code </th>
                            <th> City </th>
            </tr>
            </thead>
 ‌

            ‌<tbody>‌ ‌ ‌

                ‌<tr>‌ ‌ ‌

                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                ‌</tr>‌ ‌
                    ‌
            ‌</tbody>‌ ‌
        ‌</table>‌ ‌


    ‌</body>‌ ‌

    ‌<script>‌ ‌
        ‌function‌ ‌delete(){‌ ‌
            ‌document.eingabeFeld.feldName.value‌ ‌="";‌ ‌
        ‌}‌ ‌‌
    ‌</script>‌ ‌ ‌
</html>‌  

PW0013
  • 1

1 Answers1

0

Looks like you've typed an illegal character. Delete and rewrite line 22 in your jsp file.

Check this link, someone had a similar problem: Illegal Character error: '\u200b'

Felix Schildmann
  • 574
  • 1
  • 7
  • 22