错误:Wrong method was defined as an action method 的解决方法

我的错误页面:
在这里插入图片描述

网上罗列一下解决方法总集
1 - 将private 方法改为public 方法,我的login1方法就是 public

 public String login1(HttpServletResponse reponse,HttpServletRequest request) throws Exception

2 - 该方法不能有参数,去掉参数
action配置的方法是struts帮你调用的,不能有参数,参数通过其他方式传递

public String login1() throws Exception{
发布了7 篇原创文章 · 获赞 7 · 访问量 88

猜你喜欢

转载自blog.csdn.net/zxx123123121/article/details/104340851