File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes namespace doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "namespace doubt" Watch "namespace doubt" New topic
Author

namespace doubt

Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
Hello!

I'm studying a Struts example and it has an action HelloWorld inside the namespace /chapterTwo
It uses <s:form action="HelloWorld"> to invoke this action.

I'm constructing a Struts app and I have an action Register inside the namespace /register
If I use <s:form action="Register"> I get: WARNING: No configuration found for the specified action: 'Register' in namespace: '/'.
But if I use <s:form namespace="/register" action="Register">, it works.

I tried to figure out what is different from the HelloWorld example, but I couldn't.
What I need to do to make it work with only <s:form action="Register">?

Thank you!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Without the configuration you're using it's impossible to answer this question.

If the form submission target (action) is in the same namespace as the form display page (action) you don't need the "namespace" attribute. If you're submitting to an action that's in a different namespace, you need it.
Leandro Coutinho
Ranch Hand

Joined: Mar 04, 2009
Posts: 417
David Newton wrote:Without the configuration you're using it's impossible to answer this question.

If the form submission target (action) is in the same namespace as the form display page (action) you don't need the "namespace" attribute. If you're submitting to an action that's in a different namespace, you need it.

That is it! Thanks a lot David! :thumbup:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: namespace doubt
 
Similar Threads
Struts in action example
Struts2: how to align &lt;s:submit /&gt; and &lt;s:reset /&gt; within the same row?
Form Data not being populated in Struts 2
Struts2 namespace url problem
autocompleter tag...not working out. Please help S2