Solved

how to write UseBean tag

Posted on 2007-03-20
3
257 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses

628 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