我在java文件中有字符串类型方法,它包含字符串数组,当我尝试调用jsp时,它给了我一个错误。
public String[] ordering(ActionRequest actionRequest,ActionResponse actionResponse)
throws IOException,PortletException
JSP:
<%
TestiPortlet obj=new TestiPortlet();
String str[]=obj.ordering(actionRequest,actionResponse);
out.println(str[0]);
%>
错误:
Multiple annotations found at this line:- actionResponse cannot be resolved to a variabl-actionRequest cannot be resolved to a variable
Stacktrace:
javax.portlet.PortletException: org.apache.jasper.JasperException: An exception occurred processing JSP page /html/testi/list.jsp at line 8
5:
6: <%
7: TestiPortlet obj=new TestiPortlet();
8: String str[]=obj.ordering(actionRequest,actionResponse);
9: out.println(str[0]);
10: %>
11: