geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendrik Schenk" <>
Subject Re: Cannot access my Servlet
Date Wed, 28 Dec 2011 16:44:32 GMT
@ivan: i have no geronimo.web.xml, because the servlet works in other app server (as i said).
i think, the geronimo-web.xml is optional.
 the value of id in web-app defines the URL in geronimo. this is one difference to the other

 Can you say me, what i did wrong and how i fix it?

 best regards
----- Original Message -----
From: Ivan
Sent: 12/28/11 04:47 PM
Subject: Re: Cannot access my Servlet

 The annotation is correct, for the context root for the target web application, you may find
it on the admin console, or configure it in the geronimo-web.xml.

 I did not remember that value of id could be used to specify the context root in the servlet

 2011/12/28 Forrest Xia < >

 On Wed, Dec 28, 2011 at 10:00 PM, Hendrik Schenk < > wrote:


 i am new at geronimo. I tested a few application-server with the same war-file (servlet).
But now i have a problem with geronimo.

 I deployed my servlet-war-file, but i do not know the exact url. i added in the web.xml the
"web-app id" and click ohne link in the admin console of geronimo, but i get an 404-error.

 My class looks like this:

 Is the annotation defintion correct?

 I saw usage like this:
@WebServlet(name = "Foobar", urlPatterns = { "/FoobarServlet" })

public class FoobarServlet extends HttpServlet { [...] } 
my web.xml looks like this:

 <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi=""  xmlns=""
 id="FoobarServletTest" version="3.0"> <display-name>FoobarServlet</display-name>
<welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file>
</welcome-file-list> </web-app> 

but i cannot reach the servlet under http://localhost:8080/FoobarServletTest/FoobarServlet

 if i deploy a jsp file, i can reach it under the webapp-id. every app-server (tomcat, jboss,
glassfish) works fine with my war.-archive, only geronimo does not work :(

 please help me.

 best regards

 If still problem with G 3.0-beta-1, please share your simple app here. thanks!


 Regards, Forrest


View raw message