• Welcome to KonaKart Community Forum. Please login or sign up.
 

KonaKart Portlet issue in JetSpeed

Started by Naresh, April 18, 2008, 11:09:47 am

Previous topic - Next topic

Naresh

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

Did anyone ever find a cause or solution to this?

sashwill

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

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

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


sashwill

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

September 12, 2008, 09:45:11 pm #7 Last Edit: September 12, 2008, 09:47:15 pm by ryan
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".

   

sashwill

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



ryan

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>