0

Hello i have this servlet:

<servlet>
<servlet-name>webservice</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/spring-config/api-web-servlet.xml</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>

   <servlet-mapping>
   <servlet-name>webservice</servlet-name>
   <url-pattern>/api/*</url-pattern>
   </servlet-mapping>

and it doens't work, i checked everything, and it appears al is good, then i noticed that i have another servlet with the same

<load-on-startup>3</load-on-startup>

I know that Number is used to get the servlet loaded automatically, am i right ?

And is it wring to have the same for two servlets ?

Thank you for your answers and comments

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • It shouldn't matter. Which servletcontainer make/version are you deploying to? Tried a different/newer one? – BalusC Apr 04 '16 at 09:34
  • i am new with servlets so how can i know wich container i am using ? – Mehaibia Oumaima Apr 04 '16 at 09:38
  • Uh, a well known example of it is Tomcat. You see it being used a lot with Spring users. Related: http://stackoverflow.com/q/3106452 – BalusC Apr 04 '16 at 09:38
  • Actually i am using JBoss AEP6.1 – Mehaibia Oumaima Apr 04 '16 at 09:49
  • OK, tried on a newer one or even its successor WildFly? This way you can exclude it being caused by an already long fixed bug. By the way, are you aware that JBoss as being a full Java EE server already ships with a RESTful framework out the box, the JAX-RS API? It's a bit surprising to see you installing a 3rd party framework for that anyway (you'd usually only expect that on Tomcat because it isn't a Java EE server). – BalusC Apr 04 '16 at 10:01

0 Answers0