Tuesday, November 29, 2011

Apart from context param , is there any other way to set/declare the global variable to access over the application?

yes i think we canuse some variable is session for accessing it in applicarion by making session attribute of application level; i.e session="application":getServetContext() will return ServletContext. now use method setAttribute() on this context and set the parameter.:Every other public static variable can be accessed in the similar way as of a context param.
Category:Servlet Interview Questions

No comments:

Post a Comment