新人小白问下webxml要怎么配置才能访问到页面

aifanx 2017-11-26 05:25:48
我的控制器
package com.ccc.shiyan;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/text")
public class ceshio {

@RequestMapping(params="method=view")
public String view(HttpServletRequest request,HttpServletResponse response) throws Exception{
System.out.println("1");
return "index";

}

}
我的页面访问 http://127.0.0.1:8080/shiyan/text?method=view
出现以下问题
HTTP Status 404 - /shiyan/text

type Status report

message /shiyan/text

description The requested resource is not available.
Apache Tomcat/7.0.82
...全文
220 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

2,099

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 非技术区
社区管理员
  • 非技术区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧