Spring framework can be used to develop both database access layer and the web layer. In most of the places Spring is used to integrate the components in the applications.
Struts is used as MVC framework and it helps to create UI for the web applications.
Hibernate is used to write the Data access layer which interacts with the database in a web application.
Check the tutorial Understanding Spring Struts Hibernate DAO Layer.