It's a really wierd problem
I'm trying to create an Object with type imLol
and I'm getting the following error:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 13 in the jsp file: /yBillie.jsp
imLol cannot be resolved to a type
10: </head>
11: <body>
12: <%
13: imLol x = new imLol();
14: List<Object[]> r = x.xgetNearCoupons();
15: Users z = Users.getInstance();
16:
An error occurred at line: 13 in the jsp file: /yBillie.jsp
imLol cannot be resolved to a type
10: </head>
11: <body>
12: <%
13: imLol x = new imLol();
14: List<Object[]> r = x.xgetNearCoupons();
15: Users z = Users.getInstance();
16:
i.e. the class imLol
not found
but in the same time I can use the object Users
which in the same class. what's going on?
yBillie.jsp:
<%@page import="java.util.List"%>
<%@page import="implementations.*" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
imLol x = new imLol();
List<Object[]> r = x.xgetNearCoupons();
Users z = Users.getInstance();
%>
</body>
</html>
imLol.java:
package implementations;
import java.util.List;
import org.hibernate.SQLQuery;
import org.hibernate.Session;
public class imLol {
public List<Object[]> xgetNearCoupons() {
Session s = Controller.getSessionFactroy().openSession();
s.beginTransaction();
String mylat = "33.207933", mylng = "35.570246";
int R = 6371;
SQLQuery query = s.createSQLQuery("SELECT * FROM Businesses WHERE CAST(business_id AS DECIMAL(10) = 1");
List<Object[]> l = query.list();
s.getTransaction().commit();
return l;
}
}
Eclipse diagram:
eclipse doesn't make a red line below the imLol
, but when I change it, to gjioarege
, for example, it does.. what's wrong here?