No mistake. AFAIK that's a design flaw of the default action mapper. See: http://www.planetstruts.org/struts2-blank/example/somecrap/HelloWorld.action

If there's no match in a package namespace it falls back to the default package and matches a little to generously.

You may be able to avoid it by creating a package with an empty namespace containing no actions. Not sure about that one...

Tauri Valor wrote:
Hi

I have the following problem with url in my web application:

I run my app using Struts2 and Tomcat6.

Context name of webapp: MY_WEB

Namespace in my package tag of struts-config.xml:

package name="register" namespace="/register" extends="tiles-default"


Mapping of Action class in my struts-config.xml :

action name= acc.register.RegistrationForm


A Href link in my jsp page:


a href="register/acc.register.RegistrationForm.do"


Now, the following url works fine when I launch my app:

http://localhost:8080/MY_WEB/register/acc.register.RegistrationForm.do


But the problem is the url when added something between my
packagename(register)and my uri (acc.register.RegistrationForm.do) like
following:

http://localhost:8080/MY_WEB/register/somecrap/acc.register.RegistrationForm.do

it still works fine instead of displaying the error page. I need to get an
error page if I give wrong url like the above.

What is my mistake ?

Pls advise.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to