JSP Java Interview Questions – Set 10

What do you understand by client side and server side templating The modern Rich Internet Applications (RIA) use the design concept of “single page web design”, where a single rich page makes ajax based service calls to render different sections of a page instead of the traditional approach of loading a new page of each user action.The “single page web design” … Read more

Multi Threading Java Interview Questions – Set 10

Explain different ways of creating a thread Threads can be used by either: Extending the Thread class. Implementing the Runnable interface. Using the Executor framework (this creates a thread pool) By extends: class Counter extends Thread { //method where the thread execution will start public void run(){ //logic to execute in a thread } //let’s see how to start the … Read more

JSP Java Interview Questions – Set 09

What types of comments are available in the JSP? There are two types of comments that are allowed in the JSP. They are hidden and output comments. A hidden comment does not appear in the generated HTML output, while output comments appear in the generated output. Example of hidden comment: < % – – This … Read more

Servlet Java Interview Questions – Set 09

In the Servlet 2.4 specification SingleThreadModel has been deprecated, why Because it is not practical to have such model. Whether you set isThreadSafe to true or false, you should take care of concurrent client requests to the JSP page by synchronizing access to any shared objects defined at the page level. Can you give some … Read more

Multi Threading Java Interview Questions – Set 09

Why is locking of a method or block of code for thread safety is called “synchronized” and not “lock” or “locked When a method or block of code is locked with the reserved “synchronized” key word in Java, the memory (i.e. heap) where the shared data is kept is synchronized. This means,When a synchronized block … Read more