6.9 フォームへの直接アクセス

ユーザがフォームに直接アクセスできるようにする場合、ユーザアプリケーションのWARファイル内でいくつかの変更を行い、WARファイルを再展開する必要があります。次に、設定手順について説明します。

  1. WEB-INF/struts-config.xmlファイルで、次のアクションステートメント内で「roles="authUser"」と指定します。

    <action path="/getAFResourceList" scope="request" name="apwaListForm" type="com.novell.srvprv.apwa.actions.GetResourceList" roles="authUser">    
    
  2. また、WEB-INF/struts-config.xmlファイルで、次のアクションステートメント内で「roles="guest, authUser"」と指定します。

    <action path="/createAFResourceRequest" scope="request" name="apwaDetail" type="com.novell.srvprv.apwa.actions.ProcessResourceRequest" roles="guest,authUser">    
    
  3. また、WEB-INF/struts-config.xmlファイルで、次のアクションマッピングを追加します。

     <action path="/getGuestResourceList" scope="request" name="apwaListForm" type="com.novell.srvprv.apwa.actions.GetResourceList" roles="guest">      <forward name="success" path="tiles.guestResourceList"/>      <forward name="displaySelector" path="tiles.guestSelector"/>    </action>     
    
  4. WEB-INF/tiles-defs.xmlファイルで、次の定義を追加します。

     <definition name="tiles.guestSelector" extends=".unauthenticatedLayout">  <put name="title" value="JSP_TITLE_SELECTOR"/>  <put name="body" value="/jsps/tiles/selector.jsp"/></definition><definition name="tiles.guestResourceList" extends=".unauthenticatedLayout">  <put name="title" value="JSP_TITLE_RESOURCE_LIST"/>  <put name="body" value="/jsps/tiles/resourceList.jsp"/></definition>     
    
  5. WARファイルを再展開します。

フォームに直接アクセスするためのURLでは、次の形式を使用する必要があります。

http://localhost:8080/IDMProv/getAFResourceList.do?apwaLeftNavItem=JSP_MENU_RESOURCE_REQUEST_CLASSIC&wfdn=PRDEFDN

パラメータPRDEFDNは、要求定義のDNで置き換える必要があります。このパラメータを含んだ完全な例は次のとおりです。

http://localhost:8080/IDMProv/getAFResourceList.do?apwaLeftNavItem=JSP_MENU_RESOURCE_REQUEST_CLASSIC&wfdn=cn=TestPRDEF,cn=RequestDefs,cn=AppConfig,cn=Test-Antelope,cn=TestDrivers,o=novell