guys,I am facing a basic but tricky problem.
Recently I am learning JSP.
As we know the "import" sentence help the java program find the class in system java library or your own file.
Here is an example to illustrate my problem: The imagine have some problem,I will upload it later the day .
Assuming I have App.java in path
$main/com/sub
,in the IDE it will belong to package com.sub; and I have another useApp.java in path
$main/com
,it will be allocated with the package com. Now if useApp.java need to import App.class.As my textbook say,the manually way of import the java class is to put the .class file in the subdirectory of the src directory .Then in this way the App.class should be located at
$main/com/com/sub/App.class
It is very werid,isn't it.This is the structure I use first.Now I know organize the different class in this way is terrible.So is there any convention way to organize your own file's dependencay .Should I just configure the .classpath file of the project in general?
I have trying to use .classpath file.Got the useApp.class file set.and try to invoke it in jsp file use
<%@ page import="fullclassname"%>
And keep getting the error"can not resolve to a type".