Hello,
I'm trying to deploy an EAR that consists of one WAR. I have specified the <context-root> of the WAR in application.xml of the EAR, but when accessing the context, I still get a 500 response for no context configured.
My setup is below. Notice that the context's are configured correctly. I should be able to access the servlets by going to http://localhost:8080/hello1/greeting
The EAR deploys but I get the context error when trying to access it, along with a "mapping configuration error" in the server log.
application.xml of the main ear:
<display-name>Hello1App</display-name>
Application description
<web-uri>war-ic.war</web-uri>
<context-root>hello1</context-root>
and from the WAR:
<web-app>
<display-name>Hello1WAR</display-name>
<servlet-name>GreetingServlet</servlet-name>
<display-name>GreetingServlet</display-name>
<servlet-class>GreetingServlet</servlet-class>
<servlet-name>ResponseServlet</servlet-name>
<display-name>ResponseServlet</display-name>
<servlet-class>ResponseServlet</servlet-class>
<servlet-mapping>
<servlet-name>GreetingServlet</servlet-name>
<url-pattern>/greeting</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>ResponseServlet</servlet-name>
<url-pattern>/response</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>
Hmm.. I fixed the problem by making the context-root "/hello1" instead of "hello".
The J2EE Tutorial sets it as "hello", is this incorrect? Or is it app-server specific? Or does JBoss set it up incorrectly?
Thanks