Thanks Jeromy!

Ive tried creating a package with empty name space ie :

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

then the following url :

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

without the namespace works fine ..

But any other way to keep my namespace in tact in the url because the above
may not be acceptable?

Thanks,
Tauri




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









Jeromy Evans - Blue Sky Minds wrote:
> 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts2-URL-problem-tp16020941p16021626.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to