For an implementation of client and server, I need to have on servlet to be started soon after deploying, another one should wait for the request. Is it possible? If what is right way to implement it.
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<description></description>
<display-name>WiCodeRedeemRequest</display-name>
<servlet-name>WiCodeRedeemRequest</servlet-name>
<servlet-class>com.wicode.redeem.WiCodeRedeemRequest</servlet-class>
</servlet>
<servlet>
<servlet-name>WiCode</servlet-name>
<servlet-class>com.wicode.redeem.WiCode</servlet-class>
<init-param>
<param-name>Group</param-name>
<param-value>1</param-value>
</init-param>
<init-param>
<param-name>Instance</param-name>
<param-value>1</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>WiCodeRedeemRequest</servlet-name>
<url-pattern>/WiCode</url-pattern>
</servlet-mapping>
</web-app>
Above is my web.xml. I have seen somewhere usage of listener.
I am new to servlet. Need help please.
Small template xml..