0

This is driving me nuts. In my web.xml, I have 2 servlets mapped to the same URL, in my test env. Configuration wise doesn't make sense but that's not the reason for this post.The servlet engine (Tomcat 7.0.42) when started up throws a:

java.lang.IllegalArgumentException: The servlets named [Servlet1] and [Servlet2] are both mapped to the url-pattern [*.php] which is not permitted.

The test server uses servlet spec 3.0.

But then in my dev environment I have the same server, servlet spec config, but I do not see the error??!!!

The two environments do have diff OS. Test runs on Win2k8 and dev runs Windows 7 - I am not sure if the OS matters. But whats driving me nuts is why is the error not consistent across both envs?

sotn
  • 1,833
  • 5
  • 35
  • 65
  • Windows version for this case should not matter.I think that you *think* that both versions are the same.In these cases 99% of the time there is a difference we overlook/forget. I would suggest 2 tests: 1) Copy your tomcat server from production to your dev pc and test. 2) Copy *only* your web application from your production to your test pc and test.3) Check logging configuration for tomcat and delete work directory. If you don't get a conclusive result after these tests then follow the advice of @user2511414 and just amend your issue and go for coffee... – Cratylus Oct 12 '13 at 19:53
  • @ user2511414, I don't understand this reply. I know how to fix the issue, my OP is not asking for a solution I DO have 2 servlets mapped to the same location. What I am puzzled by is the diff between 2 separate machines with same servlet engine configuration. I should see the same error in both envs, but I am not. – sotn Oct 12 '13 at 19:56
  • first it is not related to OS! because we are talking Java, second I see your blood coffee/caffeine is really low, C'mon dude, you are putting some bug/error into the system and expecting same error message! the question is valuable when you get some result(no error) from one of the machines, so I would call it magic. just forget it dude. –  Oct 12 '13 at 20:05
  • when you say dev env, how are you testing? do you have tomcat 7 running and you deploy the app to it? or are you running the test from inside your IDE? it could be that your IDE is using tomcat 6 for deploying and testing the project. just one thing to check and verify. –  Oct 12 '13 at 20:23
  • please check which version exactly you are running on development environment (see my answer [here](http://stackoverflow.com/questions/18801150/tomcat-7-server-not-startin-from-eclipse/18801301#18801301)) – A4L Oct 12 '13 at 20:51

0 Answers0