- Difference between response.sendRedirect("path" ) & req.getRequestDispatcher("path").forward(req,resp);
- Difference between RequestURI /URL
http://localhost:8080/myWebapp/FirstServlet/second.jsp?blogname=thevoid
reqURL = http://localhost:8080/myWebapp/FirstServlet/second.jsp ( except Qry String)
reqURI = /FirstServlet/second.jsp ( excluding context and qey string )
path info = /second.jsp ( between urlPattern for servlet and Qry string )
Qry String = blogname=thevoid ( after ? )
- Difference between req.getReader() req.getInputStream()
getReader() returens Buffered Reader & givers character data of req body .
getInputStream() returns ServletInputStream & gives binary Data of req body .
** body doesnt include headers
No comments:
Post a Comment