users@glassfish.java.net

Re: Deploy failed with GlassFish v3 Web Profile : no web component by the name

From: <glassfish_at_javadesktop.org>
Date: Fri, 11 Dec 2009 00:27:41 PST

I know.
This application is using spring 3.0 mvc and a restful url mapping.
So I use UrlRewrite to mapping the static resource. This is the configuration related to urlrewrite:

1.web.xml:
    <filter>
        <filter-name>urlRewriteFilter</filter-name>
        <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
    </filter>

    <filter-mapping>
        <filter-name>urlRewriteFilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

    <servlet-mapping>
        <servlet-name>default</servlet-name>
        <url-pattern>/static/*</url-pattern>
    </servlet-mapping>

2. urlrewrite.xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 2.6//EN"
        "http://tuckey.org/res/dtds/urlrewrite2.6.dtd">

<urlrewrite>
    <rule>
        <condition operator="notequal" next="and" type="request-uri">.*.jsp</condition>
        <condition operator="notequal" next="and" type="request-uri">.*.jspx</condition>
        <from>^(/.*\..*)$</from>
        <to>/static$1</to>
    </rule>
</urlrewrite>


It is no problem under tomcat 6 and glassfish v3 prelude with "default" servlet. I think in glassfish v3, the "default" servlet is removed.
Do you know how to solve this problem, thank you!
[Message sent by forum member 'vstar' ]

http://forums.java.net/jive/thread.jspa?messageID=375917