• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to get servletcontext attribute in jsp  RSS feed

 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys
i have set attribute in servletcontext
but when i tried to get that attribute in jsp iam not able to retrive

in my servlet i use the following code set the servletcontext parameter



also iam able to get this parameter in other servlet

the following is the code used in my jsp




looking for your replies
amir
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean you aren't able to retrieve it.
What are you getting when you try?

Your code looks good, except you aren't downcasting your object after retrieving it from context scope.
 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks ben for your reply
i made a mistake by trying to access a scripplet variable in struts tag
instead of setting to (page ,session,request ) scope
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!