警告:找不到指定操作的配置:

编程入门 行业动态 更新时间:2024-10-16 20:27:40
本文介绍了警告:找不到指定操作的配置:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我得到以下异常,请帮助解决此问题。

I am getting following exception, please help to solve this issue.

Jul 16, 2013 11:18:40 AM org.apache.struts2ponents.Form evaluateExtraParamsServletRequest WARNING: No configuration found for the specified action: `'HelloWorld1'` in namespace: `''`. Form action defaulting to 'action' attribute's literal value.

index.jsp :

index.jsp:

<s:form action="HelloWorld1" namespace="/" method="post" > <s:textfield name="userName" label="User Name" /> <s:submit /> </s:form>

struts.xml :

struts.xml:

<package name="default" namespace="/" extends="struts-default" > <action name="HelloWorld1" class="java.vaannila.HelloWorld"> <result name="SUCCESS">/success.jsp</result> </action> </package>

HelloWorld .java :

HelloWorld .java:

public class HelloWorld extends ActionSupport{ //execute method }

推荐答案

错误表明 Struts 2 无法加载您的XML配置。确保 struts.xml 位于 WEB-INF / classes 目录中。 (配置的其余部分看起来很好。)

The error suggests that Struts 2 couldn't load your XML configuration. Make sure your struts.xml is inside WEB-INF/classes directory. (The rest of the configuration looks fine.)

更多推荐

警告:找不到指定操作的配置:

本文发布于:2023-07-04 17:15:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1026958.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   操作

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!