Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

config file locaiton

 
sakthivel shanmugam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I want to set some values in my config file in the domino server and fetch it from my servlet file....

using the code as:
**************
Properties parameters = new Properties();
String filewithroot = getServletConfig().getInitParameter("configFile");
try
{
File file_temp = new File(filewithroot);
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file_temp),buffersize);
parameters.load(bis);
if(parameters != null)
{
path = parameters.getProperty("ereview.servlet.path");
path_stylesheet = parameters.getProperty("finishedmeetings.stylesheet.path");
}
}
catch(Exception exception)
{}

which is that config file?? becoz i dont found any config file over here...or should i go for the creation of a new config file.....if so, what should be the name and extension of that config file....also, where(in which directory) it should be placed in the server...also, should i do some setting changes in the domino server.
pl. post a reply,
with rgds,
Sakthive S.
 
Mohamed Yousuff
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the domino server is J2EE complaint then you can specify the config values in the deployment descriptor file. If the server is not J2EE complaint then you need to consult the domino server documentation, since it may vary from server to server.

Originally posted by sakthivel shanmugam:
Dear All,
I want to set some values in my config file in the domino server and fetch it from my servlet file....

using the code as:
**************
Properties parameters = new Properties();
String filewithroot = getServletConfig().getInitParameter("configFile");
try
{
File file_temp = new File(filewithroot);
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file_temp),buffersize);
parameters.load(bis);
if(parameters != null)
{
path = parameters.getProperty("ereview.servlet.path");
path_stylesheet = parameters.getProperty("finishedmeetings.stylesheet.path");
}
}
catch(Exception exception)
{}

which is that config file?? becoz i dont found any config file over here...or should i go for the creation of a new config file.....if so, what should be the name and extension of that config file....also, where(in which directory) it should be placed in the server...also, should i do some setting changes in the domino server.
pl. post a reply,
with rgds,
Sakthive S.
 
Matthew X. Brown
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well- the servlet init parameters should be described in the web.xml file- so find that file first. Then that file has the init param for your servlet where the config file resides(most likely its a .properties file). If you don't have the init param, you'll need to add one to the web.xml file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic