Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting a bean to an item from the request?

Status
Not open for further replies.

TheElephantMan

Programmer
Joined
Jun 18, 2004
Messages
42
Location
US
Hi, all.

In one of the components of my "Controller", I have a piece of code that adds a java.util.Date to my request scope:
request.setAttribute("begin_date", resp.getBeginDate());

Then, one of my "View" components retrieves this attribute, and copies it into another local bean:
<bean:define id="statementDate" name="begin_date" scope="request" type="java.util.Date"/>

However, when I run my application, an exception is thrown, indicating the following:
javax.servlet.jsp.JspException: Cannot find bean begin_date in scope request

What am I doing wrong, here? Am I missing the proper way to copy the begin_date attribute into the statementDate bean?

Thanks,
TEM
 
Nevermind, all.

The issue was that the begin_date attribute was not in the request when I was trying to reference it. I was looking for it in the wrong place.

Elephant out.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top