日魂月魄

导航

spring跳转index

设置apache-tomca\conf\web.xml(开发后在文件最后,将默认启动的index.修改main)

<welcome-file-list>
  <welcome-file>main.html</welcome-file>
  <welcome-file>main.htm</welcome-file>
  <welcome-file>main.jsp</welcome-file>
  </welcome-file-list>
 
webcontent:创建main.jsp
 
 
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   
 <%@ page contentType="text/html;charset=utf-8"%>
  
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!-- 这里的url才是真正的主页,利用main.jsp调转过去 -->   
<c:redirect url="/"> 
</c:redirect>
 
<!DOCTYPE>
<html xmlns=http://www.w3.org/1999/xhtml>
<head>
 
</head>
  <body >
<div > 
 
</div>

  
</body>

</html>

 
 

control创建 indexcontrol.java 路径=
url="/"




,锅柄,我们拿东西都要拿着柄(这句好像...文件编号窗口编号太容易理解了一个古怪的词汇,句柄,不知道吓退了多少学...

posted on 2017-05-15 17:30  L-H  阅读(385)  评论(0)    收藏  举报