Rahul Nair

Ranch Hand
+ Follow
since Dec 01, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Rahul Nair

Agreed. However, the string variable's value always replaces to new one when we assign new value to it if i am not wrong. The value or the strValue must be pointing to some memory address which contains the updated variable value. Right?
11 years ago

Hello Friends,

I tried to execute the below method and i got the output "Inside try block" surprisingly. Could anyone explain why it is printing "Inside try block" instead of "Inside finally block"? Its like we are assigning new value to the strValue variable. However, still i am not able to understand why it is printing "Inside try block".



11 years ago

Hello Ranchers,

I am facing some a problem for injecting my service instance of controller using IoC... I want to import the csv file and parse it according to the type. here type provides me which parse method i can use for parsing the csv file. Following is the classes i am using:

And i have the specific implementation of this ParseService according to the CSV file i.e if i am importing the Student record then i have StudentParseServiceImpl likewise if i am importing the Employee then i have EmployeeParseServiceImpl class.

now in my ImportController i have

parseService instance which i want to inject using the specific implementation of PraseService as mentioned earlier.

So, the question is How can i inject parseService at run-time using the type of file i am importing ?

Thanks

Rahul
14 years ago

Hi Jeanne,

I have not tried for large number of list. However my understanding is that the first code should be the choice ? Isn't it ?

Thanks,

Rahul
14 years ago

Hello Ranchers,

I have doubt about the sorting performance when using comparator.
Please consider the following code:

and

Which code is preferable if we compare the performance and why ?


14 years ago
Hey, Welcome to JavaRanch!

You need to update your server.xml file which is in "../tomcat/conf/server.xml" and replace the connection port value to "80" instead of "8080".
14 years ago
Yes David, you are correct! I have not seen it. Sorry for mislaid.
14 years ago
It is natural that, B can do all the stuff that A can, But the reverse is not true. As 'obj' reference is is pointing to the Object of type A, So if 'obj' is calling the B specific stuff on object of type A, then obviously it will not be able to do it. because it is referring the object of type A. That is why, it fails.

The downcast is fails, because A never does the B specific stuff.

Please check it here, the question is already answered.
14 years ago
According to my opinion, there should be something wrong in the Connection Information you have provided in the Hibernate configuration file for database URL, user name and password, etc. Please check the configuration for c3p0 once again, if you find something wrong. Please check here for Hibernate Specific Notes
Is it happening every time or occurs sometimes when you execute the application ?

Lester Burnham wrote:An HREF link will always use GET (unless it uses JavaScript to cause a form submit that uses POST).



Yes, but then the form always uses POST method to submit, if we want to use the GET for some intention, then it will not be possible. Isn't it ?
14 years ago

Is it possible for us to send a POST request using a link (<a href="#">Sent Post Request</a>) ?

Thanks,

Rahul
14 years ago


Do you know how to log the timeout? That would be really interesting, because creating a log timeout would be very useful for the administrator.\

Thanks for sharing idea. Looking forward to your reply



You can use the log4j for logging, so that administrator can use it to check the details...
Please check here for more details.
14 years ago
Yes, i think with Tabs the same session is used and using the New Window new session is created... if i am not wrong.

So, as related to the post, How we will track the New Tabs opened in the Browsers like in Firefox and IE 8?

14 years ago
Is it the necessary/suggested way to use Filter for this purpose... I mean we can also log the timeout using logger and sent it to login page saying session expired, please log in again!, if session time out by checking it in servlet code during each request.

Please share your opinions.

Thanks,

Rahul

14 years ago