提交前需要更改JavaBean变量

提交前需要更改JavaBean变量,java,jsp,jstl,el,Java,Jsp,Jstl,El,我调用了一个java bean: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <jsp:useBean

我调用了一个java bean:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>

<jsp:useBean id="empower" class="com.sas.mis.empower.des.empower" scope="session">
    <jsp:setProperty name="myBean" property="*" />
    <jsp:setProperty name="myBean" property="acronym" value="ABS"/>
</jsp:useBean>

create table函数中是否有某种方法可以使用setAttribute之类的东西来设置bean中的首字母缩写词值,这样当用户从列表框中选择一个新的首字母缩写词时,它将使用正确的信息创建新表?

使用javascript/jquery并在浏览器中执行?@elliotfrisch Java服务器代码,包括EL和JSTL,在服务器上运行,而不是在客户端上运行。@LuiggiMendoza我知道。用户在哪里从列表框中选择新的首字母缩略词?“我在这里特别想到了AJAXy的东西。”浏览器客户端中的ElliottFrisch说。这才是真正的问题。声明OP仅使用在客户端上运行的javascript/jquery可能无法提供完整解决方案的指南。@LuiggiMendoza这是一个注释,不是答案。
List<String> getProAdministrators() {
    return project_admins.get(this.acronym);
}
function tableCreate(){
        var table = "<table>";
        var head = "<thead>";

        head += "<tr>";
        head += "<th>Administrators</th>";
        head += "<th>Developers</th>";
        head += "<th>Observers</th>";
        head += "<th>Users</th>";
        head += "</tr>";
        head += "</thead>";

        table += head;

        var body = "<tbody>";
        body += "<tr>";
        body += "<td>";

        // Administrators
        var cell = "";
        <c:forEach var="item" items="${myBean.projAdministrators}" varStatus="status" >
            if (cell == "") {
                cell = "${item}";
            } else {
                cell +=",${item}";
            }
        </c:forEach>
        body += cell;
        body += "</td>";

        // Developers
        body += "<td>";
        cell = "";
        <c:forEach var="item" items="${myBean.projDevelopers}" varStatus="status" >
        if (cell == "") {
            cell = "${item}";
        } else {
            cell +=",${item}";
        }
        </c:forEach>
        body += cell;
        body += "</td>";

        // Observers
        body += "<td>";
        cell = "";
        <c:forEach var="item" items="${myBean.projObservers}" varStatus="status" >
        if (cell == "") {
            cell = "${item}";
        } else {
            cell +=",${item}";
        }
        </c:forEach>
        body += cell;
        body += "</td>";

        // Users
        body += "<td>";
        cell = "";
        <c:forEach var="item" items="${myBean.projUsers}" varStatus="status" >
        if (cell == "") {
            cell = "${item}";
        } else {
            cell +=",${item}";
        }
        </c:forEach>
        body += cell;
        body += "</td>";
        body += "</tr>";
        body += "</tbody>";
        table += body;
        table += "</table>";
        domTarget("DOMTarget2",table);
}