Я создал простой веб-сервис с использованием Java. Я хочу загружать банки, связанные с веб-службой во время выполнения. Я выполнил эту задачу для обычного приложения Java. есть то, что я сделалможет загружать баннеры webservice во время выполнения
JarFile jar = new JarFile(f.getPath());
final Manifest manifest = jar.getManifest();
final Attributes mattr = manifest.getMainAttributes();
// Read the manifset in jar files and get the Name attribute
// whare it specified the class that need to load
//for (Object a : mattr.keySet()) {
for (Iterator iter = mattr.keySet().iterator(); iter.hasNext();) {
Object obj = (Object)iter.next();
if ("ServiceName".equals(obj.toString()))
className = mattr.getValue((Name) obj);
//System.out.println(className);
}
/*
* Create the jar class loader and use the first argument passed
* in from the command line as the jar file to use.
*/
JarClassLoader jarLoader = new JarClassLoader(f.getPath());
/* Load the class from the jar file and resolve it. */
Class c = jarLoader.loadClass(className, true);
Моя проблема
можно ставить банки, которые должны быть загружены во время выполнения в отдельной папке, а не положить в папку WEBINF.
Мне нужно поставить банки как по оси, так и в веб-приложение.
Заранее благодарим за любой взнос за этот вопрос.
Я использую веб-сервер tomcat для этого веб-приложения – KItis