Hi Everybody,
I am running the following code in jsp. It will perfectly works on Tomcat 4, but it doesn't work after deployed on weblogic 8.1. What is the problem?
The code is:
<%@ page contentType="text/html"
import="java.awt.image.*,java.awt.*,com.sun.image. codec.jpeg.*" %>
<% // Create an offscreen image 100 x 100 pixels
BufferedImage image = new BufferedImage (100, 100, BufferedImage.TYPE_INT_RGB);
// Draw into the image a black circle with the text Hello on a yellow background
Graphics g = image.getGraphics();
g.setColor (Color.yellow);
g.fillRect (0, 0, 100, 100);
g.setColor (Color.black);
g.drawOval (0, 0, 99, 99);
g.drawString ("Hello", 30, 50);
// Create a JPEG encoder to send the image at JPEG format
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(response.getOutputStre am());
encoder.encode(image);
response.getOutputStream().close ();
%>
If anybody know the answer post your comment.
Thanks in Advance..
V. Prasath