2017-12-30 20:27 GMT+01:00 José Antonio Delgado Trujillo <jadt...@gmail.com>:
>> Probably because a browser is requesting "/" to check something and as there 
>> is no action named "" you see the error.
>
> ??

You have in logs that there is no action mapped to "" - which means
something (a browser because Struts doesn't request itself) has tried
access the "/" - and as there is no mapping in struts.xml to handle
action named "", you see the error.

> That is the info that appears in the tutorial
> ...
> 2017-04-17 11:16:01,084 DEBUG [qtp1723848804-22] xwork2.DefaultActionProxy 
> (DefaultActionProxy.java:89) - Creating an DefaultActionProxy for namespace 
> [/] and action name [index]

Yes, but when you opened a "/index.action"

>> Aso please be aware that only with the Convention plugin you will get 
>> automatic "index" action handling [2]
>>
>> [1] 
>> https://github.com/apache/struts/blob/master/core/src/main/resources/struts-default.xml#L391
>>  
>> <https://github.com/apache/struts/blob/master/core/src/main/resources/struts-default.xml#L391>
>> [2] https://struts.apache.org/plugins/convention/#introduction 
>> <https://struts.apache.org/plugins/convention/#introduction>
>>
> You don’t use the plugin convention in this example
>
> I don’t understand

There is a common pattern to display index.html in case when user
requested a root path "/", in Apache HTTPD you use the
"DirectoryIndex" directive [1]. The same behaviour you can have when
using the Convention plugin, having a class IndexAction.class, it will
be automatically used when user requested the root path "/".

[1] https://httpd.apache.org/docs/2.0/mod/mod_dir.html


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to