File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Simple Question........JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Simple Question........JSP" Watch "Simple Question........JSP" New topic
Author

Simple Question........JSP

Manohar Karamballi
Ranch Hand

Joined: Jul 17, 2001
Posts: 227
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

William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12779
    
    5
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:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Simple Question........JSP