Announcement Announcement Module
Collapse
No announcement yet.
errorsController, I have some questions on it! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • errorsController, I have some questions on it!

    I'm learning a spring sample project which named countries. In countries-servlet.xml I found some code:
    <bean id="errorsController" class="org.springframework.samples.countries.web.E rrorsController">
    <property name="methodNameResolver"><ref local="errorsMethodNameResolver"/></property>
    </bean>
    Yes, it's a bean's reference, but the other code in ErrorsController.java made me puzzle:
    return new ModelAndView("errorHttp404View");
    I don't know how the errorHttp404View mapping to handle in WEB-INF/views/jsp/errors/http404.jsp

  • #2
    Countries example uses ResourceBundleViewResolver - it gets the mappings from /WEB-INF/classes/views-countries.properties.

    Code:
    errorHttp404View.attributesCSV=htitle=&#91;error.http404.htitle&#93;,nav=&#91;nav.jsp&#93;,content=&#91;../errors/http404.jsp&#93;
    [/code]

    Comment

    Working...
    X