This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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