I am developing a web app using Spring mvc. I have page which displays all projects in DB. If i click on any of the projects listed, it will display some other additional details of that particular project. This is done by using @PathVariable.
@RequestMapping(value={"/project/{name}"})
public String viewProject(HttpServletRequest request,@PathVariable("name")
String projectName, ModelMap model){
.......
.......
}
Above is my request mapping code. My url will be http://localhost:8083/releaseDashboard/project/CSOB.html (csob is my project name and releaseDashboard is my app name). Till this my app works fine. When i click on the home button from this page, my request is mapped to the above controller method and my url becomes localhost:8083/releaseDashboard/project/home.html. But the expected url is localhost:8083/releaseDashboard/home.html
Can anyone please help me? I read that we can use Interceptor or Filters to change the requested url. But i couldnt see any code snippet for that.
UPDATE
Web.xml
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
spring-servlet.xml
<context:component-scan base-package="com.suntec.reldashboard.controller" />
<context:component-scan base-package="com.suntec.reldashboard.service" />
<context:component-scan base-package="com.suntec.reldashboard.dao" />
<mvc:annotation-driven/>
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>