jQuery in Action, 3rd edition
The moose likes Struts and the fly likes bean:parameter giving exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:parameter giving exception" Watch "bean:parameter giving exception" New topic

bean:parameter giving exception

Gayatri Sinha
Ranch Hand

Joined: Feb 13, 2006
Posts: 34

In the ActionForm I am setting a session varaible

Boolean forward = new Boolean(false);

In the front end jsp page when I use the struts tag to get the variable as
<bean arameter id="sample" name="forward" />
it gives an exception thta there is no such parameter.

>javax.servlet.jsp.JspException: ServletException in '/sample.jsp': No >parameter forward was included in this request
> at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:923)
> at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:462)

Am I missing something here..

Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The <bean:parameter> tag is for parameters passed in the query string as in: mypage.jsp?parm1=xyz.

What you want to use for this example is the <bean:write> tag.

<bean:write name="forward" />

Or if you want to use it in a conditional expression:

<logic:equals name="forward" value="true" >
[ March 02, 2006: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
I agree. Here's the link: http://aspose.com/file-tools
subject: bean:parameter giving exception
It's not a secret anymore!