• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

oh why not push another question

 
Ranch Hand
Posts: 41
  • 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
book answer:
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:
E.
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 ?
 
Ranch Hand
Posts: 445
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi my answer would be E too.Coz URL rewriting is done for browsers that dont support cookies & the j_sessionid if rewritten in the URL path.How can the answer be B,I dont understand?Which is this book you are using, may i know?
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
one small correction.The name of the session tracking cookie is JSESSIONID.
Regards,
Maha Anna
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic