There is no Action mapped for namespace [/] and action name [form] associated with context path [/pr

今天小编在写struts2框架时,在访问动作类时,总是抛出这个异常There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj]。然后就找啊找,从jsp找到struts.xml到Action类,都没有问题,还是抛出这个问题.

最终在tomcat里面发现java文件没有编译成class文件,然后就百度怎么解决,

上面说,Build Automatically 打勾,然而并没有解决,最后选择重启MyEclipse,最后部署解决了

总结:如果抛出There is no Action mapped for namespace [/] and action name [form] associated with context path [/proj]异常。

第一:查看这些情况是否出现了问题(这是我查看官方文档找到的,虽然是英文,但还是很好懂的)

其次:再直接去tomcat里面找是不是部署上了,有没有对应的class的文件

暑假要结束了- -,马上大三了

猜你喜欢

转载自blog.csdn.net/qq_39665334/article/details/82353165