Shusha Li

Greenhorn
+ Follow
since Mar 16, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Shusha Li

Yes, I refreshed and still the added cookie not shown.....
11 years ago
Hi, Everyone,

I have a problem adding a cookie to my JSP page which is in struts. I add the following codes to my jsp page:


But when deploy my application at Tomcat 6, I can NOT find the cookie"Message" printed out.....

Please help!!!Thanks!!!
11 years ago
Hi, All,

I am new to hibernate, please help. I want to map different tables to one class like this
Tables:
1)Loan:
-loanID
-currentBalance

2)Address :
- addressID
- street
- citystatezip

3)Property:
- propertyID;
- addressID;
- loanID;

I create single POJO class AccountView which contains fields from ALL tables.
public class AccountView{
long loanID;
double currentBalance;
Address address;
}
i also have a class Address in a different folder
public class Address{
long addressID;
String street;
String citystatezip;
}

I did my hibernate mapping for AccountView as following:
<hibernate-mapping>
<class name="com.myaccount.AccountView" table="Loan">
<cache usage="read-only"/>
<id name="loanID" type="long" unsaved-value="-1">
<column name="loanID" sql-type="long" not-null="true"/>
<generator class="assigned"/>
</id>
<property column="currentBalance" name="currentBalance" not-null="false" type="double"/>
<set name="address" table="PROPERTY" cascade="all">
<key column="loanID" />
<many-to-many column="addressID" class="com.myprofile.Address" />
</set>
</class>
</hibernate-mapping>

But it gives me errors....

Please suggest me how to do hibernate mapping(Mapping *.hbm.xml file) in this case.

Thanks in Advance.