1 Reply Latest reply on Dec 3, 2015 8:21 PM by armahdi

    Can you help me

    nuwan.wp

      I have created spring mvc app with spring annotations. It is working fine with Tomcat 7. But It doesn't working in jboss eap 5.1.

       

      I have deployed war file to jboss deploy folder.(jboss-eap-5.1/jboss-as/server/ekext/deploy/ekOTA.war) it says

       

      2015-12-03 16:41:54,735 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/ekOTA

      Now i check the index.html & it is working fine. But when i hit the spring controller named '/Search' it returns 404 error.

       

      Web application intializer as below

       

      public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer

      {

        @Override

        protected Class<?>[] getRootConfigClasses()

        {

        return new Class<?>[] { OTAConfig.class };

        }

       

        @Override

        protected Class<?>[] getServletConfigClasses()

        {

        return new Class[] { WebMvcConfig.class };

        }

       

        @Override

        protected String[] getServletMappings()

        {

        return new String[] { "/*" }; //tried "/" also

        }

      }

       

      Spring  controller

       

      @RequestMapping(value = { "/searchHotels" }, method = RequestMethod.GET)

        public String searchPackage( @Valid @ModelAttribute(value = "hotelSC") HotelSearchCriteria hotelSearchCriteria, BindingResult errors, Locale locale, Model model, HttpServletRequest request ) throws Exception

        {

        }

       

       

      Is there any configuration needed for jboss side ?

        • 1. Re: Can you help me
          armahdi

          I think if you post this in the Jboss forum that might help. As far as I think, this is for Wildfly server or may be even Jboss 7 as they are quite similar in some aspects.