• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

config file locaiton

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Ranch Hand
Posts: 165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic