Topic: 我的JSP怎么不行啊!!!!

  Print this page

1.我的JSP怎么不行啊!!!! Copy to clipboard
Posted by: llxx22
Posted on: 2004-11-12 23:05

我初学JSP
写了个很简单的JSP的例子,但就是运行不起
<%@ page contentType="text/html; charset=GB2312" import="java.util.*"%>
<%!
  String tim = "本地时间";
%>
<html>
<head>
  <title>Time</title>
</head>
<body>
  <%
    out.println("<b><font size = 5 color = blue>"+tim+"</font><br><br>");
    out.println("<font size = 4 color = red> " + new Date()+"</font></b>");
  %>
</body>
</html>
我用的Web 引擎是Resin-3.0.9版本。
我实验的地址是:http://localhost:8080/resin-doc/example/ch17/tim1.jsp
结果是错误显示。我没搞懂哪里错了。 请大家指教!!!!!!!!

2.Re:我的JSP怎么不行啊!!!! [Re: llxx22] Copy to clipboard
Posted by: why
Posted on: 2004-11-13 23:37

>> 结果是错误显示
what did you mean?

Could you please show us the error message?
Is your Resin running properly?

3.Re:我的JSP怎么不行啊!!!! [Re: llxx22] Copy to clipboard
Posted by: furenqiang
Posted on: 2004-11-16 19:58

你把.jsp文件放在D:\Tomcat 5.0\webapps\ROOT。就可以了。

4.Re:我的JSP怎么不行啊!!!! [Re: llxx22] Copy to clipboard
Posted by: yclc
Posted on: 2004-11-18 03:33

是的
把异常报出来.......

5.Re:我的JSP怎么不行啊!!!! [Re: llxx22] Copy to clipboard
Posted by: china2004
Posted on: 2004-11-27 22:30

将new Date() 改成 (new Date()).toLocaleString()就可以了


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923