Hi,
I am a neophyte in
Java and need some direction in writing a
servlet. Thank you in advance for any assistance.
I am calling a servlet from an Adobe Flex front-end to generate a Jasper Report. The back-end is Rails and has created a complicated (and voluminous) XML data structure that I need to get to the servlet. Flex has a facility to send "variables" attached to the request (which I have as a "GET" but could be changed to a "POST"). If I have Flex serialize the data into a file and have the servlet read the file from disk it works fine but I don't want to write a file if I can help it. Other than disk maintenance, it just seems inelegant and to be a dirty work-around.
The working code is:
I've tried "request.getParameter()" which returns a
string that I can get into a stream but the data is too large and
Tomcat errors out.
I've tried "request.getAttribute()" which returns an object but I can't seem to get that to a BufferedInputStream. Actually, I haven't gotten any compiled Java code in this attempt so I really don't know that there even IS an "attribute".
Being such an ignoramus in Java (and, for that matter in HTTP), after 5000 Googles I haven't been able to find a way to get the data to the servlet as something other than a Parameter and convert it to a stream. I know Java must have a way to do it and that it's probably simple. I think I must just have the wrong mindset and approach and am looking in the wrong direction.
Please point me down the correct path.
thanks again.