Kiran Joshi

Ranch Hand
+ Follow
since Sep 04, 2005
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 Kiran Joshi

I think you are trying to implement a pick list kind of thing..
So in the second page, you want to present a list of users , when a particular user is selected, his name should appear in the opener screen.

If this is what you want, then for second page, just treat it as a normal jsp page & retrieve the list of users from session using JSP elements only.
Best way would be EL. render the user names as hyper links, on click on them, execute a javascript function that will update the opener form field with the selected value.

you can use window.opener.<<formid>>.<<elementid>>.value= <<selected value>>
Try opening this second page using javascript like below.

window.showModalDialog()

I found a related link here
http://www.java2s.com/Code/JavaScript/Javascript-Objects/ShowModalDialogwindowshowModalDialogURLmyArguments.htm
Which operating system you are on?
10 years ago
The implementing class is not required to be anonymous.
It is provided through the jars you keep in your classpath.
for example ojdbc14.jar or classes12.jar provided by db vendors like (oracle) or third parties that provide jdbc drivers.
There could be multiple timezones in a single country..
so that approach has limitations.

I feel, using javascript + Ajax + Servlet option is the most straightforward for this requirement.
10 years ago
JSP
I guess you can get it through Javascript.
10 years ago
JSP
Try this
<c:set var="name" value="Hi ${firstName}" />
10 years ago
JSP
Ken,

I have witnessed such an issue where the sql query fired by java program was following a different execution path than the one fired through sqlplus or TOAD. And that's why it was taking time too.There was an index which was not being used by query from java prog.
Our DBA had analyzed that by monitoring the execution path of the two cases. He suggested us to use a particular 'hint' in the sql query & it worked.
So the suggestion is, try to monitor the execution plan.
I assume your sql query is querying some db table and not querying 'dual'.
Try doing like this
Note the additional brackets surrounding the || conditions.

Try to check execution plan of the sql query in the database.
Check this when your servlet is firing the sql query.
There could be some issue with the indexes of the database tables involved in the query.
Not sure about JSF, however AJAX & Javascript DOM may help here.
11 years ago
JSF
One way I know is.

Using wsimport of JAX-WS create stub classes for the webservice.
Using these create a simple core java client.
11 years ago
is it mandatory for you to get the database properties from tnsnames.ora only?
how about configuring the db details in a properties files & continuing with thin driver only?
I have tried to answer the questions.

1] What does the default implementation of equals() method do?
It checks the Object equality.
i.e.
for any non-null reference values x and y, this method returns true if and only if x and y refer to the same object (x == y has the value true).

2] What does it do when overridden?

It behaves as per the code you write in the overridden method.
e.g. if you have student class, you can just check the roll number of two student objects to declare that they are equal.
There are defined rules for equality check that it should be reflexive,symmetric,transitive & consistent

3] What does the default implementation of hashcode() method do?
Returns a hash code value (an integer) for the object.
This method is supported for the benefit of hashtables to identify the proper storage bucket.

4] What does it do when overridden?
Again depends on the code you write in the overridden method.
You have to define the implementation for your user defined class that follows the general contract for hashcode.
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html

5] How do we define what is the appropriate, correct, legal implementation of these methods?
There are guidelines in the API
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html