Call udf module in .war file

Hi all, I have a problem related to specify the path of udf folder in .war file. My situation is: I write a java servlet and I deploy it to tomcat7. when I do query aggregation by calling a udf module. I must pass udf location in java client side. I placed it in /WEB-INF/udf. But there is a error, so I must change location to /tomcat7/udf.

Could someone have the same problem and how to resolve?

Thanks.