1 16 17 package org.springframework.web.servlet.view; 18 19 46 public class InternalResourceViewResolver extends UrlBasedViewResolver { 47 48 private boolean alwaysInclude = false; 49 50 51 56 public InternalResourceViewResolver() { 57 setViewClass(requiredViewClass()); 58 } 59 60 64 protected Class requiredViewClass() { 65 return InternalResourceView.class; 66 } 67 68 74 public void setAlwaysInclude(boolean alwaysInclude) { 75 this.alwaysInclude = alwaysInclude; 76 } 77 78 79 protected AbstractUrlBasedView buildView(String viewName) throws Exception { 80 InternalResourceView view = (InternalResourceView) super.buildView(viewName); 81 view.setAlwaysInclude(this.alwaysInclude); 82 return view; 83 } 84 85 } 86 | Popular Tags |