Solved

how to write UseBean tag

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
table example 4 32
Java exception bubble up 2 21
ejb entity bean example issue 2 18
Java program running SQL query 5 38
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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 …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…

820 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