Can we dispatch request to an HTML inside servlet

时光毁灭记忆、已成空白 提交于 2019-12-14 03:50:36

问题


Is this possible?

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

回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/11223556/can-we-dispatch-request-to-an-html-inside-servlet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!