代码之家  ›  专栏  ›  技术社区  ›  usertest

如何使用请求参数设置jsf欢迎页面

  •  0
  • usertest  · 技术社区  · 7 年前

    我想用它作为我的JSFJavaEE8Web应用程序的欢迎页面

    <welcome-file-list>
        <welcome-file>channel.xhtml?handle=mehdi</welcome-file>
    </welcome-file-list>
    

    命名为“channel.xhtml?handle=mehdi”。

    有什么东西可以取代“?”比如“&”被替换为 &amp;

    谢谢

    1 回复  |  直到 7 年前
        1
  •  0
  •   usertest    7 年前

    我通过创建一个名为 home.xhtml 我使用的地方

    <f:metadata>
        <f:viewAction action="#{channelBean.setupHome()}"></f:viewAction>
    </f:metadata>
    

    在里面 setupHome() 我设置了参数。