Solved

how to write UseBean tag

Posted on 2007-03-20
3
234 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

831 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