You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Igor Vlasov <vi...@mail.ru> on 2008/07/18 13:54:16 UTC
Why we need struts.action.extension property
Hello. I wrote a simple s2 application.
I described a filter in web.xml
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.jspa</url-pattern>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
but i forgot a struts.properties file and "struts.action.extension=jspa"
AND my project does not WORK
My question: why we need to write "struts.action.extension=jspa" when we
already have filter-mapping binding struts2->*.jspa
--
View this message in context: http://www.nabble.com/Why-we-need-struts.action.extension-property-tp18527639p18527639.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Why we need struts.action.extension property
Posted by Gabriel Belingueres <be...@gmail.com>.
AFAIK, the Servlet API doesn't expose any standard way to know the
mapping associated to a filter. Maybe that's way.
2008/7/18 Igor Vlasov <vi...@mail.ru>:
>
> Hello. I wrote a simple s2 application.
>
> I described a filter in web.xml
>
> <filter>
> <filter-name>struts2</filter-name>
>
> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
> </filter>
>
> <filter-mapping>
> <filter-name>struts2</filter-name>
> <url-pattern>*.jspa</url-pattern>
> <dispatcher>FORWARD</dispatcher>
> <dispatcher>REQUEST</dispatcher>
> </filter-mapping>
>
> but i forgot a struts.properties file and "struts.action.extension=jspa"
>
> AND my project does not WORK
>
>
> My question: why we need to write "struts.action.extension=jspa" when we
> already have filter-mapping binding struts2->*.jspa
> --
> View this message in context: http://www.nabble.com/Why-we-need-struts.action.extension-property-tp18527639p18527639.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Why we need struts.action.extension property
Posted by Dave Newton <ne...@yahoo.com>.
--- On Fri, 7/18/08, Igor Vlasov <vi...@mail.ru> wrote:
> but i forgot a struts.properties file and
> "struts.action.extension=jspa"
>
> AND my project does not WORK
>
>
> My question: why we need to write
> "struts.action.extension=jspa" when we
> already have filter-mapping binding struts2->*.jspa
So Struts 2 itself knows what extension is being used for actions.
Note that mapping the S2 filter to something other than "/*" will break a few things unless we work around it. I added a note to the web.xml documenation [1], but basically unless we do something to get the static content served (extracting the files, etc.) things will break.
Dave
[1] web.xml coniguration documentation (new note won't show up right away)
http://struts.apache.org/2.x/docs/webxml.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org