Where to place ResourceBundle properties files
I have written a servlet that will serve content in different languages
depending on the user's browser settings.
The problem is my servlet cannot find the resource bundle properties fiel
even though I put it in the server classes directories.
Namely:
/weblogic/myserver/servletsclasses
/weblogic/classes
/weblogic/myserver/serverclasses
Can anybody tell me where to put my resource bundle properties files??
regards
EM
"Ee-Ming" == Ee-Ming Toh <[email protected]> writes:
Ee-Ming> I have written a servlet that will serve content in different languages
Ee-Ming> depending on the user's browser settings.
Ee-Ming> The problem is my servlet cannot find the resource bundle properties fiel
Ee-Ming> even though I put it in the server classes directories.
Ee-Ming> Namely:
Ee-Ming> /weblogic/myserver/servletsclasses
Ee-Ming> /weblogic/classes
Ee-Ming> /weblogic/myserver/serverclasses
Ee-Ming> Can anybody tell me where to put my resource bundle properties files??
First of all, it would be useful if we knew what version of WebLogic you're
using. There's considerable differences between versions.
In general, if you have a standard WAR structure, you're better off putting
properties files in the "WEB-INF/classes" directory of your WAR structure. If
you do that, you have a chance of being able to redeploy the changed properties
files without having to restart the server.
===================================================================
David M. Karr ; Java/J2EE/XML/Unix/C++
[email protected] ; SCJP; SCWCD
Similar Messages
-
Where is the swing.properties file?
In J2SDK 1.5 beta, where is the swing.properties file.
The file is supposed to be located in <Java Home>/lib/ but it is not there.
Thanks,I'm not sure about 1.5, but normally there isn't one. The defaults are just used unless there is one.
Look here
http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/UIManager.html -
Where to store mysap.properties file?
Hello,
I'm trying to test application Test User Management under SAP J2EE engine of SRM UM. When I run page:
http://mysite:54000/logon/TestUM
there is an message:
Test is disabled, please specify UM_TESTUM=true
I assume that this "UM_TESTUM=true" setting should be put in mysap.properties file. My question is where to store mysap.properties file?
Somewhere here?
c:\usr\sap\SRM2_UM\j2ee\j2ee_40\cluster\server\services\servlet_jsp\work\jspTemp\logon\
Thanks
m./Path for tat file is:
c:\sapmarkets\properties\mySAP.properties
BR
m./ -
Where can i find .properties file for jco connection?
For jco connection to SAP, we need .properties file. Is this file already contained in Exchange Profile or somewhere??
If yes, where can i find .properties file for jco connection or what is the path to this file?
OR, do we have to create manually??
Any help is appreciated.
Thanks.
KarmaHi Karma,
Please take a look at these..
Where to set up the JCO connection?
http://help.sap.com/saphelp_nw04/helpdata/en/bc/42e13d82fcfb34e10000000a114084/frameset.htm
http://help.sap.com/saphelp_webas620/helpdata/en/bc/42e13d82fcfb34e10000000a114084/content.htm
cheers,
Prashanth -
Where should I place my properties file
Hello,
I am working with eclipse. I have created a class that reads a set of properties from a .properties file. Do you know in which folder should I place my file in order it gets read by my class.
SitomaniaI have created a class that reads a set of properties from
a .properties file. Do you know in which folder should I place my
file in order it gets read by my class.Anywhere in the classpath. -
Where to place the class file of the java bean when using the packager
I am using the activex bridge in j2se 1.5.0_06
now i have created the jar file for my bean but where do i place the class file?
i.e the bean..if i keep it in jdk\bin the packager gives me an error..i created a folder in my public jre jre\axbridge\bin and placed the class file there too but even this didnt work
Kindly tell me what is the fully qualified package bean name if i have placed all my files under jdk\bin..D:\Java\jdk1.5.0_06\bin>packager -reg d:\java\jdk1.5.0_06\bin\PersonBean.jar Per
son
Processing D:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\\Person.idl
Person.idl
Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\oaidl.idl
oaidl.idl
Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\objidl.idl
objidl.idl
Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\unknwn.idl
unknwn.idl
Processing D:\PROGRA~1\MICROS~2\VC98\INCLUDE\wtypes.idl
wtypes.idl
Registration failed:
The packaged JavaBean is not located under the directory <jre_home>\axbridge\bin
this is the error i get -
Use resourceBundle properties file from KM
Hi,
I have a properties file called com.mycomp.apps.phonebook.properties in the KM Content of the portal in KM Content => root => mycomp => apps => phonebook => customizing
Now I'm developing a new LinkCommand service for the UserDetails.
http://help.sap.com/saphelp_nw04/helpdata/en/65/29b24053c13f5fe10000000a155106/frameset.htm
The already existing LinkCommand "Send E-mail..." is read from the original resourceBundle com.sap.ip.collaboration.gwui.api.wdf.mail.SendTo
For my new LinkCommand I would like to use the existing properties file. How do I have to define this file in the uicommand xml or properties xml sheet?
Can anybody help me?
With the local project resourceBundle it's working, but I would like to use the file in the KM. Andy ideas?
Regards,
StefanHi Praven,
Copying all existing SendTo properties file to my project would be an option but I wouldn't win anything.
I'm quite happy with the existing SAP collaboraton properties files using e.g. for "Send e-mail".
I won't change this existing ones. I created a new LinkCommand. And for this new LinkCommand I'm looking for a solution how I can handle the translation for it.
I would prefer e using my existing file which is located in the KM. The reason why it's located in the KM is, if I need to change a translation or add a new translation properties file I only need to change it in the KM. If it's a part of the project I need by every change to deploy the project new. -
Read resourceBundle properties file from KM
Hi,
I have a properties file called com.mycomp.apps.phonebook.properties in the KM Content of the portal in KM Content => root => mycomp => apps => phonebook => customizing
Now I'm developing a new LinkCommand service for the UserDetails.
http://help.sap.com/saphelp_nw04/helpdata/en/65/29b24053c13f5fe10000000a155106/frameset.htm
The already existing LinkCommand "Send E-mail..." is read from the original resourceBundle com.sap.ip.collaboration.gwui.api.wdf.mail.SendTo
For my new LinkCommand I would like to use the existing properties file. How do I have to define this file in the uicommand xml or properties xml sheet?
Can anybody help me?
With the local project resourceBundle it's working, but I would like to use the file in the KM. Andy ideas?
Regards,
StefanHi Praven,
Copying all existing SendTo properties file to my project would be an option but I wouldn't win anything.
I'm quite happy with the existing SAP collaboraton properties files using e.g. for "Send e-mail".
I won't change this existing ones. I created a new LinkCommand. And for this new LinkCommand I'm looking for a solution how I can handle the translation for it.
I would prefer e using my existing file which is located in the KM. The reason why it's located in the KM is, if I need to change a translation or add a new translation properties file I only need to change it in the KM. If it's a part of the project I need by every change to deploy the project new. -
1st RMI implementation: where to place the security files?
Hi all!
I'm preparing my first implementation of RMI, I'm using the following example:
http://java.sun.com/docs/books/tutorial/rmi/index.html
At the moment, I have the following questions:
where I have to place the security files? (which directory with what files)
when I try "javaw rmiregistry" there is an error message (can't find main class...)I don't know why... I use the same machine for both client and server... and almoust the same path (client: "...\bin\client" and "...\bin\engine" to server)
Can you help me?
Thanks and regards! :)1) where I have to place the security files? (which directory with what files) For the given example,
For server, filename will be = server.policy
path = should be in the classpath, for better put in folder from where you are executing.
otherwise, put the exact path in the command as (if file is in c:\:)
{noformat}java -cp c:homeannsrc;c:homeannpublic_htmlclassescompute.jar
-Djava.rmi.server.codebase=file:/c:/home/ann/public_html/classes/compute.jar
-Djava.rmi.server.hostname=zaphod.east.sun.com
-Djava.security.policy="c:\server.policy"
engine.ComputeEngineSimilary you can do for client.
{noformat} -
Where to put the properties file
I am a new user of NetBeans6.0, I am making a simple application for user registration. I have coded everything but when I run project I get error caused by the dao.properties file load problem.
I have put the dao.properties file inside the classes directory(where all java class files are build after running the project) of my web application directory( I didn't create this directory though, it is automatically created by IDE), I think there is a problem with its path.
where should I put the dao.properties file so that when I run the project the Tomcat automatically find it and also, what the settings I should do?
actually, I have referred to BalusC'd DAO tutorial: the data layer but that comes in use when we are working off the IDEs, In my case since I am using Netbeans so it may be different from that one.
if someone already done that then please let me knowok, but will it work if I upload the project in a remote host?
lets talk besides IDE, as in your DAO tutorial you have instructed to put the properties file somewhere in root of the classpaths. ok, it will work on a local computer cause there is classpath setting but since remote host doesn't know about that property file and we cant set classpath at remote host(I am not sure though if we can) then how will it work at remote host.
how the server at remote host comes to know about that property file?
In my case since I have made the project using IDE and everything regarding classpaths have been set automatically(IDE done itself), but at remote host these sort of settings are not done then how the project will run?
if I have described my problem incorrectly then please consider it as it is supposed to be. -
Where is the weblogic.properties file in weblogic6.1?
I could only find this file in directory: ..\wlserver6.1\samples\examples\tutorials\migration\banking
why i cannot find it in wlserver6.1 directory? Is there any other properties file
whose function is the same as this one so that i can change setting?
Thanks in advance,
moonriverThe weblogic.properties file is only used for weblogic 5.x, it is no longer used
in 6.x anymore. Instead, a config.xml file is used as similar purpose.
Allen.
"Moonriver" <[email protected]> wrote:
>
I could only find this file in directory: ..\wlserver6.1\samples\examples\tutorials\migration\banking
why i cannot find it in wlserver6.1 directory? Is there any other properties
file
whose function is the same as this one so that i can change setting?
Thanks in advance,
moonriver -
Would someone please tell me how to correctly write a StringArray with key value pair in a properties file?
Example:
button.labels="Mrc","DataExtraction","ScheduleProcessing"
button.Actions=mrc/data/schedule
button.ImageIcons=FTIlittle.gif,FTIlittle.gif,FTIlittle.gif
these are the ways I have tried...
here is the code snippet:
buttonLabels = resources.getStringArray("button.labels");
buttonActions = resources.getStringArray("button.Actions[]");
buttonImageIcons = resources.getStringArray("button.ImageIcons[]");
I keep getting the error saying that my 'array' in the .properties file is not an array.
How do I do this...
Thanks in advance!Hello and Welcome to Apple Discussions.
Apple advise to use the Disk Utility if possible rather than fsck in 10.4.
Boot from your Tiger install DVD.
Don't run the installer but rather choose Disk Utility from the menu bar. In Disk Utility select Macintosh HD on the left hand pane and then click "Repair Disk" and "Repair Disk Permissions".
Quit Disk Utility and exit the Installer.
Let us know how you get on.
mrtotes -
Where to place an xml file that is read by java class file dir structure
Hello all,
I have an xml file that I am using in lieu of a database to track conference rooms . This is a small file. I need to read this file from my java class file which is used by a jsp. Currently I have an absolute path C://logger/conference.xml. All works fine but I need to deploy to a different machine soon and so I need to place this file somewhere in the project directory structure (created by netbeans) so that it will be included in the war file and can be read by the java class file.
Also what would be the relative path to this suggested directory.
TIA!!!public class DOMconference {
/** Creates a new instance of DOMconference */
public DOMconference() { }
//private final static String XML_FILE_NAME = "/opt/conference.xml";//set the output file and location
public String XML_FILE_NAME = "";
private final static String FIRST_CONF_ID = "8200";//set the initial conference number
static Document document;
public void getFilePath(String path)
XML_FILE_NAME = path.replaceAll("\\\\","/");
System.out.println("XML==============="+XML_FILE_NAME);
File file = new File(XML_FILE_NAME);
*generic method that returns a Document object
public Document getDocument() throws SAXException, ParserConfigurationException,
IOException
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setIgnoringComments(true);
factory.setCoalescing(true);
factory.setNamespaceAware(false);
factory.setValidating(false);
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(file); //HERE IS WHERE THE ERROR POINT S TO
return document;
}Here is the complete error:
INFO: Server startup in 1282 ms
XML===============C:/Documents and Settings/gforte/agi/build/web/WEB-INF/conference.xml
[Fatal Error] bin:1:1: Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:172)
at agi.DOMconference.getDocument(DOMconference.java:91)
at agi.DOMconference.getLdapConferences(DOMconference.java:466)
at agi.Ldap.getConferences(Ldap.java:243)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:111)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
[Fatal Error] bin:1:1: Content is not allowed in prolog.
NotifyUtil::java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:606)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:571)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:936)
at org.netbeans.modules.web.monitor.server.NotifyUtil$RecordSender.run(NotifyUtil.java:248)
So if I change my code to this (note that all I change is how the constant XML_FILE_NAME is set and I copy and paste the path that is derived from getFilePath after the String.replaceAll call.):
public class DOMconference {
/** Creates a new instance of DOMconference */
public DOMconference() { }
private final static String XML_FILE_NAME = "C:/Documents and Settings/gforte/agi/build/web/WEB-INF/conference.xml";//set the output file and location
//public String XML_FILE_NAME = "";
private final static String FIRST_CONF_ID = "8200";//set the initial conference number
static Document document;
public void getFilePath(String path)
//XML_FILE_NAME = path;//.replaceAll("\\\\","/");
System.out.println("XML==============="+XML_FILE_NAME);
File file = new File(XML_FILE_NAME);
*generic method that returns a Document object
public Document getDocument() throws SAXException, ParserConfigurationException,
IOException
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setIgnoringComments(true);
factory.setCoalescing(true);
factory.setNamespaceAware(false);
factory.setValidating(false);
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(file);
return document;
}All is fine..
Just in case, here is my xml file contents copy and paste from notepad.
<?xml version="1.0"?><conf_rooms><conf_room><conf_id>8200</conf_id><conf_name>Conference room 1</conf_name></conf_room><conf_room><conf_id>8201</conf_id><conf_name>Conference Room 2</conf_name></conf_room><conf_room><conf_id>8202</conf_id><conf_name>dufus</conf_name></conf_room></conf_rooms>Thanks for hanging in there with me on this.
Graham -
WSAD : loading properties file from EBJ project
Hi,
I am trying to load properties file contains database parameters into my EJB project. I am using WSAD as IDE tool
can you please help me with following.
1. where to place the .properties file physically ?
2.how to load the file to my EJB/DAO classes
3.can i use the same location to place log4j.properties file as well ?
I have tried doing in different ways but none is working.
thank you
Narendragot it working , for information pl go to the following page and section "Using log4j in an EJB Application"
i have followd same steps for loading my properties file .
http://sys-con.com/story/?storyid=43413&DE=1 -
Need to Put Some data in Properties File and Access it
HI Friends,
I want to store the data (servername,User id ) in Archana.properties file from WebDYnpro Application
Pls let e know where to place the properties file and also let me know how to access the properties file from WD application and Modify it.
I have tried placing in: src/mimes, Configuration etc...but i am unale to access it.
Also If i access the properties file and update it, do i again need to deploy the WD application.
Kindly let me know if there are any better methods to store key value pairs from the application.
Regards,
ArchanaHI,
The better approch will be to store the .properties file into a known folder manually created in the server where the Application is deployed?
That means where?
Itried placing my .prpoerties file at several places in my Project(Not server)- Mimes, Configuration, Packages.
I tried the same kind of code u specifed.
But the file.exists returns false, though there is a file in the location.
When i am trying with javaproject, it works but in webdynpro project, its says file not found
Below is the code:
package com.sap.demo.casestudy.wd;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;
public class ReadWriteArc {
@param args
public static void main(String[] args) {
// TODO Auto-generated method stub
WriteProperty("Key3", "Value3");
String value=ReaddProperty("key2");
public static void WriteProperty(String key,String value) {
try {
Properties pro = new Properties();
File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/configuration/Archana.Properties");
//File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/mimes/Components/com.sap.demo.casestudy.wd.comp.webdynproappln.WebDynproAppln/Archana.Properties");
//File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/packages/com/sap/demo/casestudy/wd/Archana.Properties");
if (!f.exists()) {
System.out.println("File not found!");
} else {
FileInputStream in = new FileInputStream(f);
pro.load(in);
pro.setProperty(key, value);
pro.store(new FileOutputStream("Properties"), null);
System.out.println("Operation completly successfuly!");
catch (IOException e) {
System.out.println(e.getMessage());
public static String ReaddProperty(String key) {
try {
String valuemessage=null;
Properties pro = new Properties();
File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/configuration/Archana.Properties");
//File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/mimes/Components/com.sap.demo.casestudy.wd.comp.webdynproappln.WebDynproAppln/Archana.Properties");
//File f = new File("C:/Users/i067753/workspace/720/workspaceSetUp.jdi/LocalDevelopment/DCs/demo.sap.com/casestudy/_comp/src/packages/com/sap/demo/casestudy/wd/Archana.Properties");
if (!f.exists()) {
System.out.println("File not found!");
} else {
FileInputStream in = new FileInputStream(f);
pro.load(in);
valuemessage = pro.getProperty(key);
System.out.println("Read completly successfuly! and the value is "+valuemessage);
return valuemessage;
catch (IOException e) {
System.out.println(e.getMessage());
return null;
And from WD Application i called the class as:
ReadWriteArc.WriteProperty(engname, reserveEngine1);
Pls suggest if am making any mistake here
U say Server, how can i do that?
Regards,
Archana:)
Maybe you are looking for
-
I can not uninstall my existing creative suite. How to do it?
I have a crative suite 4 Design Premium in the computer that can not be uninstalled. I want to replace a new version. Can I install a new version of creative suite without uninstalling the old one.
-
How to use ADF Active Data Service
Hi All, I have one requirement. I have one BPEL Webservice which is generating some Events, after that the data is going to save in Database. Now i want to display this data on UI whenever there is new event is occurred. So I am going to use ADS. Ple
-
Generate a dynamic Transparent container in WD
Hi all, i' ve created a Transparent conatiner in where i will write my text, i also created a Button (ADD) what i want now is, after clicking on the (Add) Button, a new Transparent container will appear, how can' I do this dynamically?? i dont want
-
X-CMS - Developing own Upload Interface - PLEASE HELP
Hi We do not want to use the Portal Admin tool and the myContent portlet for uploading/editing/deleting content from the CMS but want to develop our own Interface and classes. CAn you point me somewhere what API should be used?, how to go about it et
-
Time capsule is very slow on wired Ethernet - tested from multiple sources
I purchased a 2 TB Time Capsule today. I want to use it for automatic backups of my Macbook, and I also want to use it to store files from my Windows PC's. My TC is connected to my network using wred Ethernet only (Wireless is disabled in the TC) My