You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Victorious <vi...@msn.com> on 2008/03/20 05:29:47 UTC

Default servlet not found?

Hello,

This has been bugging me for half a day now. I hope someone can help me!

Situation:
I've successfully deployed a .WAR application, it is mapped to /
As a result, images etc. wouldn't load, as they were redirected to the
servlet as well. So I added mappings for *.jpg, *.png, etc. to the servlet
'default'. I also did this in the past with a different Geronimo
installation.

The problem:
When deploying, i get the following error:
Unable to deploy: Web app default/OmikronApplication/1205986793250/war
contains a servlet mapping that refers to servlet 'default' but no such
servlet was found!

Things I tried:
If I remove web.xml altogether, the directory listings work fine. If i leave
out the *.jpg, *.png, etc. mappings, the servlet works (but without loading
those images ofcourse). I have also tried
org.mortbay.jetty.......DefaultServlet (I use the Jetty version) instead of
'default', but to no avail. I also noticed that I do NOT have a
web-default.xml or webdefault.xml in my Geronimo folders. Is this correct? I
verified my downloaded archive and it turned out correct.

The geronimo-web.xml and web.xml are listed below.

Thanks in advance!!

Victor

web.xml
----------------------
<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4"

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

<display-name>Omikron server application</display-name>

<servlet>
	<display-name>Omikron server core</display-name>
	<servlet-name>OmikronServer</servlet-name>
	<servlet-class>application.Server</servlet-class>
	<load-on-startup>0</load-on-startup>
</servlet>


<servlet-mapping><servlet-name>default</servlet-name>
<url-pattern>*.jpg</url-pattern></servlet-mapping>

<servlet-mapping><servlet-name>default</servlet-name>
<url-pattern>*.gif</url-pattern></servlet-mapping>

<servlet-mapping><servlet-name>default</servlet-name>
<url-pattern>*.png</url-pattern></servlet-mapping>

<servlet-mapping><servlet-name>default</servlet-name>
<url-pattern>*.swf</url-pattern></servlet-mapping>

<servlet-mapping><servlet-name>default</servlet-name>
<url-pattern>*.xml</url-pattern></servlet-mapping>

<servlet-mapping><servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern></servlet-mapping>

<servlet-mapping><servlet-name>default</servlet-name>
<url-pattern>*.html</url-pattern></servlet-mapping>

<servlet-mapping><servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern></servlet-mapping>

<servlet-mapping><servlet-name>OmikronServer</servlet-name>
<url-pattern>/</url-pattern></servlet-mapping>

</web-app>


geronimo-web.xml
----------------------
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
    <environment>
        <moduleId>
            <artifactId>OmikronApplication</artifactId>
        </moduleId>
    </environment>
    <context-root>/</context-root>
</web-app>


-- 
View this message in context: http://www.nabble.com/Default-servlet-not-found--tp16171368s134p16171368.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Re: Default servlet not found?

Posted by Kevan Miller <ke...@gmail.com>.
On Mar 20, 2008, at 12:50 PM, Victorious wrote:

>
> Hello,
>
> After a lot more trying, I still haven't solved this. HOWEVER, I  
> removed the
> Geronimo Jetty installation and installed Geronimo Tomcat instead.  
> It now
> works with the mappings to servlet 'default'.
>
> Still, I would like to have an explanation for this.... Anyone? :)

I'm not an expert, but seems to be a bug in JettyModuleBuilder.java.  
Seems like the default servlet needs to be included in the error  
checking. Could you creat a JIRA?

--kevan 

Re: Default servlet not found?

Posted by Victorious <vi...@msn.com>.
Hello,

After a lot more trying, I still haven't solved this. HOWEVER, I removed the
Geronimo Jetty installation and installed Geronimo Tomcat instead. It now
works with the mappings to servlet 'default'.

Still, I would like to have an explanation for this.... Anyone? :)

Thanks!

-- 
View this message in context: http://www.nabble.com/Default-servlet-not-found--tp16171368s134p16183342.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.