转帖:
在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"> 问题解决!
分享到:
相关推荐
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 ...
在初始化Vue项目的的时候发现警告 yarn install 查了下发现是,package.json 文件中缺少license参数 { name: movie_view, version: 0.1.0, license: MIT, private: true, scripts: { serve: vue-cli-...
This is the default action if dest does not exist, or if no filesystem is on it -keep-as-directory If one source directory is specified, create a root directory containing that directory, ...
报错crashsender.exe is not found the specified path
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...
赠送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-...
vs常见编译错误集锦 vs常见编译错误集锦 vs常见编译错误集锦
使用mdadm创建软RAID的具体操作步骤
1、qiniu-java-sdk:7.2版本所有版本jar包和6.1.71、6.1.9两个版本jar包。 2、happy-dns-java:0.1.1至0.1.6各版本jar包。
IllegalStateException: The specified child already has a parent.我的博客中有文章讲解
JAVA连接各种数据库的方法和代码,非常适合JAVA的初学者,可能也适合忘记连接代码的工作人员!
The PXF JDBC Connector now supports pushdown of OR and NOT logical filter operators when specified in a JDBC named query or in an external table query filter condition. PXF supports writing Avro-...
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...
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']); ...
nginx提示No input file specified怎么办.docx
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, ...
it is found in the word list file) is a possible correction. Your solution to this assessment should consider the following variations of a misspelled word. • Transposing of adjacent letters For ...
Optimized the Load ASL operator in the case where the source operand is an operation region. Simply map the operation region memory, instead of performing a bytewise read. (Region must be of type ...
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. ...
- ADD Added editing form for TBackgroundOptionsProp property in the FlexEdit/FlexEditSE projects. Version 1.6 ----------- - ADD Import/Export modules support (new unit FlexFileFormats) - FIX HPen ...