You're probably right because when I've written a global interceptor, it 
never got called for / URL. The real question is now, how do I make 
Glassfish stop doing that. My web.xml is as follows. It would seem that 
<url-pattern>/*</url-pattern> doesn't catch / in Glassfish.


<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
         version="2.4">
    <filter>
        <display-name>Stripes Filter</display-name>
        <filter-name>StripesFilter</filter-name>
        
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
        <init-param>
            <param-name>ActionResolver.Packages</param-name>
            <param-value>pl.krop.nawigacja.web.action</param-value>
        </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.html</welcome-file>
    </welcome-file-list>
</web-app>


Newman, John W pisze:
> Hmm it should just work then.  I don't think it's due to war/ear as I've 
> successfully deployed both using the same technique.  So I think maybe it's a 
> glassfish setting since you're getting a dir listing. ?  If whatever you've 
> requested is in the web app's context, you should get to the page or a 404 if 
> the app isn't directing to anything for /.  To me a dir listing means that 
> request is outside of any web app.
>
>
> -----Original Message-----
> From: Grzegorz Krugły [mailto:[email protected]] 
> Sent: Thursday, September 10, 2009 3:48 PM
> To: Stripes Users List
> Subject: Re: [Stripes-users] Trying to do UrlBinding("/")... somehow :-)
>
> Newman, John W pisze:
>   
>> We have this working in jboss using the DynamicMappingFilter. See 
>> http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/controller/DynamicMappingFilter.html
>>   
>>     
>
>
> I'm already using DynamicMappingFilter. My web.xml is virtually the same 
> as You've mentioned.
>
> If I bind to /home and go to http://mydomain.tld/home - it works. If I 
> bind to / and go to http://mydomain.tld/ - all I get is a directory 
> listing from Glassfish.
>
> Should following action just work at / URL? Could it be the problem with 
> Glassfish or maybe I should put something to application.xml (I deploy 
> inside an EAR)? I already deploy my webapp to /
>
> @UrlBinding("/")
> public class HomePageAction extends BaseAction {
>     private static final String INDEX = "/WEB-INF/jsp/home/index.jsp";
>
>     @DefaultHandler
>     public Resolution index() {
>         return new ForwardResolution(INDEX);
>     }
> }
>
> Thanks,
> 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
>
>   


------------------------------------------------------------------------------
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

Reply via email to