开发者

What is the best way to save a 1 line variable in a tomcat setup?

I am ne开发者_开发技巧eding to save a 1 line variable, it is just a simple date. This needs to be saved through server restarts etc. I was just wondering what the best way to do this was. I could create a whole DB table for this one variable but I thought that seemed a bit overkill.

Thanks, Jeremy


You want to save it or just configure it?

If you want to just configure it, you can use an init parameter in the web.xml.

If you want to save it (show a form and persist it later), you should look at java.util.Preferences. That would likely work fine, but it would be "global", i.e. across all instances of Tomcat (not that it's likely an issue in this case).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜