• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sybex book: p.282. Funny code :))

 
Bartender
Posts: 3904
43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, Ranchers.
What do you think this code do ?

The answer (!!!):
----------
In this example, the calling thread begins by requesting an icon defined within the web.xml file.
----------
Another new thing I learn: it's possible to pass almost any java object, not just strings as a servlet parameter. That's great feature from book authors...
[ October 30, 2002: Message edited by: Mikalai Zaikin ]
 
Author
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well isn't that interesting I am sure that you would get a ClassCastException, but hey, that is just me!
There seem to be some BIG holes in this book!
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
again, i agree
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You wouldn't get a run time ClassCastException. This code would't even compile.!
-Maha
[ November 26, 2002: Message edited by: Maha Annadurai ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic