Develop > Presentation layer > Management Center framework
Load images from a custom location
By default, the Management Center loads catalog images from the store directory within the Stores web application. If your store retrieves images from a different location, configure this custom location so that the Management Center can locate your images.
To load the images from a location other than the default location, configure the image loading servlet to locate images from a custom location.
Procedure
- Open WebSphere Commerce Developer and switch to the Enterprise Explorer view.
- Expand LOBTools > WebContent > WEB-INF and locate the web.xml file.
- Within the web.xml file, add the imageURLPrefix initialization parameter to the <servlet-name>ImageServlet</servlet-name> section. For example:
<!-- Image Serving Servlet --> <servlet> <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://myImageServletHost/webapp/wcs/stores/Madisons/</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet>
- Save the changes.
What to do next
After you complete the work:
- Test the changes by viewing them in the Management Center, using this URL: https://hostname:8000/lobtools.
- If you started the WebSphere Commerce Server to test the changes, stop and then restart the WebSphere Commerce Server.
- Deploy the changes to the production environment.