What’s the difference between forward() and sendredirect() methods?
Answer / Ram Narayan
The primary difference between forward() and sendRedirect() methods in servlets is their behavior towards the client request and response. The forward() method transfers the control to another servlet within the same application (usually a JSP page), while keeping the original request and response objects intact, without modifying the HTTP headers. On the other hand, sendRedirect() creates a new HTTP redirect message, which means a new request is generated from the client to the newly specified URL, changing the state of the current request.
| Is This Answer Correct ? | 0 Yes | 0 No |
What do you mean by httpservlet and how it is different from the genericservlet?
How will you pass values from HTML page to the servlet?
1.HttpSession 2.Hidden fields 3.URL Rewriting these primitive type of Session maintainance. What is the other type of process that could help to maintain the Session? pls Explain the process if u know?
How can you push data from an Applet to a Servlet?
What is http servlet? Explain with the help of an example.
What is the use of httpservletresponsewrapper?
How many Cookies can a host support?
What is difference between get and post method?
What is servlet interface?
What is servlet instance?
What do you mean by the servlet chaining?
Difference between jakarta tomcat and apache Tomcat?