Advanced Java and Web Technologies for JNTUK
Blog providing beginner tutorials on different web technologies like HTML, CSS, Javascript, PHP, MYSQL, XML, Java Beans, Servlets, JSP and AJAX
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

Retrieving Parameters in Servlets

Categories: Servlets. No Comments on Retrieving Parameters in Servlets

It is common in web applications to pass data or parameters from one to another page. To retrieve the values of various elements in a HTML form or from another page, we can use the following methods which are available in HttpServletRequest object: String getParameter(String  name) Enumeration getParameterNames() String[] getParamterValues(String  name)   Following example demonstrates […]

Read the rest of this entry »

Initialization Parameters in Servlets

Categories: Servlets. No Comments on Initialization Parameters in Servlets

Most of the time, data (Ex: admin email, database username and password, user roles etc…) need to be provided in the production mode (client choice). Initialization parameters can reduce the complexity and maintenance. Initialization parameters are specified in the web.xml file as follows: <servlet> <servlet-name>Name of servlet</servlet-name> <servlet-class>Servlet class</servlet-class> <init-param> <param-name>Mail</param-name> <param-value>admin@company.com</param-value> </init-param> </servlet>   […]

Read the rest of this entry »

Creating and Executing a Servlet Manually

Categories: Servlets. No Comments on Creating and Executing a Servlet Manually

Here we will learn how to create and execute a servlet manually i.e., without using any IDEs. For developing web applications using servlets you need a application server like Apache Tomcat, and a text editor like notepad.   Video: Apache Tomcat Installation   Subscribe to our monthly newsletter. Get notified about latest articles, offers and contests. […]

Read the rest of this entry »

Servlet API

Categories: Servlets. No Comments on Servlet API

Servlet API is a set of classes and interfaces that specify a contract between a servlet class and a servlet container. Some examples of servers that provide servlet containers are: Apache Tomcat, Oracle’s WebLogic, IBM’s Websphere, JBoss etc. All the API classes and interfaces are grouped into following packages: javax.servlet javax.servlet.http   javax.servlet Package   […]

Read the rest of this entry »

Life Cycle of a Servlet

Categories: Servlets. No Comments on Life Cycle of a Servlet

Introduction   Life cycle of a servlet contains the following stages: Instantiation Initialization Servicing Destruction   Following figure illustrates the life cycle of a servlet: Subscribe to our monthly newsletter. Get notified about latest articles, offers and contests. Email address: Leave this field empty if you’re human:     Instantiation   In this stage the […]

Read the rest of this entry »