Solved

how to write UseBean tag

Posted on 2007-03-20
3
213 Views
Last Modified: 2013-12-29
Hi Guys

I have a InputDataBean which I call from my JSP file using the following code. Now I needed to use UseBean tag instead of the java code. I am a newbie on ?JStL tags. Would you guys know how can i do that

Thanks
-------------------------------------------------------------
SRSReportingDataBean reportingDb = new SRSReportingDataBean();
reportingDb.setSqlQuery("CATALOG");
reportingDb.setResourceBundle("com.srs.common.properties.SRSReportingMessages");//USER_RESOURCE_BUNDLE
com.ibm.commerce.beans.DataBeanManager.activate(reportingDb, request, response);
String []reportResult=reportingDb.getReportResultSet();

-------------------------------------------------------------

0
Comment
Question by:huzefaq
3 Comments
 
LVL 10

Expert Comment

by:Jaax
ID: 18761782
In your JSP use something like this
<!-- For Cart Bean-->
<jsp:useBean id="cart" scope="session" class="session.Carts" />
<jsp:setProperty name="cart" property="*" />

<!-- For Checking Bean-->
<jsp:useBean id="checking" scope="session" class="bank.Checking" >
<jsp:setProperty name="checking" property="balance" value="0.0" />
</jsp:useBean>

0
 

Author Comment

by:huzefaq
ID: 18761963
Thanks,

Also how can I pass parameters, two of the parameters would be String and one HashTable

Thanks

0
 
LVL 19

Accepted Solution

by:
Kuldeepchaturvedi earned 500 total points
ID: 18762061
you shd be able to do
<jsp:useBean id="cart" scope="session" class="session.Carts" />

<% cart.methodName(parm1,parm2);
%>
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now