-
Aug 31st, 2009, 02:34 PM
#1
Spring and pager tag lib
I am currently using a pager taglib. This pager taglib spits out url similar to http://locahost:8080/springmvcapp/sp...ager.offset=10. I need this url to be sent to the jsp page directly without a controller being invoked with the parameter intact.
web.xml
...
<servlet>
<servlet-name>springcontroller</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springcontroller</servlet-name>
<url-pattern>/spring/*</url-pattern>
</servlet-mapping>
...
springcontroller-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean name="/spring" class="com.ee.server.spring.controllers.HelloContr oller"/>
</bean>
</beans>
HelloController.java
public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
.......
return new ModelAndView("hello.jsp");
}
contraints. I am working within a html frameset hence the ModelAndView has to return a .jsp. A view resolver within springcontroller-servlet.xml does not work as it redirects to a predetermined "home page" on view resolution and hello.jsp is never displayed via a view resolver.
Please advise.
Melroy
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules