This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!

Srikanth Nalam

Greenhorn
+ Follow
since Feb 23, 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 Srikanth Nalam

Hi Shashibabu,

1.It is not mandatory to use *.do. But it is most widely used. You can use any.
Coming to its use, here any request received by the web container which ends with .do is handled by the ActionServlet. If you would like to handle a request using Struts you should ensure that it is mapped to Struts ActionServlet. Rather than mapping each and every request in the configuration file, it is better to use a pattern. Here *.do is used. So all the requests which end with .do will be handled by Struts

2.Serialization is meaningfull in multi tier application only. Have a look at Serialization
8 years ago
Hi Marcio,

I think you don't have to worry about in which jar or directory the files are.

To load the content from the properties file
1.Ensure that it is in classpath
2.Note down the the full qualified name of that file (ex: com.company.module5.config.properties)
3.Pass that full qualified name to the getBundle method of ResourBudle to get the reference and load data.
8 years ago
Hi Santosh,

I have tried to find the answer for this problem. I understood that it is not supported because of the following reasons
1.To avoid the Deadly Diamond of Death problem
2.To satisfy the one of the design goal of java "Simple, Object oriented and familiar". Details

Now how to achieve the same in java is explaned here
8 years ago
Hi Meet,

If you are using windows OS, you can use (PS tools) pskill.exe to kill a process.

Google to download and usage.

8 years ago
Hi Karim,

It seems a class is loaded only once as long as a single class loader is used. I found this info at link

Once a class is loaded into a JVM, the same class (I repeat, the same class) will not be loaded again. This leads to the question of what is meant by "the same class." Similar to the condition that an object has a specific state, an identity, and that an object is always associated with its code (class), a class loaded into a JVM also has a specific identity, which we'll look at now.

In Java, a class is identified by its fully qualified class name. The fully qualified class name consists of the package name and the class name. But a class is uniquely identified in a JVM using its fully qualified class name along with the instance of the ClassLoader that loaded the class. Thus, if a class named Cl in the package Pg is loaded by an instance kl1 of the class loader KlassLoader, the class instance of C1, i.e. C1.class is keyed in the JVM as (Cl, Pg, kl1). This means that the two class loader instances (Cl, Pg, kl1) and (Cl, Pg, kl2) are not one and the same, and classes loaded by them are also completely different and not type-compatible to each other. How many class loader instances do we have in a JVM? The next section explains this.
8 years ago
Hi Eeshwar,

This is called as hiding instance variable.

Code that uses a field access expression to access field x will access the field named x in the class indicated by the type of reference expression.

Detailed explanation for this behavior is given here
8 years ago
No.
For the constructor you need to pass the pattern in which the date string is received.
For the parse method you need to pass the strInputDate
There is a mistake in the code i gave in earlier post. The method should be 'parse' not 'format'
Date date=format.format("12/30/2009");


8 years ago
Hello Ravindra,

You need to ensure that 'strInputDate' is as per the style 'iDateFormat' and locale 'zh_HK'

I prefer to create a SimpleDateFormat object with the pattern in which the date string is expected and then parse it.

ex:
8 years ago
Hi Sony,

1.Yes. They actually mean that container calls init(sevletConfig) method.

2.Servlet loading and initilization happens once. For any further requests a thread will be created and service method will be called.
By not allowing to write constructor may be we are tyring to convey that each call to servlet won't create a seperate servlet object.

3&4. The init() method is basically for servlet developers to override and not to bother about ServletConfig.

A call to start method keeps that thread in queue for the scheduler to pick and run.
Now for the below code

In the first call the thread will be kept in the queue, now for the second call either main thread has to wait till the same existing thread object completes it's execution (as we can't have both in the queue as the object is same) or throw an exception.
They chose the second option.

This is just my analysis. There might be some other reasons also.
just add to this, transaction auto commit should be false.
The main criteria with which the collections differ are ordered, sorted

List - order of elements is guaranteed (ArrayList, LinkedList, Vector)

Set - duplicates not allowed (HashSet,LinkedHashSet, TreeSet)

Tree - Sorted (TreeMap, TreeSet)

Linked kind of data structure, order of elements is guaranteed (LinkedHashMap, LinkedHashSet)

However this can help you to remember only the basic differences. When it comes to detail, i think it will come with regular usage.
8 years ago
The mistake is in the line



it should be




8 years ago
JSP
Hello Rohit,

I haven't completely understood. If you are talking about operator overloading, as far as i know it is not possible in Java.

This link might help you Operator Overloading in Java
8 years ago