actually, i might have misunderstood the problem..
if you are only trying to get an image by passing paramaters

say there is a picture on a server we want to get using a user name and pass.
You would use the doGet method for the servlet

<img src="http://localhost/servlet/ImageServlet?User=rob&Pass=bor">

then when you return the image in the servlet, use the jpeg classes included
with the jdk to encode the image, and then set the MIME type in the servlet
(so that the browser knows it is getting an image)

res.setContentType("image/jpeg");  (not sure if that is the correct MIME
type)

hopefully i understood the problem this time, and this is of help!

Rob

Carlos Proal <[EMAIL PROTECTED]> wrote:
> thanx to all of you , this mail describe my real problem, hope you ca n
help
> me .
>
> it's possible to send and entire image as parameter to a servlet ??
> i know that i can do a servlet sending something like this to the server:
> <img src="http://www.domain.com:8080/servlet/ImageHadler?id=4">
>
> and with that parameter (id) search on a database and return the
> selected image.
>
> what i want to do (if possible) is something like:
>   <img
>
src="http://www.domain.com:8080/servlet/ImageDisplay?imag=__binary_stream_here">
>
> so this way would be more general and can save all combinations
> (id=x&table=y&database=z); i have seen some examples using hex data calling
> special old cgi and it works, so i'd think there is something similar in
> servlet's world.
>
> Any ideas or alternative solutions are welcome :)
>
>
> thanx a lot
>
>
>
> >From: Carlos Proal <[EMAIL PROTECTED]>
> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> >        Servlet API Technology." <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: url size
> >Date: Sat, 25 Mar 2000 15:09:38 PST
> >
> >  hi all, anyone know if there is a limit size about the url string ??
> >
> >  i mean, i want to send something like:
> >
> >  http://www.lolo.com:8080/servlets/myservletparam=12345663...etc
> >
> >where this numbers or letters can grow in thousands, so can be any problem
> >about this.
> >
> >if there is a restriction, this only applies to servlets o general
> >urls/cgis
> >??
> >
> >  thanx a lot
> >
> >
> >
> >______________________________________________________
> >Get Your Private, Free Email at http://www.hotmail.com
> >
>
>___________________________________________________________________________
> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> >of the message "signoff SERVLET-INTEREST".
> >
> >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> >Resources: http://java.sun.com/products/servlet/external-resources.html
> >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to