eclipse - Importing java file to jsp - cannot be resolved to a type error -


so, after searching web few hours, decided post question here:

i'm writing web project , running on tomcat apache through xampp (a program runs servers).

i wrote java file called "myconnection" establishes connection mysql database , kinds of other things.the file in package java_files.

i need import said file jsp file called "login" can send user , password database check if correct.

i tried import java file using kinds of options -

<%@ page import="java_files.myconnection"%> 

and then:

<% myconnection mycon = new myconnection();  %> 

but gives me "could not resolve type" error

org.apache.jasper.jasperexception: unable compile class jsp:   error occurred @ line: [14] in generated java file: [c:\xampp\tomcat\work\catalina\localhost\targil1_facebook\org\apache\jsp\webcontent\login_jsp.java] type can imported. java_files.myconnection resolves package  error occurred @ line: 18 in jsp file: /webcontent/login.jsp myconnection cannot resolved type 15:  16:  17: <% 18: myconnection mycon = new myconnection(); 19:  20: %> 21:  

i not find working solution. tried:

1.cleaning project

2.set output build folder web-inf (there mycontent.class file in folder under "java_file" folder cannot seen eclipse project explorer can see if open in folder)

3.running project apache tomcat in eclipse

4.various options of import strings (with package name/ without , * instead of class name , on)

and cannot make work!

please, me find solution!!! thank you!

try use <%@ page import="java_files.*" %>


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -