Im interesting in Creating a Global Object which will be shared by all my servlets and all my JSP files. But i dont understand how to do it. Please advice.
for a senario this object would contain lots of information my servlets and jsp files would like to take information from. I know how to pass objects between servlets and jsp's. But i dont know how to initialize 1 global object for the whole "system" or" website"
<display-name>WebTest1</display-name>
<listener>
<listener-class>listeners.AppListener</listener-class>
</listener>
<welcome-file-list>
<welcome-file>MainPage.html</welcome-file>
<welcome-file>MainPage.htm</welcome-file>
<welcome-file>MainPage.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>SimpleServlet</servlet-name>
<servlet-class>servlets.SimpleServlet</servlet-class>
</servlet>