谁知道这段JSP代码错误怎么看?

来源:百度知道 编辑:UC知道 时间:2024/05/01 05:34:57
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 28 in the jsp file: /AddSecondTitle.jsp
The method getId() is undefined for the type FirstLevelTitle
25: FirstLevelTitle ftitle=(FirstLevelTitle)firstTitle.get(i);
26:
27: %>
28: <option value="<%=ftitle.getId() %>"><%=ftitle.getTitle() %></option>
29:
30: <%
31: }

Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Co

The method getId() is undefined for the type FirstLevelTitle
28: <option value="<%=ftitle.getId() %>"><%=ftitle.getTitle() %></option>
第28行中getId()没有定义。
看一下你的FirstLevelTitle中有没有getId()或是否设置为public

getId()方法没有定义 ,你是没引入类啊还是根本没定义啊还是ftitle写错了 等等