How to send a simple text and a jar file to client?

To send simple text we use mime type “text/html” but for jar it is “application/jar”.
We use PrintWriter class for simple text response.
PrintWriter out=response.getWriter();
Out.println(“hiiiiiiiiiii”);
But we use ServletOutputStream for sending any other type.
ServletOutputStream out=response.getOutputStream();
Out.write(abyteArray);

No comments:

Post a Comment