Java servlet allows you to scale images. So this component could be used for creating image preview (thumbnail) on the fly.
How to use it:
a) copy imagescalePackage.jar into WEB-INF/lib directory
b) describe Image scale servlet in your web.xml file. You can provide the following parameters:
dir - describes a directory for your image files
width - describes a width for the final image
height - describes a height for the final image
For example:
You can provide both width and height or just one of them. In this case the second dimension will be changed accordingly.
c) describe a mapping for this servlet in web.xml file
and now you can use servlet in this form: http://your_host/servlet/ImageScale?image_file. E.g.:
for downloading:
servlet: imagescalePackage.jar
© Coldbeans Software Comments?
See also JSOS - the largest collection of servlets and filters.