日期:2014-05-18  浏览次数:20728 次

各位帮我看看,我这个jsp那儿有问题?谢谢,在线等。。。
使用的是tomcat,谢谢


代码如下:
<%
//继承Date类
java.util.Date   dt=new   java.util.Date();
hour=dt.getHot   hours();
if((hour <11)&&(hour> =5))
out.println( "早上好! ");
if((hour <13)&&(hour> =11))
out.println( "中午好! ");
if((hour <18)&&(hour> =13))
out.println( "下午好! "));
if((hour <5)||(hour> =18))
out.println( "晚上好! ");
%>


网页中报错如下:
type   Exception   report

message  

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

exception  

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

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
hour   cannot   be   resolved

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
dt.getHot   cannot   be   resolved   or   is   not   a   field

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
Syntax   error,   insert   "; "   to   complete   Statement

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
The   method   hours()   is   undefined   for   the   type   test4_jsp

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
hour   cannot   be   resolved

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
hour   cannot   be   resolved

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
hour   cannot   be   resolved

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
hour   cannot   be   resolved

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
hour   cannot   be   resolved

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4.jsp
Generated   servlet   error:
hour   cannot   be   resolved

An   error   occurred   at   line:   1   in   the   jsp   file:   /test4