0

Java Restful Webservices 1.I need to send the Excel Sheet as Response. (I am able to Generate the Excel as response.) 2.I also need to send the 2 variables as response with Excel sheet how can i do it.

1 Answer 1

1

The only way that'll probably work for most users would be to send the 2 variables as HTTP headers in the response (assuming the client knows to handle them) and to send the Excel document as an attachment. For the latter, just set Content-disposition to attachment.

Sign up to request clarification or add additional context in comments.

1 Comment

Using HTTP headers is probably the way to go. Their name should start with "X-", as they are nonstandard.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.