내 필터의보기 폴더 안에 .GSP보기를 렌더링하려고합니다. 다음 코드는 이것을 보여줍니다 :필터의 렌더링 GSP가 작동하지 않습니다.
def filters = {
all(controller:'*', action:'*') {
afterView = { Exception e ->
if (controllerName) {
//some code here
if (annotation!=null) {
switch(response.format){
case 'all':
if(!response.containsHeader("AC_MSG")|| !response.containsHeader("AC_STATUS")){
render(view: "/internalerror", model: [controller: controllerName,action:currentAction,
message:"Response doesn't contain required headers AC_MSG or AC_STATUS. Either add the required headers or use json format.",
example:"Add the following response headers: AC_MSG:response message , AC_STATUS: false or true"
])
return false
}
break
default:
render status: 406
break
}
}
}
}
}
}
문제는 코드가 실행 되더라도이 페이지가 렌더링되지 않는다는 것입니다. 이 페이지는 뷰 디렉토리에 직접 있습니다. 내가 뭘 잘못 했니?
감사합니다,
당신은 왜 리디렉션 만 사용하여 설명 할 수 있을까요? 거짓을 돌려 보내지 않는 이유는 무엇입니까? –