KonaKart Community Forum

Installation / Configuration => Using KonaKart as a Portlet => Topic started by: sashwill on September 10, 2008, 02:13:39 pm

Title: Losing header from page and logged in user
Post by: sashwill on September 10, 2008, 02:13:39 pm

When ever I try to view an item in the customer cart, i lose the header from the page and the
custId = this.loggedIn(kkAppEng, null); from ShowProductDetailsAction is returning -1; and there is no portlet info contained in the navigation bar of the browser like in the jetspeed demo site.  Upto this point everything has been working smoothly.

--konakart/jetspeed site
http://www.konakart.com/konakart/SelectProd.do;jsessionid=9BEDDFA34A6D4AE832BFACAC9CB89A9C?prodId=1&manufacturer=Matrox&category=Graphics%20Cards&name=Matrox%20G200%20MMS&model=MG200MMS

--mysite
http://localhost/konakart/CatalogShowProdDetailsPage.do
--

Has anybody else had this happen? Does anyone know why this might happen?
Title: Re: Losing header from page and logged in user
Post by: ryan on September 10, 2008, 02:18:23 pm
The link you give for your site is localhost and so unreachable.
Title: Re: Losing header from page and logged in user
Post by: sashwill on September 10, 2008, 02:41:39 pm
My site is still in development and is not currently reachable from the public.  I was trying to show the difference between the urls on my site and the demo site. 

Also, I should add that if I deploy as a web app instead of a portal, all seems to work fine.
Title: Re: Losing header from page and logged in user
Post by: ryan on September 10, 2008, 03:30:41 pm
The link on the edit cart page uses struts nested tag library instead of the html tag library. i.e.

<nested:link page="/SelectProd.do" paramId="prodId".......

instead of

<html:link page="/SelectProd.do" paramId="prodId"........

It looks like the Struts Portlet Bridge doesn't actually do anything with the nested link and so the URL isn't relative to the portal and just points to the standard app which takes over the whole screen.

The fix is as follows:

In EditCartBody.jsp change the links to use the html tag:

<html:link page="/SelectProd.do" paramId="prodId" paramName="item" paramProperty="prodId"><img src="<html:rewrite href="<%="images/"+item.getProdImage()%>"/>" border="0" alt="<%=item.getProdName()%>" title=" <%=item.getProdName()%> " width="<%=kkEng.getSmallImageWidth()%>" height="<%=kkEng.getSmallImageHeight()%>"></html:link>

and

<html:link page="/SelectProd.do" paramId="prodId" paramName="item" paramProperty="prodId"><b><%=item.getProdName()%></b></html:link>


Title: Re: Losing header from page and logged in user
Post by: sashwill on September 10, 2008, 03:49:25 pm
Is that what was done on the portal demo site?
Title: Re: Losing header from page and logged in user
Post by: sashwill on September 10, 2008, 03:57:18 pm
Thanks Ryan!

That fixed it.  I'm still curious if any changes were made to the portal demo site to make it work?
Title: Re: Losing header from page and logged in user
Post by: sashwill on September 12, 2008, 04:53:59 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: Losing header from page and logged in user
Post by: sashwill on September 12, 2008, 06:01:11 pm
Sorry the above post was a reply to another topic thread.