weblogic: change from *.m to *.mav w/o changing code

"Yurii Urazlin" <[email protected]>
Newsgroups gmane.comp.web.maverick.general
Message-ID <[email protected]>
Greetings,

I've got a problem with deployment of mav based apps on wls. The reason is that wls doesn't understand servlet mapping 
 
    <servlet-mapping> 
        <servlet-name>dispatcher</servlet-name> 
        <url-pattern>*.m</url-pattern> 
    </servlet-mapping>

and wants to see longer extensions such as

    <servlet-mapping> 
        <servlet-name>dispatcher</servlet-name> 
        <url-pattern>*.mav</url-pattern> 
    </servlet-mapping>

I don't want to change my JSP's and mav config files, because there are really lots of them, and I hope someday WLS'll fix it. For now I want a quick fix, so that i won't change references throughout my apps from users.m to users.mav. I want something like this:
---------------------
    <filter> 
        <filter-name>mav</filter-name> 
        <filter-class>ForwardFilter</filter-class> 
    </filter> 
    <filter-mapping> 
        <filter-name>mav</filter-name> 
        <url-pattern>/*</url-pattern> 
    </filter-mapping> 
    ...
    <servlet-mapping> 
        <servlet-name>dispatcher</servlet-name> 
        <url-pattern>*.mav</url-pattern> 
    </servlet-mapping>
---------------------

public class ForwardFilter 
        implements javax.servlet.Filter 
{ 
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) 
            throws IOException, ServletException 
    { 
        HttpServletRequest httpServletRequest = (HttpServletRequest)servletRequest; 
        String requestUri = httpServletRequest.getRequestURI(); 

        if (requestUri!=null && requestUri.endsWith(".m")) 
        { 
            RequestDispatcher rd = servletRequest.getRequestDispatcher(requestUri.substring(0,requestUri.length()-2)+".mav"); 
            rd.forward(servletRequest,servletResponse); 
        } 
        else 
        { 
            filterChain.doFilter(servletRequest, servletResponse); 
        } 
    } 
} 
---------------

It works fine for most cases, but not when I use includes (say, <c:import url="countBugs.m"/> in JSP). 
As far as i understood, WLS doesn't invoke filters for includes, so my approach doesn't work.

Colud you suggest smth alike, but different?

Cheers,
yurazlin.



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
[INVALID FOOTER]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.