Prev Next

Spring / Spring MVC Interview questions

How do I handle views in Spring MVC using XML?

To handle views in Spring MVC, we need to configure InternalResourceViewResolver bean in spring XML where we need to define prefix and suffix of the views name.

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
  <property name="prefix" value="/pages/"/>
  <property name="suffix" value=".jsp"/> 
</bean>

It's right time to invest in Cryptocurrencies! Earn free bitcoins up to $250 now by signing up.

Earn bitcoins upto $250 (free), invest in other Cryptocurrencies when you signup with blockfi. Use the referral link: https://blockfi.com/?ref=f2ab78ba

Using BlockFi, don't just buy crypto - start earning on it. Open an interest account with up to 8.6% APY, trade currencies, or borrow money without selling your assets.

Invest now!!! Get Free equity stock (US,UK only)!

Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.

The Robinhood app makes it easy to trade stocks, crypto and more.

More Related questions...

What is Spring MVC framework? Advantages of Spring MVC framework over other MVC framework. Explain the request flow and its lifecycle in Spring MVC. What is DispatcherServlet in Spring MVC Framework? Spring MVC Framework: What is ContextLoaderListener? What is the difference between ApplicationContext and WebApplicationContext in Spring MVC? Can we have multiple Spring configuration files in Spring MVC? What are the Spring MVC Annotations? What is a Controller in Spring MVC framework? What is the default scope of Spring MVC controllers? Sping MVC - pass model between controllers. Difference Between @RequestParam and @PathVariable in Spring MVC. Explain Interceptors in Spring MVC framework. What is view Resolver pattern and how does it work in Spring MVC? Advantages of Spring MVC over Struts. What is ModelAndView in Spring MVC Framework? What are the different Controller implementations in Spring MVC framework? What is a MultipartResolver in Spring MVC framework? How do I handle exceptions in Spring MVC Framework? How do I handle views in Spring MVC using XML? How to create Controller in Spring MVC? Spring MVC: How to access values from Model in JSP? How to configure DispatcherServlet without web.xml in Spring MVC? What is the role of @EnableWebMvc in Spring MVC? How do I create a Spring MVC controller without a view? How do I return a string from the Spring MVC controller without a view? Explain @ResponseBody annotation in Spring MVC. Explain @RequestBody annotation in Spring MVC. How do I quickly resolve MVC RequestMapping calling wrong controller method? What does request.getParameter return when the parameter does not exist in Spring MVC/Servlet? RestTemplate: How do you resolve SSLHandShakeException? How do I map the JSON field name to a different Java class property name? How do I configure JNDI DataSource in Spring Web Application? How to implement localization in Spring MVC applications? How does Spring MVC provide validation support? Explain MultipartResolver in Spring framework? What is the front controller class of Spring MVC? Explain Spring MVC Interceptor. Advantage of using HandlerInterceptorAdapter in Spring MVC framework. How to start Spring MVC using spring boot? How do I configure DispatcherServlet without using web.xml in Spring MVC? How do I configure Spring MVC view in @Configuration class without spring XML? Is transaction managed at DAO or Service layer in Spring? Difference between Spring MVC and Spring Web Flow. Use of BindingResult interface in Spring MVC. What is resource-ref in web.xml used for? How JNDI lookup differs between Tomcat and weblogic server? How to enable browser caching of static resources (JS, CSS) with Spring MVC? Why Java web apps has dot(.) do extensions? What is @RequestMapping annotation in Spring MVC? How do I configure Spring MVC to eliminate Path-Based Vulnerability? Difference between Spring Web MVC and Spring WebFlux. What is HTTP multipart request? What is content negotiation in Spring MVC? Difference between RequestMapping and GetMapping in Spring MVC/Spring Boot.
Show more question and Answers...

Spring Data Access

Comments & Discussions