as i understood the problem .. you need to first know the value of user then do some work and then deliver the image.
this can be done in this way ..
1. create a
servlet with the name gif in package
test .. so that it can be called like
2. set the contenttype for gif image type like this
response.setContentType("image/jpeg"); //change for fig images
3. extract parameter
String user = request.getParameter("user");
4. forward to actual image
response.sendRedirect("http://www.abc.com/grafik/pic.jpg");