Tuesday, February 10, 2015

LOBTools Image Issue, When images from external image server in wcs

If we are using third party external server to store the images, The Images won't display in create product screen. To fixing the issue, use the below approach.

1.Add the third party URL in the Image servlet filter class. This host prefix "http://test.mycompany.com/" is common for all the images.

Add the following snippet in web.xml in the lobtools project

<servlet>

        <description></description>

        <display-name></display-name>

        <icon>

            <small-icon></small-icon>

            <large-icon></large-icon>

        </icon>

        <servlet-name>ImageServlet</servlet-name>

        <servlet-class>

            com.ibm.commerce.foundation.client.lobtools.servlet.ImageServlet</servlet-class>

        <init-param>

            <param-name>imageURLPrefix</param-name>

            <param-value>http://test.mycompany.com/</param-value>

        </init-param>

        <load-on-startup>2</load-on-startup>

    </servlet>

2.Deploy the web.xml then restart the server

3.Then, In thumbnail image  and full Image field specify the remaining image URL which mean without host name because the host name already specified in the filter class.