I second all your comments. :)  If ASP gave me access to
request.setAttribute() or
servletcontext.setAttribute() or
a servlet session
I wouldn't be forced into this wierd query string senerio.

But the problem doesn't end there -- even if I was using
JSP's I would have the problem of the fact that the image tag
sends a seperate request for an image -- so now I'm stuck with
a servlet context or servlet session senerio.  I don't know how
comfortable I am with that.  I guess a session senerio would be
ok but I don't like the idea of creating a session just to almost
instantly invalidate it when the image servlet is completed.

Oh well -- thanks for your help guys,

James

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Nic
Ferrier
Sent: Friday, June 09, 2000 10:01 AM
To: [EMAIL PROTECTED]
Subject: Re: Best way to send data to servlet


>>> Danny Rubis <[EMAIL PROTECTED]> 09-Jun-00 3:56:54 PM >>>

>?a=a whole bunch of nice data for building an Image,
>for Image 'a'.
>Delimit the data with whatever you like.  Send it as data
>with a POST.    Then when you get the data at the servlet,
>parse it out using your delimiter.  Take the data, build your
>Image and send it back to the caller.

But how to do a POST with an <IMG> tag.

Here is what is happening:

1. user requests ASP page

2. ASP (ie: beyond our control) generates the HTML page which is
downloaded to the browser

3. it places data from a SQL query into the IMG tags which refer to
the servlet with the idea that the servlet can pick up the data and
generate an image as a response. So the tags look like this:
  <img src="http://servletcontainer/imageservlet?data....">

4. imageservlet recieves the request but can't handle all the data...
it's too long (the browser is probably truncating it since a servlet
container can handle a query up to 64K long)


You're right more data could be sent with a POST but how does the IMG
tag (or the HTML page generally) generate the POST so that the IMG is
inlined?

Unfortunately you can't do something like this:

  <img src="..." method="POST">


The real problem here is the browser - it's absolutely pants that a
browser truncates the GET query. I can see no reason whatsoever for
doing it (even if it is a slightly wierd thing to do it should still
work!).


Nic

___________________________________________________________________________
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

___________________________________________________________________________
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