• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock queston on URL rewriting

 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

The anwser is B.

I don't understand it.

Anybody agrees? and why? explaination?

Thanks in advance
 
Edisandro Bessa
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tiffiny,

I personally think the correct choice would be letter E.

My anwser is based on the fact that URL rewriting is supposed to take place either when the user disables cookies so that the session id is appended to the URL or when some special characters are included on url parameters so that such characters are converted accordingly.

The letter B does not guarantee that the session id will be appended to the URL if the user disables cookies on his browser.

I hope that helps.
 
Vassili Vladimir
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I agree with Mr.Edisandro.
 
Jayant Raj
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree as well. The answer should be 'E'.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, B has nothing to do with URL rewriting.
 
Tiffiny Yang
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you guys. That's what I thought . Choice E should be the correct since the URL rewriting has nothing to do Choice B.

Tiffiny
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic