Hi Bear,
Sure, a servlet can emit anything it wants to as the response, including HTML.
But that's not considered the best practice. The servlet should performa any processing
that needs to get done in order to prepare the page for display, and then forward to a JSP
to actually render the HTML.
thanks Bear for replying. But even if request is forwarded to jsp the jsp itself gets translated to
servlet and compiled and gets loaded to servlet engine and servlet engine runs this servlet so
ultimately whatever we are writing in jsp page must be becoming
out.println("content of jsp page") so servlet renders html code to web server which is sent back to browser
as HTTP response.
I'm not saying that servlet won't do processing but after processing it has to return some html code which will be
sent back to client as HTTP response.
thanks Bear
with regards