如何在jsf中获取转发的页面URL

时间:2018-03-03 14:24:46

标签: spring jsf primefaces forward

set(documentation_file ${CMAKE__BINARY_DIR}/docs_ready)

# Documentation target
add_custom_target(docs ALL DEPENDS ${documentation_file})
# Documentation command
add_custom_command(OUTPUT ${documentation_file}
    COMMAND ${DOXYGEN_COMMAND}
    # And mark that documentation is created
    COMMAND ${CMAKE_COMMAND} -E touch ${documentation_file}
)

我使用此代码转发我的primefaces页面 我需要在我的Bean类中获取forwareded页面url 我的意思是我需要得到@Override public void addViewControllers(ViewControllerRegistry registry) { registry.addViewController("/hello") .setViewName("forward:/hi.xhtml"); } 但是这段代码:

"/hello"

给我HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); String url = request.getRequestURL().toString(); 我怎样才能获得"/hi.xhtml"

0 个答案:

没有答案