❮ Previous Next ❯

ServletConfig

servlet_config

Here's how it looks under web.xml :

Example

<servlet>
<servlet-name>ServletConfigDemo</servlet-name>
<servlet-class>com.javarace.ServletConfigTest</servlet-class>
<init-param>
<param-name>topic</param-name>
<param-value>Difference between ServletConfig and ServletContext</param-value>
</init-param>
</servlet>

ServletContext

Here's how it looks under web.xml :

<context-param>
<param-name>globalVariable</param-name>
<param-value>com.javarace</param-value>
</context-param>

So finally...

No. of web applications = That many number of ServletContext objects

No. of servlet classes = That many number of ServletConfig objects

Difference between ServletContext and ServletConfig


❮ Previous Next ❯

Follow Us





  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved