0

我在与 Liferay 表格和行动阶段相处时遇到问题。我总是得到这个错误代码:

新错误:

00:01:21,547 错误 [http-bio-8080-exec-153][PortletServlet:116] javax.portlet.PortletException: java.lang.NoSuchMethodException: com.consist.weiterbildung.WBM_Portlet.ePfadAnmelden(javax.portlet.ActionRequest, javax.portlet.ActionResponse) javax.portlet.PortletException: java.lang.NoSuchMethodException: com.consist.weiterbildung.WBM_Portlet.ePfadAnmelden(javax.portlet.ActionRequest, javax.portlet.ActionResponse)

老错误:

2015 年 1 月 4 日晚上 9:07:26 org.apache.catalina.core.ApplicationDispatcher 调用 SCHWERWIEGEND:servlet jsp 的 Servlet.service() 抛出异常 org.apache.jasper.JasperException: /html/wbm/user/ePfadAnmelden.jsp (第 58 行,第 91 列)应为等号

ePfadAnmelden.jsp

<portlet:actionURL var="ePfadAnmelden" name="ePfadAnmelden">
    <portlet:param name="mvcPath" value="/html/wbm/user/ePfad.jsp" />
</portlet:actionURL>

<aui:form action="<%=ePfadAnmelden%>" method="post">

    <aui:input type="radio" name="kernsek" value="kern" checked="true"/>
    <aui:input type="radio" name="kernsek" value="sek"/>

    <aui:button type="sumbit" value="Anmelden"/>
</aui:form> 

WBM_Portlet.java

public void ePfadAnmelden(ActionRequest request,
    ActionResponse response) throws IOException, PortletException
    {
        PortletPreferences prefs = request.getPreferences();
        String kernsek = request.getParameter("kernsek");

        if(kernsek != null)
        {
            prefs.setValue("kernsek", kernsek);
            prefs.store();
        }

        String mvcPath = request.getParameter("mvcPath");

        response.setRenderParameter("mvcPath", mvcPath);
    }

我想在中填写表格,在方法中ePfadAnmelden做一些事情,然后在中显示一些值。ePfadAnmeldenWMB_Portlet.javaePfad.jsp

我怎样才能通过表单获得一个变量?

4

0 回答 0