jQuery in Action, 2nd edition*
The moose likes Servlets and the fly likes how can i set application variable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
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: 14687
    
  16

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://aspose.com/file-tools
 
subject: how can i set application variable
 
Similar Threads
Classpath variables
Application Scope Variable
creating a web application in eclipse
s:iterator tag in jsp page
How to assign a javascript variable to java varisble?