rt
 我是想在小脚本里判断表达式里的值,如果相等的话就让取出来title里的值变为红色,代码下,
 <%
   NewsTitleDao ntd=new NewsTitleDaoImpl();
   List li=ntd.selectNewsAll(1);
   for(int i=0;i<li.size();i++){
    NewsTitle nt=(NewsTitle)li.get(i);
  %>
   
   <%if("title".equals(%><%=nt.getTitle() %><%)){%>
        <font color="red">
           <%=nt.getTitle() %>
        </font>
      <%}else{ %>
        <%=nt.getTitle() %>
      <%} %><br>
  <%}%>但是会报错
org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 22 in the jsp file: /test.jsp
The method equals(Object) in the type String is not applicable for the arguments (void)
19:     NewsTitle nt=(NewsTitle)li.get(i);
20:   %>
21:    
22:    <%if("title".equals(%><%=nt.getTitle() %><%)){%>
23:         <font color="red">
24:            <%=nt.getTitle() %>
25:         </font>
求助啊~~