getRequestDispatcher () method

I am a java beginner. This time, I will update the getRequestDispatcher () method.

Q1: What is the getRequestDispatcher () method?

-Interface for displaying JSP from Servlet

Q1: How to use getRequestDispatcher () method

.getRequestDispatcher("./sample.jsp").forward(request, response); I think this way of writing is common. Suddenly, ** forward (request, response) ** is a method that can be used by using the RequestDispatcher interface. You can jump to the specified JSP by using forward.

Usage

I think that it is often used for page transition after exiting the doPost () method or doGet () method. After exiting the method processing, if there is nothing to display in the browser, an error will occur.

Recommended Posts

getRequestDispatcher () method
Method
Java method
java (method)
merge method
Map method
include method
Abstract method
initialize method
List method
puts method
Java method
Class method
save! method
getParameter method
[Java] method
private method
rails method
[Java] method
Ruby to_s method
Screen transition method
Binary search binary search method
Method to search
Factory Method Pattern
Exception switching method
RxSwift method chain
Rails delegate method
scan method problem
Java8 method reference
[Ruby] slice method
[Ruby] end_with? method
[Ruby] Method memorandum
[HTTP method PATCH]
About the method
[Java] forEach method
[Practice] Map method
[Servlet] Basic method
variable and method
Binary search method
Template Method pattern
Template Method Pattern
0-filled (non-zero) method
JavaSilver11 study method
keycloak test-skip method
Factory Method pattern
[Ruby] initialize method
Ruby build method
undefined method `** _ path'error
java8 method reference
[Java] Random method
Ruby accessor method
[Java] split method
ruby map method