agentjfp3
Location : denmark
Member since : Aug 31, 2003
Messages : 1
|
Aug 31, 2003 at 11:14 PM
Hi
Just tried to deploy a JSP page on WebLogic 7.0 / RedHat 7.2 containg the code listed below as sugested by another article in this forum.
<%@ page contentType="image/jpeg"
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.getOutputStream());
encoder.encode(image);
response.getOutputStream().close (); %>
I added the parameters required by the PJA library (i.e. -Xbootclasspath/a:/path/to/pja.jar -Dawt.toolkit=com.eteks.awt.PJAToolkit -Djava.awt.graphicsenv=com.eteks.java2d.PJAGraphicsEnvironment -Djava.awt.fonts=/path/to/jdk/jre/lib/fonts ) to the startWeblogic server script without any problems. I did not deploy neither the pjatool.jar nor the servlet.jar libraries.
Invoking the JSP page however did not produce any image as expected and neither did the WebLogic server report any problems.
So now I have 2 questions:
1) Has anyone succeeeded in deploying a JSP page og servlet generating an image using the PJA 2.4 library on WebLogic 7.01, JDK 1.3.1_08 and RedHat 7.2 ?
2) Is it possible to enable debugging in the PJA 2.4 library ?
Best regards
Jaffer --- N/A
|