Introduced in Feature Pack 3

Modify Recipe JSP files to include SEO pattern information for constructing shorter and easier to read URLs

Introduced in Feature Pack 3 In this section you update the wcf url tags in your recipe pages' JSP files to indicate a patternName parameter which indicates to the class constructor which URL pattern to use while constructing SEO friendly URLs.

About this task

For more information, see Overview of SEO friendly URL construction.

Procedure

  1. Navigate to Stores > WebContent > storedir > include > styles > style1 and open CachedHeaderDisplay.jsp .
  2. Locate the following line of code:
    <wcf:url var="RecipeSectionURL" value="RecipeSection"> 
    Add the patternName parameter:
    <wcf:url var="RecipeSectionURL" patternName="RecipeSectionDisplay" value="RecipeSection" >
  3. Navigate to Stores > WebContent > storedir > ShoppingArea > RecipeSection
  4. Modify the Recipe JSP files to specify the appropriate pattern name in the URL construction:
    1. Open the RecipeSection.jsp file and locate the following lines:
      <wcf:url var="RecipeCollectionURL" value="RecipeCollection">
      	  . . . . . . .
      	<wcf:url var="RecipeDisplayURL" value="RecipeDisplay">
      Replace them with:
      <wcf:url var="RecipeCollectionURL" patternName="RecipeCollectionDisplay" value="RecipeCollection">
      	  . . . . . . .
      	<wcf:url var="RecipeDisplayURL" patternName="RecipeDisplayNoAssociation" value="RecipeDisplay">
    2. Open RecipeCollection.jsp . Replace:
      <wcf:url var="RecipeDisplayURL" value="RecipeDisplay" >
      
      with:
      	<wcf:url var="RecipeDisplayURL" patternName="RecipeDisplay" value="RecipeDisplay" >
    3. Open RecipeDisplay.jsp. Replace:
      var="ProductDisplayURL" value="Product1">
      with:
      var="ProductDisplayURL" patternName="ProductURL" value="Product1">
    4. Open RecipePopupContent.jsp Replace:
      <wcf:url var="ProductDisplayURL" value="Product1">
      with:
      <wcf:url var="ProductDisplayURL" patternName="ProductURL" value="Product1">
  5. Restart the WebSphere Commerce server to load the new recipe pattern files.