我觉得不多,那是被包含在一对<% %>里的,我在javabean中增加了一些方法,但已经重新编译并重启了tomcat,还是有错误。 报错: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 56 in the jsp file: /config.jsp The method getLocalport() is undefined for the type SipClientBean 53: </tr> 54: <tr> 55: <td>Local Port:</td> 56: <td><input type="text" name="localPort" value='<%= (client.getLocalport() != null) ? client.getLocalport():"5060"%>'></td> 57: </tr>
我觉得不多,那是被包含在一对 <% %>里的,我在javabean中增加了一些方法,但已经重新编译并重启了tomcat,还是有错误。 报错: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 56 in the jsp file: /config.jsp The method getLocalport() is undefined for the type SipClientBean 53: </tr> 54: <tr> 55: <td>Local Port: </td> 56: <td> <input type="text" name="localPort" value=' <%= (client.getLocalport() != null) ? client.getLocalport():"5060"%>'> </td> 57: </tr>
The method getLocalport() is undefined for the type SipClientBean,SipClientBean类中都没有定义getLocalport这个方法,你怎么能用...
引号不是多了一对
String v = (client.getLocalport()!=null)?client.getLocalport():"5060";
%>
<input type="text" name="localport" value="<%=v%>">
报错:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 56 in the jsp file: /config.jsp
The method getLocalport() is undefined for the type SipClientBean
53: </tr>
54: <tr>
55: <td>Local Port:</td>
56: <td><input type="text" name="localPort" value='<%= (client.getLocalport() != null) ? client.getLocalport():"5060"%>'></td>
57: </tr>
client.getLocalport() 是什么类型的? 如果上string的话 这句话没有错啊!
报错:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 56 in the jsp file: /config.jsp
The method getLocalport() is undefined for the type SipClientBean
53: </tr>
54: <tr>
55: <td>Local Port: </td>
56: <td> <input type="text" name="localPort" value=' <%= (client.getLocalport() != null) ? client.getLocalport():"5060"%>'> </td>
57: </tr>
<input type="text" name="localPort" value=' <%= (client.getLocalport() != 0) ? client.getLocalport():"5060"%>'>