Spring - Interview Questions and Answers for 'Cognizant (cts)' - 3 question(s) found - Order By Newest Recently asked in TCS , Tech Mahindra, HCL , Accenture and Fidelity. Q1. Explain Flow of Spring MVC ? Spring
Ans. The DispatcherServlet configured in web.xml file receives the request.
The DispatcherServlet finds the appropriate Controller with the help of HandlerMapping and then invokes associated Controller.
Then the Controller executes the logic business logic and then returns ModeAndView object to the DispatcherServlet.
The DispatcherServlet determines the view from the ModelAndView object.
Then the DispatcherServlet passes the model object to the View.
The View is rendered and the Dispatcher Servlet sends the output to the Servlet container.
Finally Servlet Container sends the result back to the user. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  j2ee   spring   mvc   frameworks   web applications   architecture Asked in 11 Companies Basic   frequent Related Questions What are the benefits of using Spring Framework ? What is MVC ? How spring boot works ? What is the difference between Singleton and Prototype Bean scope in Spring ? How can we manage Error Messages in the web application ? Difference between Java beans and Spring Beans ? What bean scopes does Spring support? Explain them. What are some differences between Spring caching and Hibernate caching? Can we have two beans with same class with different bean id in spring ? Ans. Spring Boot is Springs convention-over-configuration solution for creating stand-alone, production-grade Spring-based Applications. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Spring Boot Asked in 7 Companies Related Questions How spring boot works ? How to use spring boot to configure different datasources ? Which spring boot version are you working with ? Which spring boot version are you working with ?
Which spring boot version are you working with ? Can we use Prototype Bean scope with Autowiring ? Can you explain spring boot project Architecture? What is the difference between try-catch and @ExceptionHandler in Java/Spring Boot? Difference between spring and spring boot Q3. How many objects are created when we define a bean with two different name in spring? Spring
Ans. we wont create the objects because of each and every bean will be an object Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Related Questions Difference between == and .equals() ? Why is String immutable in Java ? Explain the scenerios to choose between String , StringBuilder and StringBuffer ?
or
What is the difference between String , StringBuilder and StringBuffer ? What are the difference between composition and inheritance in Java? Explain OOPs
or
Explain OOPs Principles
or
Explain OOPs Concepts
or
Explain OOPs features
or
Tell me something about OOPs What is a Lambda Expression ? What's its use ? What are different ways to create String Object? Explain. Why Char array is preferred over String for storing password? Does garbage collection guarantee that a program will not run out of memory? What is the difference between final, finally and finalize() ?