Home pageFind It!Contact PJAPJA documentation

PJA

 PJA Toolkit forum

This forum is dedicated to PJA Toolkit.
You may read freely the messages it contents. If you want to write a message or answer to a subject, subscribe to it first.

Subjects Recent messages Login Subscribe

Messages of subject Integrating Servlets and PJA on a WebLogic 7.0 and RedHat 7.2 platform

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

Manu

Location : Paris / France
Member since : Apr 29, 2003
Messages : 394
 Sep 25, 2003 at 11:58 AM
Did you install some X11 libs ?
If you want to use BufferedImage or Color class, you must have some X11 libs as described in http://www.eteks.com/pja/en/forum/viewSubject.jsp?subjectId=38
---
Manu (moderator/modérateur)


Home pageFind It!ContactTop

© Copyrights 1997-2023 eTeks - All rights reserved

PJAPJA documentation