Cannot find bean org.apache.struts.taglib.html.BEAN in any area

I have a form that has five tabs. In one of the tabs (background.jsp) when changing a flag (to be checked or unchecked) I try to set the (hasGenderChanged) flag in jsp to true and use the request type to send it to my Java code.

The following is the structure of the code. I get an error: Cannot find bean org.apache.struts.taglib.html.BEAN in any area in edit_Education.jsp. The following is the structure of the code. Any help would be greatly appreciated.

Introduction.jsp has all the header tabs and at the end When I click the save button on this page, I want to submit if the checkbox was changed while filling out the form. If changed, then you need to send true from the java component from the JSP.

In edit_Education.jsp:

<template: insert template='education/Introduction.jsp'>

    <logic:equal name="educationForm" property="selectedOption" value="0">
        <template:put name='content-area' content='education/background.jsp'/>
    </logic:equal>

    <logic:equal name="educationForm" property="selectedOption" value="1">
        <template:put name='content-area' content='education/eduqualification.jsp'/>
    </logic:equal>

    <logic:equal name="educationForm" property="selectedOption" value="2">
        <template:put name='content-area' content='education/workexperience.jsp'/>
    </logic:equal>
</template: insert

, , background.jsp

background.jsp

html ,

<script>
function validate(){

    document.educationForm.hasGenderChanged.value="true";
}
<html:form action="/processEducationAction" target="CONTENT-AREA">
<html: hidden property="hasGenderChanged"/>
<input type="hidden" name="hasGenderChanged" value="" scope="request"/>


</script>

<TR>
    <html:checkbox property="selectOptions.selectGender" onchange="validate()"/>
    <bean:message key="education.selectedOptions.label.selectGender"/>
<TR>
</html:form>

Form.java boolean hasGenderChanged; .

, , hasGenderChanged background.jsp edit_Education.jsp.

Struts. .

+4
1

,

   <template: insert template='education/Introduction.jsp'>

      <html:form>

        <logic:equal name="educationForm" property="selectedOption" value="0">
            <template:put name='content-area' content='education/background.jsp'/>
        </logic:equal>

        <logic:equal name="educationForm" property="selectedOption" value="1">
            <template:put name='content-area' content='education/eduqualification.jsp'/>
        </logic:equal>

        <logic:equal name="educationForm" property="selectedOption" value="2">
            <template:put name='content-area' content='education/workexperience.jsp'/>
        </logic:equal>

      </html:form>  

    </template: insert>

<html:form> </html:form>

+7

Source: https://habr.com/ru/post/1542790/


All Articles