|
Java学习者论坛
最近接触了java..然后在本论坛看到tomcat精华贴里的试了一下..机房an了个my eclipse 6.0 里面有tomcat..然后wo就照帖子里的做了..但是没有成功..不知道问题出在哪里..操作如下:
在services.xml里配制这yang写的
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xfire.codehaus.org/config/1.0">
<Context path="/myJSP" docBase="c:\myJSP" debug="0"
reloadable="true" crossContext="true">
</Context>
</beans>
index.jsp是这样写的
<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"request.getServerName()":"+request.getServerPort()+path+"/";
%>
<%@page language="java"%>
<%@page import="java.util.Date"%>
<HTML>
<HEAD>
<TITLE>AUTO REFRESH</TITLE>
<%response.setHeader("refresh","5");%>
</HEAD>
<BODY bgcolor=#cc99dd>
<center>
auto refresh example
</center>
<center>refresh time : 5 sencords</center>
<CENTER>Now Time is: <%=new Date()%></CENTER>
</BODY>
</HTML>
然后启动my eclipse里zi带的tomcat我输入http://localhost:8080/myJSP/refresh.jsp出错了。是怎么回事呀..我第一次接触这個..请各位前辈指点一下..还有就是今后我要怎么学cai能更hao更kuai的xiao化那些知识呢..谢谢了哦
欢迎来到Java学习者論壇,转載请注明地址:http://www.javaxxz.com. |
|