KonaKart Community Forum

Installation / Configuration => Using KonaKart as a Portlet => Topic started by: Naresh on April 18, 2008, 11:09:47 am

Title: KonaKart Portlet issue in JetSpeed
Post by: Naresh on April 18, 2008, 11:09:47 am
Hi,

I deployed Konakart as a portlet in JetSpeed.

When i click the back button the Konakart portlet is becoming blank.

I found the same thing in the online demo.

After couple of clicks back/forward buttons Cart is displayed normally.

Please help me on this.

Thanks,
Naresh.T
Title: Re: KonaKart Portlet issue in JetSpeed
Post by: sashwill on September 08, 2008, 05:37:24 pm
Did anyone ever find a cause or solution to this?
Title: Re: KonaKart Portlet issue in JetSpeed
Post by: sashwill on September 09, 2008, 02:37:45 pm
Just wanted to add some more detail to the problem.  For example:
After selecting the Hardware category and then picking the cdroms, click the back button.  The screen goes blank. Sometimes it rather difficult to get back to a working screen.  You have to log out and back in again.  This happens on the Jetspeed demo site as well as my work in progress.

I'm  new to struts and I'm not sure if I'll have the time to dig into solving this or will just have to go another direction.  So far I like Konakart and am planning to use it, but this may be a show stopper. Any help would be appreciated.
Title: Re: KonaKart Portlet issue in JetSpeed
Post by: ryan on September 09, 2008, 06:25:23 pm
Hi,

I've just taken a  look and think I've found a fix that maybe you could try out ?

When going through your scenario, I noticed the message in the Tomcat log :

09-Sep 19:13:59 WARN  (StrutsPortlet.java:processRequest:503) Warning: Using the original action URL for render URL: /SelectCat.do?catId=1.
A redirect should have been issued.

This warning goes away if you edit the struts-config.xml file by searching for SelectCat and adding redirect="true" to the forwards :

      <action path="/SelectCat" type="com.konakart.actions.SelectCategoryAction1">
         <forward name="ShowCategories" path="/CatalogShowCatsPage.do" redirect="true" />
         <forward name="ShowProducts" path="/CatalogShowProdsPage.do" redirect="true" />
         <forward name="Welcome" path="/Welcome.do" redirect="true" />
      </action>

After restarting Tomcat the problem seems to be fixed.

There may be more areas where this fix needs to be applied but they should be obvious by looking at the warning in the log.

Please let me know if it works for you and any other places where you discover that the fix needs to be applied.




Title: Re: KonaKart Portlet issue in JetSpeed
Post by: ryan on September 09, 2008, 06:42:37 pm
After further investigation, I think that all of the forwards that need fixing are the ones belonging to the action paths that you can find in struts-portlet-config.xml :

  <portlet-url-type>
    <action path="/SelectCat"/>
    <action path="/SelectProd"/>
    <action path="/SortProd"/>
     <action path="/ShowSearchByManufacturerResultsByLink"/>
  </portlet-url-type>
Title: Re: KonaKart Portlet issue in JetSpeed
Post by: sashwill on September 09, 2008, 09:06:52 pm
Seems to have done the trick
Title: Re: KonaKart Portlet issue in JetSpeed
Post by: sashwill on September 12, 2008, 05:59:51 pm
I've found two more that are giving me the log message:

12-Sep 10:31:01 WARN  (StrutsPortlet.java:processRequest:503) Warning: Using the
original action URL for render URL: /AddToCartSubmit.do.
A redirect should have been issued.
12-Sep 10:31:05 WARN  (StrutsPortlet.java:processRequest:503) Warning: Using the
original action URL for render URL: /EditCartSubmit.do.
A redirect should have been issued.

so i added the redirect to these as well
Title: Re: KonaKart Portlet issue in JetSpeed
Post by: ryan on September 12, 2008, 09:45:11 pm
There are actually quite a few more places. Take a look at the attached file which may not match your struts-config.xml exactly but should give you an idea of where the redirect is required.

Note that in your case it should be redirect="true" and not "false".

   
Title: Re: KonaKart Portlet issue in JetSpeed
Post by: sashwill on September 15, 2008, 08:18:57 pm
I miss understood you earlier post

QuoteAfter further investigation, I think that all of the forwards that need fixing are the ones belonging to the action paths that you can find in struts-portlet-config.xml :

  <portlet-url-type>
    <action path="/SelectCat"/>
    <action path="/SelectProd"/>
    <action path="/SortProd"/>
     <action path="/ShowSearchByManufacturerResultsByLink"/>
  </portlet-url-type>


Thanks for the follow-up i've added the redirects where indicated in the file you posted and will keep my eye open for any other redirect messages in the log


Title: Re: KonaKart Portlet issue in JetSpeed
Post by: ryan on September 15, 2008, 08:34:49 pm
One final thing to do is to add <action path="/ShowProductsForManufacturer"/> to struts-portlet-config.xml .

  <portlet-url-type>
    <action path="/SelectCat"/>
    <action path="/SelectProd"/>
    <action path="/SortProd"/>
    <action path="/ShowSearchByManufacturerResultsByLink"/>
    <action path="/ShowProductsForManufacturer"/>
    <resource path="/images/"/>
  </portlet-url-type>