Author Topic: KonaKart Portlet issue in JetSpeed  (Read 5878 times)

Naresh

  • Newbie
  • *
  • Posts: 3
    • View Profile
KonaKart Portlet issue in JetSpeed
« on: April 18, 2008, 05: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

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: KonaKart Portlet issue in JetSpeed
« Reply #1 on: September 08, 2008, 11:37:24 AM »
Did anyone ever find a cause or solution to this?

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: KonaKart Portlet issue in JetSpeed
« Reply #2 on: September 09, 2008, 08:37:45 AM »
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.

ryan

  • Administrator
  • Sr. Member
  • *****
  • Posts: 190
    • View Profile
    • KonaKart Website
Re: KonaKart Portlet issue in JetSpeed
« Reply #3 on: September 09, 2008, 12: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.





ryan

  • Administrator
  • Sr. Member
  • *****
  • Posts: 190
    • View Profile
    • KonaKart Website
Re: KonaKart Portlet issue in JetSpeed
« Reply #4 on: September 09, 2008, 12: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>

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: KonaKart Portlet issue in JetSpeed
« Reply #5 on: September 09, 2008, 03:06:52 PM »
Seems to have done the trick

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: KonaKart Portlet issue in JetSpeed
« Reply #6 on: September 12, 2008, 11:59:51 AM »
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

ryan

  • Administrator
  • Sr. Member
  • *****
  • Posts: 190
    • View Profile
    • KonaKart Website
Re: KonaKart Portlet issue in JetSpeed
« Reply #7 on: September 12, 2008, 03: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".

   
« Last Edit: September 12, 2008, 03:47:15 PM by ryan »

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: KonaKart Portlet issue in JetSpeed
« Reply #8 on: September 15, 2008, 02:18:57 PM »
I miss understood you earlier post

Quote
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>

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



ryan

  • Administrator
  • Sr. Member
  • *****
  • Posts: 190
    • View Profile
    • KonaKart Website
Re: KonaKart Portlet issue in JetSpeed
« Reply #9 on: September 15, 2008, 02: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>