javax.servlet.jsp.JspException: No getter method for property

javax.servlet.jsp.JspException: No getter method for property getAvailableAddres
sRequest.resellerId of bean org.apache.struts.taglib.html.BEAN
    at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:968)

struts-config.xml:

<form-beans>
        <form-bean name="getAvailableAddress" type="com.wisor.talktalk.model.GetAvailableAddress" />
        <form-bean name="provideRequest" type="com.wisor.talktalk.common.talktalkbean.RequestActionForm" />
    </form-beans>

    <action-mappings>
        <action path="/ttTestJsp" type="com.wisor.talktalk.controller.TestJsp"
            name="getAvailableAddress"
            scope="session"
            validate="false"
            unknown="false">
            <forward name="init" path="/WEB-INF/talk/preorderView/getAvailableAddress.jsp"/>
        </action>
    </action-mappings>

JSP Page:

<html:form action="/ttTestJsp.do?task=getResponse" styleClass="form">
        <fieldset>
            <label class="inline label" for="reseller_id"><fmt:message
                    key="label.field.resellerId" />:</label>
            <html:text
                property="getAvailableAddressRequest.resellerId"
                styleClass="mandatory" readonly="readonly"></html:text>
        </fieldset>
    <html:submit value="GetAddress"/>
    </html:form>

FormBean Main:

    public class GetAvailableAddress extends ActionForm{
    private GetAvailableAddressRequest getAvailableAddressRequest;

    public void intilize(){
        getAvailableAddressRequest = new GetAvailableAddressRequest();
    }

    public GetAvailableAddressRequest getGetAvailableAddressRequest(){
        return this.getAvailableAddressRequest;
    }
    public void setGetAvailableAddressRequest(GetAvailableAddressRequest getAvailableAddressRequest){
        this.getAvailableAddressRequest = getAvailableAddressRequest;
    }
}

child Form Bean:

    public class GetAvailableAddressRequest implements Serializable{

    private String resellerId;
    public String getResellerID(){
        return this.resellerId;
    }
    public void setResellerID(String resellerId){
        this.resellerId = resellerId;
    }
     }

Action Class:

public class TestJsp extends Action {
Logger logger = Logger.getLogger(this.getClass());
@Override
public ActionForward execute( ActionMapping map, ActionForm actionForm,
        HttpServletRequest request, HttpServletResponse response) throws Exception{
ActionForward forward = null;
        GetAvailableAddress form = (GetAvailableAddress) actionForm;
form.intilize();
forward = map.findForward("init");
        return forward;
}}
时间: 2024-10-03 13:09:44

javax.servlet.jsp.JspException: No getter method for property的相关文章

解决javax.servlet.jsp.JspException cannot be resolved to a type

java开发工具 在导入新项目后出现 javax.servlet.jsp.JspException cannot be resolved to a type错误信息: 解决方案: 看看项目中是否存在jsp.api.jar包.若是不存在就去tomcat中copy一份  jsp.api.jar包到项目lib中 The import javax.servlet.http.HttpServletRequest cannot be resolved 错误信息 解决方案: 看看项目中是否存在servlet.

The import javax.servlet.jsp.JspException cannot be resolved

问题描述 ??重新更换了 Apache Tomcat 的版本,在 Eclipse 中项目报错信息:The import javax.servlet.jsp.JspException cannot be resolved 解决方法 ??重新配置一下工程路径,配置服务器. Eclipse -> Project -> Clean... 一下工程; 右键 工程项目 -> Build Path -> Configure Build Path... -> Java Build Path

javax.servlet.jsp.JspException cannot be resolved

加入以下,解决 <properties> <jdk.version>1.6</jdk.version> <spring.version>3.2.8.RELEASE</spring.version> <spring.security.version>3.2.3.RELEASE</spring.security.version> <!-- Web --> <jsp.version>2.1</jsp

javax.servlet.jsp.JspException cannot be resolved to a type

在你的项目中加入jsp-api.jar和servlet-api.jar包,这两个包来源于tomcat的libs目录中,但是会出现一个问题,项目打包发布的时候也会将这两个jar打包出去,这时候发布到tomcat中后tomcat可能启动失败,同时你的jar包可能和tomcat中的jar版本不一致等情况. 解决方式:右键你的项目--properties选择Targeted Runtimes,选择你的运行环境,我选择Apache Tomcat v7.0,Apply--OK. 原文地址:https://w

jsp使用c:forEach报错 javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext的问题

今天发现了一个折磨我一天的问题: 在jsp文件中使用 <c:forEach items="${checkResult}" var="item"> </c:forEach> 一直报错: [ERROR] 2013-12-09 15:03:20,740 method:org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:253) Servlet.

[springMVC]javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean

问题描述: 页面使用标签<form:form>进行提交时,出现[springMVC]javax.servlet.jsp.JspTagException: Neither BindingResult nor plain target object for bean异常. 原因分析: 渲染页面时,<form:form>标签有一个默认属性commandName,其值默认为”command".其实这个command就是对应controller中的javabean.但我的contr

javax.servlet.jsp cannot be resolved to a type

把MyEclipse里的项目导入到Eclipse Luna版中后出现了个莫名其妙的错误,注:Eclipse Luna是新装的. 错误描述:jsp页面中引用的js报错,鼠标放上去以后提示:javax.servlet.jsp cannot be resolved to a type.图片为证: 类似以上底下有红色波浪线的错误,好多jsp页面都有,还各不相同. 解决办法: 点击菜单栏:Window→Preferences→Validation,在右侧找"JSP Syntax Validator&quo

javax.servlet.jsp cannot be resolved to a type,javax.servlet

可能是jdk 里不包括servlet-api.jar这个包,到tomcat里找到这个包复制到java项目里. 项目名-->右键 Property-->选择 Java Build Path-->选择 Add External JARs-->选择 把servlet-api.jar的路径输入即可 该包在tomcat里有 搜索即课找到 javaxservletjspJspException cannot be resolved to a type javaxservletjspPageCo

java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

今天写SpringMvc时,遇到这样一个问题: java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config at org.springframework.web.servlet.support.JstlUtils.exposeLocalizationContext(JstlUtils.java:101) at org.springframework.web.servlet.view.JstlView.exposeHelpe