Develop > Presentation layer > Work with JSP pages


Modifying existing JSPs files to interact with new JSP files

Once you add a new JSP to a storefront, modify other existing storefront pages to interact with the new file. This is accomplished by creating links from existing JSP files to the new JSP file.


Before you begin


Procedure

  1. Open WebSphere Commerce Developer

  2. In the Enterprise Explorer view, expand Stores > WebContent > storeName

  3. Continue to navigate to the subdirectory that contains the JSP file to modify.

  4. Add code similar to the following example to create a URL link. In this example the link connects to a registered view called RecipeSection.

            
    <c:url var="RecipeSectionURL" value="RecipeSection">             
    <c:param name="langId" value="${langId}" />             
    <c:param name="storeId" value="${WCParam.storeId}" />             
    <c:param name="catalogId" value="${WCParam.catalogId}" />             
    <c:param name="categoryId" value="${topCategory.categoryId}" />             
    <c:param name="isRecipeSection" value="true" />         
    </c:url>         
    
    <a href="<c:out value="${RecipeSectionURL}" />" class="m_link"
                id="WC_CachedHeaderDisplay_Link_10"><fmt:message key="ProjectsType"
                bundle="${storeText}" /></a>
    
    

    In the preceding example, five parameters are supplied to the new page. The "isRecipeSection" is an example of a custom parameter that can be used on the RecipeSection page.

  5. Test the the customization by navigating through the links you have created.


+

Search Tips   |   Advanced Search