Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ibrahim AlShehri
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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
 
S Vilish
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • 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.
 
Jesus Angeles
Ranch Hand
Posts: 2068
  • Mark post as helpful
  • send pies
  • 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.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Raghavan Muthu,

First you need to have a look at the naming policy (second para, last sentence).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic