程序请教
请问各位高手,在j2sdk 和tomcat 配置下运行下面程序时出现错误,请问这是什么原因
程序为<html> <head><title>第一个jsp文件</title></head> <body background="image/i.jpg"><font color="blue"> <center> <%out.println("hi,first jsp");%> <br> the time is <%=new date().tostring()%> </center> </body> </html> 是否是环境配置上的错误,请各位高手指教,谢谢
----------------解决方案--------------------------------------------------------
是语法错误~
<%page import="java.util.*;"%>
the time is <%=new Date().tostring()%>
----------------解决方案--------------------------------------------------------
好像也不对呀!
----------------解决方案--------------------------------------------------------
把分号去掉
----------------解决方案--------------------------------------------------------
好像以上的都不行哦!试了下,指Date上不错。。。。?????
还有,各位大侠,tostring在这是转换成字符串的意思吗?在这大小写有没有错????
----------------解决方案--------------------------------------------------------
是toString()
----------------解决方案--------------------------------------------------------
是你的D没有大写:
the time is <%=new date().tostring()%>应改为
the time is <%=new Date().tostring()%>
----------------解决方案--------------------------------------------------------