Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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.
 
I am displeased. You are no longer allowed to read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic