I try to get the product id from the first query and use the id for second query.
So I have something like:
public Collection getProducts(int category_id)
{
ArrayList al = new ArrayList() ;
PreparedStatement s = null;
PreparedStatement s2= null;
ResultSet rs = null;
ResultSet rs2= null;
int...
I try to get the image path from database, then use <html:img> to display the image,
<html:img src='<bean:write name="ARRAYLIST"
property="imagePath" />' width="90" height="90" />
somehow the image never can show up. If I use normal html <img> with <bean:write> tag, it works fine.
( <img...
I am using Tomcat database connection pool. In my java class, Do I need to close database connection after I openned the connection and retrieved data from database.
I would appreciate any help on this.
I have a arraylist in my session and like to display 3 products per row in jsp with struts logic tag.
Does anybody know how to do this?
<logic:iterate name="PRODCATS" id="cats" >
<td>
<bean:write name="cats" property="prodName"/>
</td>
</logic:iterate>
How to restrict 3 columns...
In my index.jsp page(The portal page of my site), I like to have a drop down list box listing all the product categories so that the use can choose one category and search.
So in my javabean, let us call DataManagerBean, I have function public Collection getProductCategories(), which...
The java classpath is
C:\program Files\Java\jdk1.5.0_04
Whe I get the WAR example file, it is already compiled. so I didn't compile.
Please let me know of any question. Maybe I can also attach the .WAR file here, someone can put it in your tomcat environment to see if it is working.
Hello,
I have tomcat 5.0 and JDK 1.5 installed. I have deploy a example from book "Struts in Action" (from www.Manning.com/husted)
into tomcat/webapps directory. it is a WAR file. I keep getting the following error. Do you know how to fix it? I appreciate someone can help here...
I have two tables: CONTACTS -- ContactID is autonumber type; now I try to get the Max(ContactID) and insert into VENDORS table. (Below it is the SQL code)
Can you see anything wrong? especially SQL_query
I got syntax error.. Thank you very much!!!
Also, I designed a relational database...
Can anyboday help here..
I have few text links in a ASP file, for example:
Accessoreis | Accomodations
The user clik on the hyperlink, for example:
"Accessories", AFTER the clicking, the "Accessories" text stay bold.
What is the easy way to accomplish this?
Thank you very much!
I have a table named "table A", include ID and Form column; so like
ID Form
1 formA
2 formB
3 formC
....
Can anybody give me a sample code for MS Access module,
basically open the table, loop through each line and print out form name. Thanks.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.