0

I am trying to run a .jsp project in Netbeans 7.1, here I have 2 .java file under default package like this -

FriendzAvenue
|
...Web Pages
|  |
|  +....META-INF
|  +....WEB-INF
|  .....Login.jsp
|
...Source Packages
   |
   ...<default package>
      |
      ...ConnectionPool.java
      ...MyFunction.java

Now, how can import these 2 file in my Login.jsp file, I can't understand what to write in this line of code -

<%@ page import="java.sql.*, java.io.*"%>
cbsecommerce
  • 47
  • 1
  • 6
  • firstly use a package ,secondly you need to put your compiled class files in the classes directory under WEB-INF and then use import attribute in the `page` directive – Ramanlfc Feb 26 '16 at 14:57
  • @Ramanlfc What to write in .java file for package line - `package ????; `import java.io.PrintStream; `import java.sql.*;` and for `<%@ page import="java.sql.*, java.io.*,??"%>` – cbsecommerce Feb 26 '16 at 15:18
  • since `ConnectionPool.java` and `MyFunction.java` don't have a package , you can't use import attribute in the page directive – Ramanlfc Feb 26 '16 at 19:32

0 Answers0