It seems you need can easily work with a small CMS or blog engine. try to see if you could integrate some lightweight CMS or blog-engine.
If you need to write the complete code then perhaps
this[
^] can guide you in architecture and data flow but you will have to translate it to java your self.