• 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

The "class" attribute is optional in jsp:useBean !! question in HFSJ

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all

i find in HFSJ on page 414 chapter 8

"The "class" attribute is optional" in jsp:useBean

i think it is the "type" is optional , isn't ?

i have tried it with class only and it works
 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Either one of them should be there but using only TYPE fail if the attribute doesn't exist but using only CLASS works (Why see their purpose). That's why TYPE is considered OPTIONAL.
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Either the type attribute or the class name must be specified.

If the beanName and the type are specified, the class name is not required.
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by S Vilish:
Either one of them should be there but using only TYPE fail if the attribute doesn't exist but using only CLASS works (Why see their purpose). That's why TYPE is considered OPTIONAL.



Howdy "S vilish",

Kindly adjust your display name according to the ranch's naming policy.

You can do so by editing your profile.

None of your earlier posts would get affected rather reflecting the new name
 
S Vilish
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Raghavan Muthu,

First you need to have a look at the naming policy (second para, last sentence).
 
If you are using a wood chipper, you are doing it wrong. Even on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic