Skip to content

Commit

Permalink
GRAILS-12048 - Return more appropriate error for missing views
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed Mar 9, 2015
1 parent 443e577 commit 6539bb1
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public class GroovyPageViewResolver extends InternalResourceViewResolver impleme
private ConcurrentMap<String, CacheEntry<View>> viewCache = new ConcurrentHashMap<String, CacheEntry<View>>();
private boolean allowGrailsViewCaching = !GrailsUtil.isDevelopmentEnv();
private long cacheTimeout=-1;
private boolean resolveJspView = false;

/**
* Constructor.
Expand Down Expand Up @@ -213,7 +214,10 @@ private View createGroovyPageView(String gspView, ScriptSource scriptSource) {
}

protected View createFallbackView(String viewName) throws Exception {
return createJstlView(viewName);
if(resolveJspView) {
return createJstlView(viewName);
}
return null;
}

protected View createJstlView(String viewName) throws Exception {
Expand Down Expand Up @@ -250,4 +254,8 @@ public boolean isAllowGrailsViewCaching() {
public void setAllowGrailsViewCaching(boolean allowGrailsViewCaching) {
this.allowGrailsViewCaching = allowGrailsViewCaching;
}

public void setResolveJspView(boolean resolveJspView) {
this.resolveJspView = resolveJspView;
}
}

0 comments on commit 6539bb1

Please sign in to comment.