在你的http://localhost对应的目录下放一个index.jsp
内容为
<%
response.sendRedirect("mytest/index.jsp");
%>
或者
<script language="javascript">
window.location="mytest/index.jsp";
</script>
或者
<meta refresh="0" url="mytest/index.jsp">
内容为
<%
response.sendRedirect("mytest/index.jsp");
%>
或者
<script language="javascript">
window.location="mytest/index.jsp";
</script>
或者
<meta refresh="0" url="mytest/index.jsp">
解决方案 »
- var oXmlHttp = zXmlHttp.createRequest(); 出现“错误:'zXmlHttp' 未定义”是什么原因啊?
- javaScript 两页之间传递对象?
- IE下JS检测文件大小
- 我是做javaWEB开发的,请问一下页面的跳转问题
- 求助:删除table最后一行表单提交错误
- 五十分在线紧急求救一个jsp调用servlet的问题
- javascript的一个问题
- 请问:可否利用IIS的一个插件来实现asp和jsp共用同一个端口?
- 怪事,求救,给分,一定
- 在线等待!关于null id generated for:class 的错误
- (50分)Eclipse的使用手册之类的东西能否MAIL一份给我了,谢谢,收到就给分!!!
- 这问题我问了好多次啦!!!谁会解决啊!!!
tomcat_home/conf/server.xml文件中<Context path="" docBase="mytest/"
debug="0" privileged="true">就可以了。
webapp
|_ROOT
|_mytest能给出具体的代码吗,我急用啊,加分都行啊
好象是不行哟,还是默认的ROOT下的index.jsp
我也试了!
tomcat_home/conf/server.xml文件中<Context path="" docBase="mytest"
debug="0" privileged="true">還有web.xml
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>
就可以了。
真的那样,不行啊,还是默认的那个ROOT/index.jsp我试了很多次了!
你修改完server.xml后必须重启才生效的
谢谢, 说的对,我已经做成功了,
谢谢楼上各位的帮忙了<Context path="" docBase="mytest/"
debug="0" privileged="true"/> 不要忘了反斜杠
删除<Context path="" docBase="ROOT"
debug="0"/>
path定义的是http访问的路径,为空,表示根目录。docBase定义与该路经相关的文件系统路径,可以是相对路径