It is very straightforward, so there is no extra explanations needed, I'll just list all the steps in this article, in stead of explaining too much. Just like before, let's take it easy and enjoy a few beautiful photos first.
It is very straightforward, so there is no extra explanations needed, I'll just list all the steps in this article, in stead of explaining too much. Just like before, let's take it easy and enjoy a few beautiful photos first.
When trying to publish the web application onto the server, I found a bug: multiple access of the page can cause the Tomcat server to block and not responding. After some investigation, I finally found the reason: it opens a session when performing queries to the database each time, but it never close the session.
Time to implement and finish the management function now. It is not very complex, so I'll just post codes here without explaining too much.
According to its official document, HibernateTemplate is a helper class that simplifies Hibernate data access code. Let's find out how it simplifies the code and how to let it works.
When trying to commit Chinese data into the database in my application, I encountered a few errors. It turns out that I need to do a few modifications for my application, so that it can support Chinese characters.
I've finished the display portion of the code in my "Today in History" application. Now it is time to start the management portion of the code. For sure, I don't want any users, including anonymous users, to be able to manage my application. So, before implementing the management portion of the code, let's find out how to use Spring Security to protect my application from being accessed by anonymous users.
I've learned several techniques that I need to know to create this application, and I also have added the "Birthday of celebrities" information to my "Today in History" application. Now it is time to finish the main part of this application: displaying all kinds of information of today in history.
There is no doubt that a single table is not enough. In my application, besides the table "day" which stores the general information of a day, I need other tables to store more information, such as the birthdays of famous celebrities. And these tables surely have relations. So I'm gonna learn how to handle these relations of tables in Spring MVC and Hibernate.
Since the database was created, the next step will be using it in my application. I don't want to deal with the database directly. Instead, I want to select an ORM (Object-relational Mapping) framework. Since the Hibernate framework is the most popular, I want to know how it works.