Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

"No configuration found for the specified action"

 
Karl Krasnowsky
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When running my struts 2 application I'm getting a warning (under both JBoss an GF as's)
No configuration found for the specified action: 'login.action' in namespace: ''. Form action defaulting to 'action' attribute's literal value.


Everything renders fine, I just get this warning and would like to get rid of it...

My package definition is this:


and the jsp reference is like this:


As noted, the application runs fine, but is spitting out this warning message that seems too serious sounding to simply ignore.
Any help on this? I've attempted to rename the action in the jsp to simply "login" and adding a "namespace" specifier in the form definition to "/", but neither has had any effect.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you accessing the JSP the first time?
 
Sabhi Singh
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
change your form tag as <s:form action="login.action" method="post" namespace="/">
 
Tomasz Sobal
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<s:form action="login" method="post">
<s:textfield name="username" key="label.username" size="20" />
<s:password name="password" key="label.password" size="20" />
<sx:submit method="execute" key="label.login" align="center" />
</s:form>


Just change it like that, warning should dissapear. Your action in config is named "login" not "login.action"
 
Youdhveer Panwar
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To remove this warning you need to change following...


See your struts.xml file what name you have specified...

If you are using namespace / and your action name is 'Login' then replace Login.action to Login as given below...

<s:form action="Login.action" method="post" >

Use below with namespace

1) <s:form action="Login" method="post" namespace="/">

Or

2) <s:form action="/Login" method="post" >

Now you will not get this warning.

For more details
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic