which of the following best describes an example of url rewriting
a) out.println("<input type=hidden name='name' value='billybob'">
b) out.println("<form action='/servlet/testservlet/billybob' method='post'>");
c) HttpSession session = req.getSession();
d) session.addAttribute("name", "billybob");
e) none of the above
B - URL rewriting consists of adding data to the URL The receiving servlet can then extract the additional information to utilize the data.
my answer would be:
b is not url rewriting since that should have been done programmatically and this is hardcoded.
I do agree to a point that B can be url rewriting if the writer of this servlet always wants to add billybob as extra pathinfo. But wouldn't that be pointless and therefore a complete wrong example ?