Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UserA's Request is getting UserB's resonse?

Status
Not open for further replies.

herianto

Programmer
Jul 9, 2004
2
US
Hi All,

I have an Action Class which calls a Stored Procedure to
Populate a temp table in the database and queries the table to retrieve the information and creates a pdf file using itext api.It writes the pdffile to the response object.

The problem is when UserA and UserB request for a PDF file,
UserA is seeing UserB PDF file.

This happens very rarely in production and i cannot reporduce this in development enviroment,

The execute method in the action class is synchronized, and there are no instance variables used.

We are also using cacheRowSet which is a local object too.


What could be the possbile reason?
any ideas

Thanks

 
The problem could be the two client's request are outputting the PDF to the same file. Better to write the PDF doccument directly to the response's outputSream, if you do need to save a copy of the PDF file.

i.e.

PdfWriter writer = PdfWriter.getInstance(document, response.getOutputSream());

 
Thanks for ur response.
I created ByteArrayOutputStream and send it as a parameter to PDFWriter.
How can that be possible as all are local objects.

Can u pls let me know in detail

Thanks
 
can you post your code so that we have a better understanding on what your problem would be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top