You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Luis Gervaso <lu...@gmail.com> on 2009/03/24 08:35:19 UTC

Struts mapping

Hi

When we use "/*" to map the filter in Struts2 the framework ignores the
welcome-file-list in the web.xml

It tries to find an Action "" (empty string) in the default namespace "/"
but it does not exist

Is there any workaround on this?

regards

Luis

-- 
-------------------------------------------
Luis Alberto Gervaso Martin
Java EE Architect & Instructor
C/ Cuenca 4A, 2ºB
Getafe (Madrid)
SPAIN
mobile: (+34) 627983344
luis.gervaso@gmail.com

Re: Struts mapping

Posted by José Santos <sa...@gmail.com>.
i guess you mean "the web server/jsp container ignores the
welcome-file-list", as struts2 takes over everything with /*.

the workaround may be to either:
- if you're using actions without extension: change struts2 filter mapping
from /* to /actions/* and have actions under /actions
- if you're using actions with extensions: change struts2 filter mapping
from /* to *.action

with either of the above approaches, static content (HTML, CSS, JS, etc.) is
served directly by the web server/jsp container and not processed by Struts2
(it could even be moved out of the web server/jsp container, but that's
something else...). the exception to this is content under struts/* which is
struts specific and should be processed by struts2 (mapping between struts2
and struts/* is therefore needed).

santos.

On Tue, Mar 24, 2009 at 8:35 AM, Luis Gervaso <lu...@gmail.com>wrote:

> Hi
>
> When we use "/*" to map the filter in Struts2 the framework ignores the
> welcome-file-list in the web.xml
>
> It tries to find an Action "" (empty string) in the default namespace "/"
> but it does not exist
>
> Is there any workaround on this?
>
> regards
>
> Luis
>
> --
> -------------------------------------------
> Luis Alberto Gervaso Martin
> Java EE Architect & Instructor
> C/ Cuenca 4A, 2ºB
> Getafe (Madrid)
> SPAIN
> mobile: (+34) 627983344
> luis.gervaso@gmail.com
>