aspose file tools*
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
Author

bean:parameter giving exception

Gayatri Sinha
Ranch Hand

Joined: Feb 13, 2006
Posts: 34
Hi,

In the ActionForm I am setting a session varaible

Boolean forward = new Boolean(false);
session.setAttribute("forward",forward);

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..

Thanks
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" >
</logic:equals>
[ March 02, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
 
subject: bean:parameter giving exception