• Post Reply Bookmark Topic Watch Topic
  • New Topic

Edit .Properties file in JSP  RSS feed

 
Mamata Chaudhari
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I want to edit only one key of application.prperties file and code I used is


it works fine but it rewrite whole file agin and remove comments which I don't want.
while rewriting it takes too much time which is undesirable...
Please sugegest me right way to do this.

thanks
 
Ravishanker kumar
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May I know the size of file or How may property-values you have in ApplicationConfig.properties.
In standard practice writing value back into ApplicationConfig.properties is not recommended.

~Ravi
 
Mamata Chaudhari
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
thanks for quick reply...
but my project code so so much complicated and there is no other way to do this.

size of that file is around 9.50 kb. and there are almost 30 to 40 properties.

Can you please tell me how to edit a single key?

Thanks

 
Mamata Chaudhari
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
After editing do I need to restart tomcat again ?
I need to edit properties file runtime only.
Please give me any solution.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!