We have this working in jboss using the DynamicMappingFilter. See
http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/controller/DynamicMappingFilter.html
Web.xml:
<filter>
<display-name>Stripes Filter</display-name>
<filter-name>StripesFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
<init-param>............
</filter>
<filter-mapping>
<filter-name>StripesFilter</filter-name>
<servlet-name>StripesDispatcher</servlet-name>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<filter>
<filter-name>DynamicMappingFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.DynamicMappingFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>DynamicMappingFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
@UrlBinding("/")
public class Home implements ActionBean {
@DefaultHandler
public Resolution gotoIndexPage() {
return new ForwardResolution("/WEB-INF/home/"); // index.jsp is
in welcome file list
}
}
If you don't want to use DynamicMappingFilter, I made a while ago about how to
do the same thing before the filter was created, see
http://www.nabble.com/Binding-an-ActionBean-to-%22-%22---to9574712.html for
another approach.
Hope that helps
-John
-----Original Message-----
From: Grzegorz Krugły [mailto:[email protected]]
Sent: Thursday, September 10, 2009 2:48 PM
To: [email protected]
Subject: [Stripes-users] Trying to do UrlBinding("/")... somehow :-)
Hi,
I have an action which binds to /home like this:
@UrlBinding("/home")
public class HomePageAction extends BaseAction {
and I'm trying to use something like this in web.xml:
<welcome-file-list>
<welcome-file>home</welcome-file>
</welcome-file-list>
to make my http://domain.tld/ display my home page without redirecting
to http://domain.tld/home first (which is bad for SEO reasons). I'm
using Glassfish 2.1 and it doesn't work unless I create a file called
home :-(
Is there a way to use a Stripe Action as a welcome-file? Or is there a
way to do @UrlBinding("/")?
Two solutions I'd like NOT to use are:
* using Apache front with mod_proxy and mod_rewrite
* creating index.jsp that redirects to /home
Best regards,
Grzegorz
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users