You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ol...@axa-alert.com on 2001/03/12 11:49:37 UTC

Mime mapping not found for file, while displaying static content

Hi,

using the ReqestDispatcher.forward(URL) with a mapped URL I get the
following repsonse:

"...Mime mapping not found for file, while displaying static content..."

I'm using IP WS/AS 6.0  AS SP2. Does anybody know what I have to do to let
that work ?

I'm trying to forward to a mapped URL like "logon.do" and want a specific
servlet to be invoked described in my web.xml below.

Invoking a mapped URL within the browser works, with the
RequestDispatcher.forward() not !

Any help appreciated !!
Oliver


web.xml:
------------

<servlet-mapping>
    <servlet-name>ActionServlet</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>

<mime-mapping>
    <extension>do</extension>
    <mime-type>application/java-vm</mime-type>
  </mime-mapping>


 

Re: Mime mapping not found for file, while displaying static content

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 12 Mar 2001 Oliver.Lauer@axa-alert.com wrote:

> Hi,
> 
> using the ReqestDispatcher.forward(URL) with a mapped URL I get the
> following repsonse:
> 
> "...Mime mapping not found for file, while displaying static content..."
> 
> I'm using IP WS/AS 6.0  AS SP2. Does anybody know what I have to do to let
> that work ?
> 
> I'm trying to forward to a mapped URL like "logon.do" and want a specific
> servlet to be invoked described in my web.xml below.
>

Be sure you are actually using a context-relative path like
"/logon.do" (with a leading slash) rather than "logon.do".  This is
required by a RequestDispatcher.
 
> Invoking a mapped URL within the browser works, with the
> RequestDispatcher.forward() not !
> 
> Any help appreciated !!
> Oliver
> 
> 
> web.xml:
> ------------
> 
> <servlet-mapping>
>     <servlet-name>ActionServlet</servlet-name>
>     <url-pattern>*.do</url-pattern>
>   </servlet-mapping>
> 
> <mime-mapping>
>     <extension>do</extension>
>     <mime-type>application/java-vm</mime-type>
>   </mime-mapping>
>

Why do you need this <mime-maping> entry at all?  If every request ending
with ".do" is going through your controller servlet, there will never be
any need to send a static response with this content type (which is what
the <mime-mapping> entry normally means in web.xml).

Craig McClanahan