aspose file tools
The moose likes Servlets and the fly likes how can i set application variable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "how can i set application variable" Watch "how can i set application variable" New topic
Author

how can i set application variable

vinodheee kumar
Greenhorn

Joined: Apr 26, 2006
Posts: 9
As we know to create request variable and session variable
request.setAttribute(),session.setAttribute() respectively

how can i create application variable in servlet?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14672
    
  11

Call getServletContext() to retrieve the context and call setAttribute on the ServletContext instance.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how can i set application variable
 
Similar Threads
Classpath variables
creating a web application in eclipse
s:iterator tag in jsp page
Application Scope Variable
How to assign a javascript variable to java varisble?