• 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

Simple Question........JSP

 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai!
I have two doubts regarding JSP.
First one:

-- I have javabean whose constructor has Paramters.
How to pass parameters to constructor while initializing bean from JSP using Usebean tag?
Second one:
-- I have Javabean A in which one of the properties is of type Javabean B. Now problem is to get a property of B say x thorough the instance of A using get property tag in JSP .. Something like objA.getB().getX();
Any help in this regard is appreciable
Regards
Manohar

 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. If your constructor has parameters, it is NOT a JavaBean. You will have to reorganize your code. The JSP <jsp:useBean tag depends on there being a no-args constructor.
2. I don't think that JSP will write code to do that. You will have to code it yourself.
Bill

------------------
author of:
 
It's hard to fight evil. The little things, like a nice sandwich, really helps. Right tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic