Categories: Java

Top Bookmarks – How to Get Started with Spring MVC & Eclipse

The article lists down top bookmarks (pages) which helped me to quickly get started with Spring MVC with Eclipse. Also, presents some key information at a very high level.

Following are high level steps to get started with your first Spring MVC project using Eclipse:
  • Download Java EE eclipse and configure server for ease of deployment from within Eclipse.
  • Create a Dynamic Web Project in Eclipse.
  • Drag and drop below mentioned Spring and other libraries into the folder WebContent/WEB-INF/lib. One of the key library along with Spring is common logging library. Without this, server fails to start properly.
  • Create following spring configuration files under the WebContent/WEB-INF folder. Go to one of the first two links to understand the content of these XML files.
    • Web.xml
    • <servletName>-servlet.xml
  • Create controllers (Java classes)
  • Create a sub-folder with a name such as views/pages/jsp etc under the WebContent/WEB-INF folder. Create view files under this sub-folder.
Following are tools needed to get started quickly with Spring MVC:
  • Eclipse
  • Spring framework libraries
  • common logging library
  • Tomcat server to run the web app
Following are some key images that would help understand Spring MVC and related concepts. For description, visit above pages.
Following image represents the request-response flow with Spring MVC

Spring MVC Lifecycle (Courtesy: http://java4developers.com/)

Following image represents the request-response flow including services with Spring MVC

Spring MVC Request Lifecycle Representing Backend Services (Courtesy: http://terasolunaorg.github.io/)

 

[adsenseyu1]

Nidhi Rai

Nidhi has been been actively blogging in different technologies such as AI / machine learning and internet technologies. Her field of interest includes AI / ML, Java, mobile technologies, UI programming such as HTML, CSS, Javascript (Angular/ReactJS etc), open-source and other related technologies.

Recent Posts

Creating a RAG Application Using LangGraph: Example Code

Retrieval-Augmented Generation (RAG) is an innovative generative AI method that combines retrieval-based search with large…

5 days ago

Building a RAG Application with LangChain: Example Code

The combination of Retrieval-Augmented Generation (RAG) and powerful language models enables the development of sophisticated…

5 days ago

Building an OpenAI Chatbot with LangChain

Have you ever wondered how to use OpenAI APIs to create custom chatbots? With advancements…

6 days ago

How Indexing Works in LLM-Based RAG Applications

When building a Retrieval-Augmented Generation (RAG) application powered by Large Language Models (LLMs), which combine…

1 week ago

Retrieval Augmented Generation (RAG) & LLM: Examples

Last updated: 25th Jan, 2025 Have you ever wondered how to seamlessly integrate the vast…

2 weeks ago

What are AI Agents? How do they work?

Artificial Intelligence (AI) agents have started becoming an integral part of our lives. Imagine asking…

4 weeks ago