• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot find bean "" in scope request

Rahul Ratnakar
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am facing a problem with the define tag .
In the piece of code below
<beanefine id="someID"
the bean by the name "someName" is not expected to be in the request when the page is displayed for the first time. So this code gives me the error
"Cannot find bean someName in scope request" .
In the page however , i am always using the logic:present tag to access this bean , so as no null pointers can be expected .
According to my understanding this code is simply a declaration for the bean and shud not crib in case the bean is not there in the request scope .
I must be wrong here... but why am not sure ....

Any way am running the code by replacing the above pc with
BeanClassName someID = (BeanClassName)request.getAttribute("someName");
which is working , but it defeats the very purpose of using Struts.
Any help on why am having this issue and how to strutitize my code ?
[ edited to disable smilies -ds ]
[ April 16, 2004: Message edited by: Dirk Schreckmann ]
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!