Hello I have created an AppConfig for the jsp path in the follow way:
Then I have tryied to use @PathVariableCode:package com.amadeus.spring.controllers; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.view.InternalResourceViewResolver; import com.amadeus.services.SearchServiceI; import com.amadeus.services.SearchServiceImpl; @Configuration public class AppConfig { // Resolve logical view names to .jsp resources in the /WEB-INF/views directory @Bean ViewResolver viewResolver() { InternalResourceViewResolver resolver = new InternalResourceViewResolver(); resolver.setPrefix("WEB-INF/views/"); resolver.setSuffix(".jsp"); return resolver; } @Bean public SearchServiceI searchService() { return new SearchServiceImpl(); } }
and I receive : HTTP Status 404 - /cat/getProperty/WEB-INF/views/details.jspCode:@RequestMapping(value="/getProperty/{propertyID}", method = RequestMethod.GET) public String getPropertyDetails(@PathVariable String propertyID, @ModelAttribute("resultSet") HashMap<Integer, Property> resultSetInSession,Model model){ Property p=resultSetInSession.get(new Integer(propertyID)); model.addAttribute("propertyToShowDetails",p); return "details"; }
why? So if I cannot differanziate the requestes which is the scop of @RequestMapping?
thank you
Daniele


Reply With Quote