Hello,

I am in a jsp preceded by an action and I want to display the form of
the action but not within form html tags.

For instance : 
My Form : 

public class SearchForm extends ActionForm {
    public SearchForm() {}
    private String mKeyword = "";
    public String getKeyword() { return mKeyword;}
    public void setKeyword(String pKeyword) { mKeyword = pKeyword;}
}

My Jsp : 

<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<bean:struts id="form" formBean="searchForm"/>
You searched : <bean:write name="form" property="keyword" />

I've got this exception : 
javax.servlet.jsp.JspException: No getter method for property keyword of
bean form
        at javax.servlet.jsp.JspException.<init>(JspException.java:73)
        at
org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:132)
        at
root.store._0002froot_0002fstore_0002findexsearch_0002ejspindexsearch_jsp_0._jspService(_0002froot_0002fstore_0002findexsearch_0002ejspindexsearch_jsp_0.java:371)
        at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        ...

The object form is really a SearchForm (getType method of the form that
is working).
thanks,
Christophe Sauldubois.

Reply via email to