Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Explain Spring Flow  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I tried simple HelloWorld Example in Spring 3

but didn't understand the flow properly

What is the meaning of folloeing code in dispatcher-servlet.xml


<context:component-scan base-package="my.pack.controllers"/>

<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">

<property name="prefix">
<value>/WEB-INF/views/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
 
ranger
Sheriff
Posts: 17314
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you posted isn't part of Spring Web Flow. That is part of Spring MVC. You do a component scan looking for classes with @Component on it, in most likely cases classes with @Controller on them and those methods are mapped to incoming URLs with @RequestMapping.

The ViewResolver is to resolve what gets returned from the Controller to a particular .jsp file to display back to the user.

Mark
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!