Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Ramakrishna Udupa

Ranch Hand
+ Follow
since Aug 09, 2013
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
4
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ramakrishna Udupa

@Ja King

got solution for this? I'm facing same type of problem now. what's the solution?

Regards:
Ramakrishna K.C
5 years ago
Hi All,

In hibernate we have annotations/xml to create one to many/vice-versa, many to many and one to one relationships and then to persist.

But how can we achieve this in Spring Data support? Please give me any link about this(with complete explanation) or explain me by taking small example like


E.g. assume this model:

Customer (customerId, name, age, ...)
Address (customerId, type, street, city, ...)

PaymentOption (customerId, cardnumber, cardtype, ...)



Thanks:
Ramakrishna K.C
5 years ago
Thanks @Ulf Dittmer. Its helped. Actually I searched before, but i dint get at that time. Fortunately I got now..

Thanks:
Ramakrishna K.C
Hi All,

I installed oracle 11g XE in my system. While installing it asked me to give ONLY password. Now, I want to start the oracle server and have to make DB conn. through hibernate. But, I dont how to start server and make conn. to DB through hibernate. I dont know this property. Please somebody help me.

1) how to start up the Oracle server.
2) what's the property of that url.


Admin name= System name and password is = "oracle"..



Thanks:
Ramakrishna K.C

Jayesh A Lalwani wrote:You have not initialized the circle member inside your shape. So, shape.getCircle returns null. When you try to call getName on shape.getCircle, you get a NPE.

You should inject the circle into the shape.



Why should I initialize that? In spring.xml, I think the below line will take care of initialization.



am I right?
6 years ago
Hi All,

I posted all my code below.

spring.xml


LoggingAspect.java


Triangle.java


Circle.java


Sahpe.java


AopTester.java


Output is:


Its perfect. But, In AOPTester.java if you replace LINE 1 as

It's giving NullPointerException. I thought output would be


Can anyone Explain me, what's happening(cause for exception) when I call ?


Second Doubt:
When I print that, like


It's showing "null". why?
Thanks:
Ramakrishna k.c
6 years ago
@Maneesh Godbole Thanks
Can anyone please suggest me a good starting point to learn Oracle DB.

Thanks:
Ramakrishna K.C
Hi,

This is my sample code,



All it will do is simply serialized and de-serialized. But, The serialized object, where will be stored? If it is jvm, then how can I store data permanently in serialized mode. Like for example, consider a simple game. Game have a feature like you can save the current level and you can shut down the game. When you open the same again(after so many days), it'll start from the level where you saved last time not from the beginning level. How can you achieve this. In that type of case, should we save that data into DB instead of doing serialize? I mean, serialization is volatile, like until and unless program shutdown serialization works after that it'll not right?(I think yes, exactly don't know)

Thanks:
Ramakrishna K.C
6 years ago
Hi All,

I don't know where to ask this J2ee Question. Sorry, because If I'm asking this question in wrong Place.

What is the difference between JSESSION ID and Session?
I red THIS blog, I got the explanation but I'm actually confused about JSESSION ID and Session..
In that blog, they told about JSESSION ID cookie. then

What is the difference between JSESSION ID and Cookie?

Please give me proper explanation.

Thanks:
Ramakrishna K.C
6 years ago
so.. No need to worry? This code is right? I've to store all attributes in session itself, causes no problem?

6 years ago
like, If I have more and more parameters.. then I can't store all those in session right? I mean, its not good right?
6 years ago

For starters, you should never handle a login via GET - it transfers parameters in the URL, and thus makes the password visible in all kinds of places where it should not be visible. Very bad.



Yeah. I got that. Just for quick post I typed dummy prog.
Thanks for your suggestion.

Never compare strings using "==" or "!=", use the "equals" method instead

Yeah. equals method is right. But, != comparison also wrong?

Now I want to store those username and age(in .html) somewhere and I want those information in welcome.jsp. Now, I'm storing all those in session itself(In doGet method(servlet)). I think, there may be still better and good way to store. Please can anyone suggest me, with proper explanation.


This is my main Problem.

Thanks
6 years ago
Hi All,

I've sample code of jsp and servlets. Below is my code.

Index.html



welcome.jsp



AnnotationServlet.java


Now I want to store those username and age(in .html) somewhere and I want those information in welcome.jsp. Now, I'm storing all those in session itself(In doGet method(servlet)). I think, there may be still better and good way to store. Please can anyone suggest me, with proper explanation.

2 Doubt) Also, when I get the session in servlet line No. 27. The session value is

org.apache.catalina.session.StandardSessionFacade@69a8bf4f

. I'm expecting that session is to be empty. Because, I dint store anything until that line. Please explain me this too.

Thanks
Ramakrishna K.C
6 years ago
No.. I love servlets. Not like that. But, I'm using struts, i dint know I can use both servlets and struts-2 together. in web.xml i've to do filter and filtermapping. Also servlets?
6 years ago