This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Application Context Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Application Context" Watch "Application Context" New topic
Author

Application Context

Ankitt Gupta
Ranch Hand

Joined: Feb 19, 2009
Posts: 101
Servlet 1 which is in package A is setting the attribute in the context



where leaguelist1 is a LinkedList which gets its data from the database.

Now i am trying to get the attribute in Servet 2 which is in package B



When i try to iterate the leaguetitle its empty

My question is why it is empty and how to get the content of leaguelist1
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
It was either empty to begin with or it was emptied along the way... Your invocations are okay.


JDBCSupport - An easy to use, light-weight JDBC framework -
Ankitt Gupta
Ranch Hand

Joined: Feb 19, 2009
Posts: 101
Sebastian Janisch wrote:It was either empty to begin with or it was emptied along the way... Your invocations are okay.


Thanks seb you are right..i was clearing the LinkedList in the way through
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Application Context
 
Similar Threads
request attribute set in the jsp cannot be retrieved in the servlet
setting attribute for the entire application
RequestDispatcher doesn't work
Struts config
ServletContext getAttributeNames