This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Struts and the fly likes bean:define property Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:define property" Watch "bean:define property" New topic

bean:define property

Hemang Joshi

Joined: Feb 26, 2006
Posts: 5
Hi All,

I have already defined struts-bean tag at the start of JSP and would like to store bean property value in a java variable using <bean define> tag.

<bean efine id="Test"
scope="session" />

Test : <%=Test%>

It throws an exception stating that variable Test not identified as following.

org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
Test cannot be resolved

I have reffered few books and according to it the above syntex is correct.

Looking for your input.

art gems

Joined: Oct 01, 2003
Posts: 5
it would really have to be:

<%@ taglib uri="/tags/struts-bean" prefix="bean" %> (or whatever uri you mapped ur tld to in web.xml)

<bean: define id="Test" (without the space between bean: and define, of course)
scope="session" />;

Test : <%=Test%>
[ February 27, 2006: Message edited by: art gems ]
I agree. Here's the link:
subject: bean:define property