关于myeclipse自动生成的index.jsp问题

创建一个web项目的时候总是自动生成index.jsp,怎么让它不会自动生成?
还有我把index.jsp删除后再运行项目中其他的jsp文件就出现404的错误,请问怎么解决?
谢谢了

myeclipse自动生成的index.jsp问题:

配置:

<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
??? <base href="<%=basePath%>">??? <title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">??? 
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head><body>
 This is my JSP page. <br>
</body>
</html>

温馨提示:答案为网友推荐,仅供参考
第1个回答  2012-11-16
在web项目中WebRoot->WEB-INF中web.xml文件
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
将login.jsp改为你想要显示的jsp页,就不会报404错误了本回答被提问者和网友采纳
第2个回答  2012-11-16
这个index.jsp默认为你这个项目的首页,在web.xml里有配置,如果你不需要这个jsp直接删除就行了,记得修改web.xml;
出现404错误你就看看哪个jsp访问不到了,再找问题原因,跟自动生成的index.jsp是没有关系的

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网