I have the following JSP:
<%@ page import="foo.*" %>
<html>
<body>
The page count is:
<%=Counter.getCount()%>
</body>
</html>
I have a Counter
class in package foo
which is stored in:
C:apache-tomcat-6.0.32webappsGodWEB-INFclasses
And the container could find the class from its package foo
.
But when I try to add some other class file directly under WEB-INFclasses
and not in any specific package such as foo
, then container can't find that class.
How is this caused and how can I solve it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…