Tracey Currier

Ranch Hand
+ Follow
since Feb 06, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Tracey Currier

Thanks for your reply, I did make that error you suggested, but
I had corrected with still no pos results.
I found the error, at least to some extent.
I can add 10 lines of my prepared statement w/o problems,
but when I try 50, I run into problems.
Due to time issues, we decided to print tab delimited data files
and "bcp" them to the db.
I am looking forward to reading the book, got lucky, can use the info
All right!
Thanks alot
my driver supports batch updates(Sybase jconnect),
I can execute the update with one row inserting
but not multiple rows,
the batching is not working,
does anyone know why?
Thanks

I got this to work by setting
res.setContentType("text/plain")
then using the redirect to my url.
My url was to a perl script that was
loaded with parameters, worked ok
behind the firewall
The perl script output an html page
and I sent the html header out in the
perl script
21 years ago
Thank you, this helped me, too.
Using 1.3.1 on IPlanet looking
for a jconnect driver (JDBC driver)
22 years ago
it turned out to be a problem with the graphics environment, I was working in a "headless"
environment so could not use the awt classes.
java 1.4 has classes that enable some of the
awt classes in a headless environment. we got
the example to work by installing a graphics environment on the server !!!
23 years ago
I tried the class name of the servlet if this
parameter is "name" like "name of the servlet" when you are mapping the servlet, no go yet
23 years ago
what would the parameter be?
I tried "image/gif" or "gif"
(changed from jpeg)
and "http"
Thanks!
23 years ago
I'm using linux op on server and IPlanet web server, I am trying to resolve the awt to X11 graphics environment problem
???
23 years ago
No, I can't call it up in my browser, I didn't
even realize you could do this with an image, I
thought I had to send it to an applet. Neat (especially if I can get it to work).
23 years ago
This is how I receive the stream in the applet:
InputStream in = con.getInputStream();
ByteArrayOutputStream bstream = new ByteArrayOutputStream();
int c=0;int i =0;
while((c = in.read()) != -1){
bstream.write(c);
}

byt_arr = bstream.toByteArray();
23 years ago
no, fill is ok, it's fill(shape)
I am thinking that I need to add a ColorModel
to the my MemoryImageSource constructor in the
AppletCode???
23 years ago
I just realized that the fill method is fillRect - I will change and try again.
23 years ago
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException{
ServletOutputStream out = res.getOutputStream();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
res.setContentType("image/jpg");
try{

BufferedImage buffImg = new BufferedImage(200,200, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = buffImg.createGraphics();
//anything you do to the Graphics Context gets written to the BufferedImage
g2.setColor(Color.red);
Rectangle s = new Rectangle(100,100);
g2.fill(s);
g2.dispose();
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(buffImg);
param.setQuality(1.0f,true);
encoder.encode(buffImg,param);


int sizebuf = bout.size();
res.setContentLength(sizebuf);
bout.writeTo(out);
bout.flush();
bout.close();

out.flush();
out.close();
23 years ago
This is a really good example for what I have been trying to do the last couple of days. But I am still not getting the image drawn in the applet. I checked the byte array, it is loaded in. My utility class says I don't have a jpeg but I will disregard this because I know I have a byte[]. I convert to an int[] and use:
Image temp_image = createImage(new MemoryImageSource(200, 200,int_arr, 0, 200));
g.drawImage(temp_image,0,0,this);
but still doesn't draw, what am I missing?
Thanks
23 years ago