将外部目录添加到Tomcat类路径 [英] Adding an external directory to Tomcat classpath

查看:231
本文介绍了将外部目录添加到Tomcat类路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的C:驱动器中有一个文件夹,为 C:\app_config\java_app
此文件夹包含一些特定于语言环境的属性文件。

I have a folder in my C: drive as C:\app_config\java_app This folder contains some locale specific property files.

我有一个Java类( PrjPropertilesLocator ),该类在启动Web App时根据默认语言环境加载属性文件。我的Web应用程序正在tomcat中运行。
问题是我应该如何在tomcat类路径中将此目录设置为 C:\app_config\java_app ,以使该目录可用于<$中的ResourceBundle c $ c> PrjPropertilesLocator 类。
有没有一种方法可以为需要它的单个Web应用程序专门设置此文件夹。我不想将属性文件放在 WEB-INF / classes 文件夹。

I have a java class (PrjPropertilesLocator) that loads the property files based on default locale on the startup of the web App.My web application is running inside tomcat. The problem is how should i set this directory C:\app_config\java_app in the tomcat classpath so that this becomes available to the ResourceBundle inside the PrjPropertilesLocator class. Is there a way i can set this folder specifically for a Single web app that needs it.I do not want to put the property files inside WEB-INF/classes folder.

在weblogic上,它运行良好。我在weblogic类路径中的启动脚本之一中设置了目录,并且运行良好。
但是在Tomcat上,我尝试将其放在 startup.bat 以及 setclasspath.bat 中,但是没有

On weblogic this runs fine.I set the directory inside the weblogic classpath in one of its startup scripts and it works fine. But on Tomcat i tried putting it in startup.bat also in setclasspath.bat, but was not able to do so successfully.

推荐答案

只需在 shared.loader 或 /conf/catalina.properties common.loader 属性。

这篇关于将外部目录添加到Tomcat类路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆