public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
String email = req.getParameter("email");
String bookid = req.getParameter("bookid");
BookImage imagen = getImage(email, bookid );
if (imagen != null && imagen.getImage() != null) {
Blob imageBlob = imagen.getImage();
// serve the first image
resp.setContentType("image/jpg");
resp.getOutputStream().write(imageBlob.getBytes());
} else {
// If no image is found with the given title,
redirect the user
// to
// a static image
resp.sendRedirect("images/no_image.png");
}
}
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.