views:

390

answers:

1

Hi All,

(I've removed client name because of NDA)

Java/JSP newbie here. I have a JSP site and I have a 'Functions' class in WEB-INF/src/client/project/Functions.java

In the Functions.java, the package is com.client.util

This is compiled and ends up as

WEB-INF/classes/client/project/Functions.class
WEB-INF/classes/client/project/Functions$1.class
WEB-INF/classes/client/project/Functions$RequestData.class

Now, in my index.jsp, I try to use this class like so:

<%@ page import="com.client.util.Functions"%><%
Functions.init(request,response,config,out);
%>

And I receive error "Functions cannot be resolved"

How can I make my app aware of this Functions.class?

I'm tried adding various things to web.xml but can't get it to work.

Thanks!

+2  A: 

The directory your classes are in doesn't match the package you are trying to import.

If the package com.client.util is correct, then Functions.class should be in directory WEB-INF/classes/com/client/util/.

andri
Great, thank you. I figured that was the case, but I also figured that code would be handed over in working order ;]