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 JSP and the fly likes Problem while reading variable from 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 » JSP
Bookmark "Problem while reading variable from application context" Watch "Problem while reading variable from application context" New topic
Author

Problem while reading variable from application context

Brij Garg
Ranch Hand

Joined: Apr 29, 2008
Posts: 234
jsp code is given below


In the above code image tag is taking src="GetImage"
GetImage is a servlet which is returning an image after compressing the image in out stream. I am setting one variable at application level to read that variable in the jsp.
Code snipet is given

When I run this code first time, value of message in jsp is "null". Why It is so? Since I am setting the message at application level, I think even for this first time, I should get the message in my jsp.

Can somebody suggest some reason for this behavour?

Thanks
Madhan Sundararajan Devaki
Ranch Hand

Joined: Mar 18, 2011
Posts: 312

Which executes first? (the jsp or the code setting the message value)


S.D. MADHAN
Not many get the right opportunity !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem while reading variable from application context
 
Similar Threads
Unable to pass variable to java method from jsp
JSTL: remove object from scope
The attribute directive in tag files.
request.getAttribute is null!
problem with Simple captcha implementation for sub folders directory