request object

hi,is there any way to access the response object in the javascript. i want to the set setheader value here.response.setHeader("Content-Disposition","inline; filename=\""+fileName+"\"");thanks
[220 byte] By [bobza] at [2007-11-26 19:07:29]
# 1

You do know what the response is used for? Let me elaborate.

1) a client connects and makes a request to the server

2) server handles this request by invoking a JSP or servlet

3) server generates a response, this is sent back to the client as HTTP data

4) REQUEST/RESPONSE IS CLOSED

5) client executes javascript

You see the problem? Javascript is executed by the browser after your request finishes. Not only is it run on a completely different machine that your response object lived on, but the javascript executes long after the response has already been sent and closed.

gimbal2a at 2007-7-9 20:59:57 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...