Hi, I have an applet that needs to pass objects back and forth to a servlet. Can anyone show me an example of the servlet code for this? (The applet code would be helpful as well...) Thanks! -Jeff
Jeff Wisard<br />Sun Certified Java Programmer (Java 2)<br />Sun Certified Web Component Developer
There is an example in my Servlets and JSP book using some classes that Paul Weaton wrote. That com.javaranch library is somewhere on JavaRanch but I don't remember how to get to it. If you will drop me a line, I can send you the code from that chapter. wbrogden@bga.com
You can find the Javaranch Common Classes info here Dave.
Jeff Wisard
Ranch Hand
Joined: Jan 07, 2002
Posts: 89
posted
0
Alright. Cool and thanks. Next Question: Essentially what I want to do is stream a large amount of data from the servlet to the applet. What I need to do is send this data in blocks. For example, I have an array of 1000 objects (all serializable) and I want to send them to the applet in blocks of 100....all within the same request. What are the issues here? Can I send more than one block (array of objects) via the ObjectOutputStream.writeObject() method without closing the output stream? I also noted that the code you pointed me to is using GZIPInputStream. What are the advantages and disadvantages of this? Thanks again. -Jeff
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.