Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Re: Reading an image from a Servlet

Reply
Thread Tools

Re: Reading an image from a Servlet

 
 
tim cutler
Guest
Posts: n/a
 
      07-02-2003
I'm quite new to java and have just run into this problem. I concur
strongly with your desire for "a better approach...". I would like to
see what your HTTP GET solution is, if you could post it?

Manish Hatwalne wrote:
> I tried reading it (servlet response) as bytes and then constructing an
> ImageIcon from it. It did work, but there has to be a better way. Besides
> for this approach how do I find out how many bytes are there? So that I can
> allocate array accordingly.
>
> There must be a better approach...
>
> - Manish
>
>
> "Manish Hatwalne" <(E-Mail Removed)> wrote in message
> news:bavf1e$4673m$(E-Mail Removed)...
>
>>I have a client program (in java), which POSTs (using HTTP POST) data to

>
> the
>
>>servlet, the servlet analyses this data and creates an image which is sent
>>back as a PNG file by setting the content type appropriately.
>>
>>This client needs to post a lot of data to the servlet, so HTTP GET is out
>>of picture, we have to use POST. The image generated by the servlet needs

>
> to
>
>>be displayed in the client GUI. Earlier, the test data was smaller and I
>>used to send it with HTTP GET and pass this URL to ImageIcon which would
>>give me the required image. It worked perfectly.
>>
>>Now my problem is how do I get the client to read the Image from the
>>servlet? Any help, pointers will be greatly appreciated.
>>
>>- Manish
>>
>>
>>
>>

>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Keeping session with Servlet to Servlet communications DiscoStu Java 0 07-08-2004 06:50 PM
Offending class: javax/servlet/Servlet.class chamikara Java 1 06-19-2004 05:42 AM
Servlet question(Tomcat, web.xml, servlet-class, servlet-name) circuit_breaker Java 2 04-04-2004 03:26 AM
Tomcat: POST from one servlet or internal class to another servlet Sean Clarke Java 1 01-07-2004 02:22 PM
how to get my servlet configuration before the servlet is initialised Andy Fish Java 4 12-17-2003 09:47 PM



Advertisments