【发布时间】:2016-05-03 06:42:54
【问题描述】:
我想打印函数返回的字符串值。
但我得到了错误,即使是这个简单的过程。
错误:
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 16 in the jsp file: /beansal.jsp
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
13: </head>
14: <body>
15: <%String s = new DBConnectionTest().Test();%>
16: <%=System.out.println(s)%>
17: <jsp:getProperty name="person" property="name"></jsp:getProperty>
18: <jsp:getProperty name="person" property="lastName"></jsp:getProperty>
19: </body>
【问题讨论】: