2 Replies Latest reply on Aug 5, 2014 2:36 AM by kavita.kumari

    Redirection issue in Jive 7

    kavita.kumari

      I have created one custom widget and it is used to submit the form and return back to same form.

       

      In the struts.xml, I specified  action where I provide my own custom FTL and redirection after the form is successfully submitted :

       

      <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
              "http://struts.apache.org/dtds/struts-2.0.dtd">
      <struts>
          <package name="jiveSimpleExample-actions"  namespace="/" extends="community-actions-include">
               <action name="demo"
                  class="com.jivesoftware.clearspace.plugin.example.action.DemoAction">
                  <result name="success">/main/plugin/resources/templates/hello-world.ftl</result>
                  <result name="success-add" type="redirect">hello-world.jspa?created=true</result>
                  <result name="unauth" type="httpheader">
                      <param name="status">401</param>
                  </result>
              </action>
          </package>
      </struts>
      

       

      I am having a problem in redirection to hello-world.jspa after form is successfully submitted.

       

       

      Please let me know if any configuration/mapping require for the redirection to jspa in jive.

       

      Thanks in advance for any help!

       

      Regards,

      Kavita Kumari

        • Re: Redirection issue in Jive 7
          amit.bhonsle

          Hi Ryan Rutan,

           

          I am facing the same issue. Could you please help?

           

          Thanks,

          Amit

            • Re: Redirection issue in Jive 7
              kavita.kumari

              I suppose the problem with my code is action name and jspa name are different.

               

              Below is the working code :

               

              1. <struts> 
              2.     <package name="jiveSimpleExample-actions"  namespace="/" extends="community-actions-include"> 
              3.          <action name="demo" 
              4.             class="com.jivesoftware.clearspace.plugin.example.action.DemoAction"> 
              5.             <result name="success">/main/plugin/resources/templates/demo.ftl</result> 
              6.             <result name="success-add" type="redirect">demo.jspa?created=true</result> 
              7.             <result name="unauth" type="httpheader"> 
              8.                 <param name="status">401</param> 
              9.             </result> 
              10.         </action> 
              11.     </package> 
              12. </struts> 

               

              I am using same name for action and jspa and It is redirecting properly.

               

              Thanks & Regards,

              kavita.kumari