Forums Register Login

servlet related interview questions

+Pie Number of slices to send: Send
Hi all,

there are some servlet related questions, pl help me

1) what is the diff between ServletContext and ServletConfig and what is the relationship between the two?
2)what is the diff between server.xml and web.xml and what is the relationship between the two?

pl help me. is urgent.

Regards

Jhanavi.
+Pie Number of slices to send: Send
Hi Jhanavi,

Difference between ServletConfig and ServletContext ?
ServletConfig is used to fetch the application specific data as the Initial parameters required for an application. Whereas ServletContext is used to get other details as to the applicatoin and server properties.
ServletConfig Object is passed in init() method which is further passed to the HTTPServlet Class.

Difference between server.xml and web.xml ?
Server.xml have the properties set which are required by the server as to the Cache size or some other properties, whereas web.xml contains properties specific to a web application.

Thanks,
Rahul Juneja
Not so fast naughty spawn! I want you to know about
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 952 times.
Similar Threads
painting JComponents
what are the most common questions on Java job interviews?
How to define CMP relationship examples
Difference between init() and init(ServletConfig config) methods
extend and include relationships
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:01:52.