Is it possible to call servlet with parameters in the URL?-

Yes. You can call a servlet with parameters in the syntax as (?Param1 = xxx || m2 = yyy). Yes, it is possible to call a servlet with parameters in the URL. In Java web development using servlets, parameters can be passed to a servlet in the URL in two ways: Query Parameters: You can … Read more

Why should we go for interservlet communication

Servlets running together in the same server communicate with each other in several ways. The three major reasons to use interservlet communication are: a) Direct servlet manipulation – allows to gain access to the other currently loaded servlets and perform certain tasks (through the ServletContext object) b) Servlet reuse – allows the servlet to reuse … Read more

What is connection pooling?-

With servlets, opening a database connection is a major bottleneck because we are creating and tearing down a new connection for every page request and the time taken to create connection will be more. Creating a connection pool is an ideal approach for a complicated servlet. With a connection pool, we can duplicate only the … Read more

Is it possible to communicate from an applet to servlet and how many ways and how

Yes, there are three ways to communicate from an applet to servlet and they are: a) HTTP Communication(Text-based and object-based) b) Socket Communication c) RMI Communication. Yes, it is possible to communicate from an applet to a servlet in Java. There are several ways to achieve this communication. Here are a few common methods: URLConnection … Read more

What are cookies and how will you use them

Cookies are a mechanism that a servlet uses to have a client hold a small amount of state-information associated with the user. a) Create a cookie with the Cookie constructor: public Cookie(String name, String value) b) A servlet can send a cookie to the client by passing a Cookie object to the addCookie() method of … Read more