Author Topic: Losing header from page and logged in user  (Read 3719 times)

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Losing header from page and logged in user
« on: September 10, 2008, 08:13:39 AM »

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?

ryan

  • Administrator
  • Sr. Member
  • *****
  • Posts: 190
    • View Profile
    • KonaKart Website
Re: Losing header from page and logged in user
« Reply #1 on: September 10, 2008, 08:18:23 AM »
The link you give for your site is localhost and so unreachable.

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: Losing header from page and logged in user
« Reply #2 on: September 10, 2008, 08:41:39 AM »
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.

ryan

  • Administrator
  • Sr. Member
  • *****
  • Posts: 190
    • View Profile
    • KonaKart Website
Re: Losing header from page and logged in user
« Reply #3 on: September 10, 2008, 09:30:41 AM »
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>



sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: Losing header from page and logged in user
« Reply #4 on: September 10, 2008, 09:49:25 AM »
Is that what was done on the portal demo site?

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: Losing header from page and logged in user
« Reply #5 on: September 10, 2008, 09:57:18 AM »
Thanks Ryan!

That fixed it.  I'm still curious if any changes were made to the portal demo site to make it work?

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: Losing header from page and logged in user
« Reply #6 on: September 12, 2008, 10:53:59 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

sashwill

  • Full Member
  • ***
  • Posts: 58
    • View Profile
Re: Losing header from page and logged in user
« Reply #7 on: September 12, 2008, 12:01:11 PM »
Sorry the above post was a reply to another topic thread.