How to fill servlet response object?

How to fill servlet response object?

Postby Kishan » Fri Feb 08, 2013 3:48 pm

How to fill servlet response object?
Kishan
 
Posts: 191
Joined: Tue Jan 29, 2013 4:21 am

Re: How to fill servlet response object?

Postby Kishan » Mon Feb 18, 2013 5:17 am

You can fill the servlet response object as one of the below:

1. You can write character response as below:
PrintWriter out = response.getWriter();
out.println("Hello World");


2. You can write binary data as below:
ServletOutputStream out = response.getOutputStream();
Kishan
 
Posts: 191
Joined: Tue Jan 29, 2013 4:21 am


Return to Servlets

Who is online

Users browsing this forum: No registered users and 1 guest