JAVAGeek
JAVAGeek

Reputation: 2794

Can we dispatch request to an HTML inside servlet

Is this possible?

RequestDispatcher rd = request.getRequestDispatcher("index.html");
rd.forward(request, response);

Upvotes: 3

Views: 10993

Answers (2)

Ramesh PVK
Ramesh PVK

Reputation: 15446

Yes it will work. You can get the request dispatcher for static/dynamic pages.

Upvotes: 2

Pramod Kumar
Pramod Kumar

Reputation: 8014

Yes. you can dispatch a request to a HTML page.

Upvotes: 5

Related Questions