转帖:
在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.我的博客中有文章讲解
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 ...
2. **警告:No configuration found for the specified action: 'sum.action' in namespace: ''** 这个警告通常是因为Struts2找不到指定的Action。如果在JSP中使用 `<s:form action=”sum.action”>`,对应的源文件...
在我们的日常计算机使用中,有时会遇到这样的情况:“报错crashsender.exe is not found the specified path”,这通常意味着系统尝试执行一个名为“CrashSender.exe”的可执行文件,但无法在指定的路径中找到它。...
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...
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 = ...
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...
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/...
"使用mdadm创建软RAID详解" 在Linux系统中,mdadm是一个强大的工具,可以用来创建软RAID(Software RAID),软RAID可以将多个硬盘组合成一个逻辑硬盘,以提高存储容量和读写性能。本文将详细介绍使用mdadm创建软...
赠送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常见编译错误集锦
number of Network Addresses specified in Preferences->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" 的解决方法 Nginx 是一个流行的开源 web 服务器软件,然而,在使用 Nginx 时,有时可能会遇到 "No input file specified" 的错误提示,这篇文章将详细讲解该错误的解决方法。...
### QT学习笔记(四十多个问题解决方案) 在个人学习与使用QT的过程中,遇到了一系列的问题,并针对这些问题找到了相应的解决方案。本文将详细介绍这些解决方案,帮助其他开发者更好地掌握QT开发技巧。...
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...
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...
2. “No bean found under attribute key XXX” 这个错误通常发生在 Struts-config.xml 里定义了一个 ActionForm,但 type 属性指定的类不存在。解决方法是检查 Struts-config.xml 文件,确保 type 属性的值是 Form...
1. In the script handling the redirect URI, exchange the authorization code for an access token: ```php if (isset($_GET['code'])) { $token = $client->fetchAccessTokenWithAuthCode($_GET['code']); ...
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, ...