Janhavi Namshikar

Ranch Hand
+ Follow
since Sep 29, 2005
Janhavi likes ...
Eclipse IDE Spring Java
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Janhavi Namshikar

My favourites:

National teams (I've got 2) = Portugal and Germany
Club - Tottenham Hotspur FC. Also support Sporting Clube de Goa
16 years ago
Toy Story
Cars
Shrek
Shark Tale
Finding Nemo
Happy Feet
17 years ago
Expiration date for SCJP?
Is there any expiration date set for the exams? I had passed SCJP way back in 2003, so does that mean I need to renew or appear for SCJP again to do SCWCD?

Thanks,
Janhavi.
Thanks Siva,

In any JSP where I use the standard action in this way :
<jsp:useBean id="myobj" type="mypackage.MyClass" scope="session" />

I should always ensure that there is an instance - myobj, of type MyClass existing in the session scope. If not, then an Exception is thrown.

Thanks once again to both.

Janhavi.
Hi Manish,

Thanks for the answer.
Just one more question... If I have an instance of MyClass present in the session, but its not myobj but it is say.. myobj1 or anything else (but myobj)
In that case would an Exception be thrown?

Thanks,
Janhavi.
Hi,
I have just started with standard actions (the SCWCD prep. is going at a leisure pace )
Well, I have a question regarding standard action, <jsp:useBean> and the atributes.
If I use the useBean standard action like this :

<jsp:useBean id="myobj" type="mypackage.MyClass" scope="session" />

My understanding : an instance of type MyClass should be there in the session,and it given the local name "myobj" and it will be used in the JSP.
Question: If the object is not present in the session, would an instance be created and then set in the session? Or will an Exception be thrown?

Thanks,
Janhavi.
Hi all,

I am having this problem with generating the value for a column.

I have a java bean with an attribute called "createDate" having type as Timestamp.
I have mapped this property in the .hbm.xml file as

<property name="createDate" column="create_date" update="false" type="timestamp" generated="insert"/>
I want the value for this column to be generated at insert time,as the current date time value.

The problem is with the generated="insert". If I include this in the mapping file, this is the error i am getting

Attribute "generated" must be declared for element type "property".

The Doctype declaration is as follows:

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">



Any solutions on this.
Thanks in advance for the help.
Hi,

Try this, use the entity-name attribute to differentiate between the two instances.

<class name="MyClass" table="mytable"
entity-name="somename">
<property name="prop" column="col">
</class>


<class name="MyClass" table="mytable"
entity-name="othername">
<property name="prop" column="col">
</class>
Hi
Can you post the error message that you are getting.
Lifecycle of Entity bean (BMP)

newInstance()
setEntityContext()
ejbHome()
ejbCreate()/ejbPostCreate()

Not very sure of session beans.

Originally posted by Ulf Dittmer:


You can make the route up as you go - the Tour takes a different route every year.




Ohh, I wasn't aware of that. Thought its the same route year after year after year.
17 years ago
Would love to travel (on a bicycle) the route of the Tour de France.
17 years ago