Browsed by
Category: Blog

Who is loading the init() method of servlet

Who is loading the init() method of servlet

?– Web server. In Java servlets, the init() method is automatically called by the servlet container (e.g., Tomcat, Jetty) when the servlet is first loaded into memory. It is part of the servlet lifecycle and is invoked only once during the servlet’s initialization. So, the correct answer to the question “Who is loading the init() method of servlet?” would be: The servlet container (or servlet engine) is responsible for loading and invoking the init() method of a servlet.

How do you pass data (including JavaBeans) to a JSP from a servlet?-

How do you pass data (including JavaBeans) to a JSP from a servlet?-

?– (1) Request Lifetime: Using this technique to pass beans, a request dispatcher (using either “include” or forward”) can be called. This bean will disappear after processing this request has been completed. Servlet: request. setAttribute(”theBean”, myBean); RequestDispatcher rd = getServletContext(). getRequestDispatcher(”thepage. jsp”); rd. forward(request, response); JSP PAGE:<jsp: useBean id=”theBean” scope=”request” class=”. . . . . ” />(2) Session Lifetime: Using this technique to pass beans that are relevant to a particular session (such as in individual user login) over a…

Read More Read More

Trishla Homes – Peer Mushalla, Dhakoli/Zirakpur

Trishla Homes – Peer Mushalla, Dhakoli/Zirakpur

Developer : Trishla Builders 1/2/3 BHK Flats This Project was executed by Trishla Builders Peer Mushalla, NAC Zirakpur Distt. Mohali. This Project was approved by the Government. Construction of this project was executed in March 2007 & possession was offered in august 2009, as per commitment. We have built a housing of 348 flats and have 330 families living with us. Trishla Plus Homes has been declared as the best property in tri-city through a survey carried out by Zee…

Read More Read More

What is the difference between the Boolean & operator and the && operator

What is the difference between the Boolean & operator and the && operator

If an expression involving the Boolean & operator is evaluated, both operands are evaluated. Then the &operator is applied to the operand. When an expression involving the && operator is evaluated, the first operand is evaluated. If the first operand returns a value of true then the second operand is evaluated. The && operator is then applied to the first and second operands. If the first operand evaluates to false, the evaluation of the second operand is skipped.

How can a GUI component handle its own events

How can a GUI component handle its own events

A component can handle its own events by implementing the required event-listener interface and adding itself as its own event listener. In Java, GUI components can handle their own events by implementing event listener interfaces. The most common way to handle events for GUI components is by implementing listener interfaces such as ActionListener, MouseListener, KeyListener, etc. Here is a brief explanation: Implementing Event Listener Interface: To handle events on a GUI component, you need to make your class implement the…

Read More Read More

Zayed Khan

Zayed Khan

Zayed Khan 25 years old, son of Sanjay Khan and Firoz Khan as uncle, so the acting is in his blood. He is a perfect new-age hero. He is mature and intelligent. He has the looks of a Greek god and a mind blowing screen presence. With a cinematic sense grounded in hard core film making. Zayed Khan done his schooling at Wellan Boys boarding school at Dehradun. After his 10th, Zayed moved to International School at Kodaikanal which shaped…

Read More Read More

What is difference between String, StringBuffer and StringBuilder? When to use them?

What is difference between String, StringBuffer and StringBuilder? When to use them?

The main difference between the three most commonly used String classes as follows. StringBuffer and StringBuilder objects are mutable whereas String class objects are immutable. StringBuffer class implementation is synchronized while StringBuilder class is not synchronized. Concatenation operator “+” is internally implemented by Java using either StringBuffer or StringBuilder. Criteria to choose among String, StringBuffer and StringBuilder If the Object value will not change in a scenario use String Class because a String object is immutable. If the Object value…

Read More Read More

Amitabh Bachchan

Amitabh Bachchan

Amitabh Bachchan is an Indian film actor, film producer, television host, occasional playback singer and former politician. He first gained popularity in the early 1970s for films such as Zanjeer, Deewaar and Sholay, and was dubbed India’s “angry young man” for his on-screen roles in Bollywood. Amitabh Bachchan been the lifeline of bollywood for over two decades. Even though his first movie had situations, Amitabh bounced back with his 1973 hit Janzeer. Janzeer established him as the angry young man…

Read More Read More

Nana Patekar

Nana Patekar

An actor with a difference. Versatility is second nature to this talented multi-faceted actor. Making his debut with Aaj Ki Awaaz he went on to Ankush which catapulted him to fame. He then did Parinda and Krantiveer for which he won the Best Actor Award. Nana Patekar’s range of roles varied from a jealous-sadistic husband to a deaf and dumb parent in Khamoshi to an underworld don. To each role, he imparts a very distinctive Nana Patekar style, which is…

Read More Read More

Vinod Khanna

Vinod Khanna

Vinod Khanna is possibly the only male star in the Hindi film industry who forsook fame at the height of success. After a long string of hits in 1977-1978, Vinod was Amitabh Bachchan’s direct competitor in the superstar sweepstakes. He shocked filmdom and the public by announcing his retirement. Nonchalantly, he determinedly embarked on a quest for spiritual fulfillment. People should have learnt to expect the unexpected from Vinod Khanna. After all, a few years earlier, he had already worked…

Read More Read More