JBoss Community

Getting 404 running the web app in Jboss

created by tarun bhatia in JBoss Web Development - View the full discussion

Hi,

 

I recently started using jboss. I'm building a web application. And getting the 404 error when i write/hit the URL: http://localhost:8080/home.do

 

When i deploy the WAR file, it is deployed successfully. I can see the war deployed at jboss admin console.

 

Howevere no request is coming when I hit the URL. Please help....

 

Following are my xml files.

 

1. Web.xml

 

<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                    version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  

                    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

 

   <context-param>

              <param-name>contextConfigLocation</param-name>

              <param-value>classpath:/applicationContext.xml</param-value>

            </context-param>

 

<servlet>

                    <servlet-name>action</servlet-name>

 

 

                    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>

                    <init-param>

                              <param-name>config</param-name>

                              <param-value>/WEB-INF/struts-config.xml</param-value>

                    </init-param>

                    <load-on-startup>1</load-on-startup>

          </servlet>

 

          <servlet-mapping>

                    <servlet-name>action</servlet-name>

                    <url-pattern>*.do</url-pattern>

          </servlet-mapping>

 

          <listener>

                    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

          </listener>

 

</web-app>

 

------------------------------------------------------------------------------------------------------

 

2. Struts-config.xml

 

<struts-config>

 

<action-mappings>

 

          <action path="/home" type="uk.co.cqc.qrponline.webapp.presentation.controller.HomeAction">

                              <forward name="success" path="qrp.homepage" />

                    </action>

 

</action-mappings>

 

 

 

          <plug-in className="org.apache.struts.validator.ValidatorPlugIn">

                    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />

          </plug-in>

 

          <plug-in className="org.apache.struts.tiles.TilesPlugin">

                    <set-property property="definitions-config" value="/WEB-INF/qrpOnline-tiles-def.xml" />

                    <set-property property="moduleAware" value="true" />

                    <set-property property="definitions-parser-validate" value="true" />

          </plug-in>

 

          <plug-in className="org.springframework.web.struts.ContextLoaderPlugIn">

                    <set-property property="contextConfigLocation" value="/WEB-INF/spring-action-servlet.xml" />

          </plug-in>

 

 

</struts-config>

 

--------------------------------------------------------------------------------------------------------

Reply to this message by going to Community

Start a new discussion in JBoss Web Development at Community