问题
Am using Spring MVC with tiles configuration and loading the Menus using ViewPreparer to load the menus into the application. I want HTTPServlet request object in the execute method of ViewPreparer for getting globalid set in HTTP Headers.
Please suggest how to get request object ...
Thanks in advance :)
回答1:
Here you go.
public class MenuPreparer implements ViewPreparer {
public void execute(TilesRequestContext tilesContext,
AttributeContext attributeContext) throws PreparerException {
HttpServletRequest request = (HttpServletRequest) tilesContext.getRequest();
}
来源:https://stackoverflow.com/questions/15779374/apache-tiles-how-to-get-httpservlet-request-object-in-execute-method-of-viewpr