Never used one, but have a look at MultiActionController?
Alternatively have a controller which takes in a map of key:viewNames, and then have your select box values be the key. The your controller simply looks up the view for that controller and forwards/redirects to that view.
Code:
class NavigationController extends AbstractController {
private final Map navigationMap;
public NavigationController(final Map theNavigationMap) {
this.navigationMap = theNavigationMap;
}
public final void whatEverMethodItIsThatYouImplement(final HttpServletRequest request, final HttpServletResponse response) {
String viewName = RequestUtils.getRequiredRequestParameter("viewName");
String view = navigationMap.get(viewName);
return new ModelAndView(view, request.getParametersMap());
}
}
I am doing this from home but you get the idea.
NOTE: whenever I write code like this there is always a nagging feeling that "there must be a better way". And if there is one thing I have learnt, with Spring, THERE IS