`
smartan
  • 浏览: 183565 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

警告: No configuration found for the specified action: 'hello' in namespace: ''. F

    博客分类:
  • SSH
阅读更多

转帖:

在s:form里加上你的namespace即可. 
如 
<s:form namespace="/你的namespace" action="module"> ... </s:form>

struts.xml 
<package name="struts2" namespace="/page" extends="struts-default"> 

<action name="hello" class="com.str2.web.action.LoginAction"> 
<result name="re">/WEB-INF/page/test.jsp</result> 
<result name="log">/login.jsp</result> 
<result name="ok">/content.jsp</result> 
</action> 

</package> 


login.jsp 

  <s:form action="/page/hello"> 
  <s:textfield name="username" label="username"></s:textfield> 
  <s:password name="password" label="password"></s:password> 
  <s:submit/> 
  <s:reset/> 
  </s:form> 

 

打开login.jsp的时候,控制台老是输出,但是不影响使用: 

警告: No configuration found for the specified action: 'hello' in namespace: ''. Form action defaulting to 'action' attribute's literal value. 
2008-9-6 11:35:47 org.apache.struts2.components.Form evaluateExtraParamsServletRequest 
警告: No configuration found for the specified action: 'hello' in namespace: ''. Form action defaulting to 'action' attribute's literal value. 
 
后将 login.jsp 

  <s:form action="/page/hello"> 

改为 
  <s:form action="hello" namespace="/page"> 

问题解决! 
分享到:
评论

相关推荐

    关于IllegalStateException: The specified child already has a parent.

    IllegalStateException: The specified child already has a parent.我的博客中有文章讲解

    EurekaLog_7.5.0.0_Enterprise

    1)....Fixed: Added workaround for codegen bug in Delphi 7 (possibly - other), bug manifests itself as wrong date-time in reports or integer overflows 2)....Fixed: Some MAPI DLLs may not be loaded ...

    struts2开发遇到的问题

    2. **警告:No configuration found for the specified action: 'sum.action' in namespace: ''** 这个警告通常是因为Struts2找不到指定的Action。如果在JSP中使用 `&lt;s:form action=”sum.action”&gt;`,对应的源文件...

    CrashSenderexe.zip

    在我们的日常计算机使用中,有时会遇到这样的情况:“报错crashsender.exe is not found the specified path”,这通常意味着系统尝试执行一个名为“CrashSender.exe”的可执行文件,但无法在指定的路径中找到它。...

    ASP.NET The system cannot find the file specified解决办法

    ASP.NET The system cannot find the file specified解决办法 Server Error in ‘/’ Application. The system cannot find the file specified Description: An unhandled exception occurred during the execution...

    JAVA连接各种数据库

    Class.forName("oracle.jdbc.driver.OracleDriver"); String url = "jdbc:oracle:thin:@localhost:1521:orcl"; // orcl 为 Oracle 的 SID String user = "test"; String password = "test"; Connection conn = ...

    MyBase Desktop 6.0.2 破解正式版(官方更新至10/10/2011)

    8.Added: the 'Organize' menu onto the main menu, as many users can't find the 'Sort child items' utility, which is also located in the 'Outline' action menu. 9.Added: Alt-Drag to create symbolic links...

    解决SpringDataJPA报错:org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null w

    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/...

    使用mdadm创建软RAID

    "使用mdadm创建软RAID详解" 在Linux系统中,mdadm是一个强大的工具,可以用来创建软RAID(Software RAID),软RAID可以将多个硬盘组合成一个逻辑硬盘,以提高存储容量和读写性能。本文将详细介绍使用mdadm创建软...

    grpc-api-1.24.0-API文档-中英对照版.zip

    赠送jar包:grpc-api-1.24.0.jar; 赠送原API文档:grpc-api-1.24.0-javadoc.jar; 赠送源代码:grpc-api-1.24.0-sources.jar; 赠送Maven依赖信息文件:grpc-api-1.24.0.pom; 包含翻译后的API文档:grpc-api-...

    报错 代码 经验

    : No configuration found for the specified action: 'fileUpLoad.action' in namespace: '/manager'. Form action defaulting to 'action' attribute's literal value. ``` **知识点解释:** 1. **问题描述:** ...

    vs常见编译错误集锦

    vs常见编译错误集锦 vs常见编译错误集锦 vs常见编译错误集锦

    BURNINTEST--硬件检测工具

    number of Network Addresses specified in Preferences-&gt;Network will be the number of NICs tested. This will error faulty NICs that are not detected by the BurnInTest auto NIC detection mechanism. ...

    nginx提示No input file specified怎么办.docx

    Nginx 提示 "No input file specified" 的解决方法 Nginx 是一个流行的开源 web 服务器软件,然而,在使用 Nginx 时,有时可能会遇到 "No input file specified" 的错误提示,这篇文章将详细讲解该错误的解决方法。...

    QT学习笔记(四十多个问题解决方案)

    ### QT学习笔记(四十多个问题解决方案) 在个人学习与使用QT的过程中,遇到了一系列的问题,并针对这些问题找到了相应的解决方案。本文将详细介绍这些解决方案,帮助其他开发者更好地掌握QT开发技巧。...

    java.sql.SQLException: 内部错误: Unable to construct a Datum from the specified input

    Q: I am working with Oracle database 8.1.7 and I have written a JAVA code to update the table which contains one BLOB field . I am using updateBinaryStream method of resultset to update the BLOB field...

    apktool documentation

    For the most part any apk in /system/framework on a device will be a framework file. On some devices they might reside in /data/system-framework and even cleverly hidden in /system/app or /system/priv...

    SSH错误集锦

    2. “No bean found under attribute key XXX” 这个错误通常发生在 Struts-config.xml 里定义了一个 ActionForm,但 type 属性指定的类不存在。解决方法是检查 Struts-config.xml 文件,确保 type 属性的值是 Form...

    google api php client

    1. In the script handling the redirect URI, exchange the authorization code for an access token: ```php if (isset($_GET['code'])) { $token = $client-&gt;fetchAccessTokenWithAuthCode($_GET['code']); ...

    Java邮件开发Fundamentals of the JavaMail API

    There is nothing in the JavaMail API for tasks like configuring a server to relay messages or to add and remove e-mail accounts. POP POP stands for Post Office Protocol. Currently in version 3, ...

Global site tag (gtag.js) - Google Analytics