Question

What should be the servlet url-pattern for following URL Paths:


INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7bbf68a9: defining beans [restfulController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.web.servlet.view.BeanNameViewResolver#0,policyView,org.springframework.context.annotation.ConfigurationClassPostProcessor$ImportAwareBeanPostProcessor#0]; root of factory hierarchy
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/number] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/number.*] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/number/] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/policyA] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/policyA.*] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/restservice/policyA/] onto handler 'restfulController'
Mar 5, 2012 11:51:05 AM org.springframework.web.servlet.FrameworkServlet initServletBean

I have tried /restservice*, /restservice/* but only /* is working.

Was it helpful?

Solution 2

I am able to resolve it by removing /restservice/ from my Spring Controller.

OTHER TIPS

You should use /*.

If you use "/restservice/*", you must call <>/restservice/restservice/ ... You may try using a subfix instead of a prefix.. such as *.do or something.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top