Hi Venkatesh A session is started when the first request is received from a client, and ends when the same client explicitly ends the session or the server does not receive any further requests from the client for a certain period of time (which can be configured in the web.xml file). The servlet itself can also invalidate a session itself using HttpSession.invalidate(). sendRedirect() merely directs the client to another resource. It does commit the response to the client, but it does not end the session itself. [ January 29, 2003: Message edited by: mark howard ]
Joined: Jan 29, 2003
can we use pageContext.getOut().print("Hi") in doAfterBody() method.
Hi Venkatesh - Yes, in the doAfterBody() method you can use the getOut() method on the PageContext object that you've already saved using the setPageContext(). Pls note you don't have the implicit variable pageContext available in the tag handler class. It seems whatever you can do in doStartTag() can be done in doAfterBody(), however in the case when some body-content is present, the calling sequence will differ. Thanks, Sudd