| Author |
Servlet Mapping - WAS to JBOSS
|
Matthew Harshbarger
Greenhorn
Joined: Jan 15, 2008
Posts: 1
|
|
I have a servlet mapping that works in WAS5.1 one way and differently in JBOSS4.2.2. The issue is that in JBOSS the servlet is getting all requests even ones directed to a specific JSP. I understand that the way I'm mapping with /* that everything should get handled by the servlet, but in WAS this is not the case. The app I have is currently in WAS and we are considering moving it to JBOSS, so I need to figure out how to get the behavior we get from WAS. I've had this topic posted on the JBOSS forum (http://jboss.org/index.html?module=bb&op=viewtopic&t=126376) since 12/20 with not even a comment that I'm posting a dumb question. Would also like it if anyone has an opinion on JBoss community support or JBoss support in general as I have concern that if I move from WAS to JBoss not only will my costs go down, but so will my support. -HarsH
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
According to the spec, if more than one url-pattern fits the longest one that matches should take precedence. I'm not sure if the default *.jsp mapping should override /*. I don't recall it being mentioned in the spec. One thing you could try, is to add your own mapping to *.jsp and point it to the default servlet in JBoss. Since JBoss uses Tomcat as its servlet container, I'm assuming it would be org.apache.catalina.servlets.DefaultServlet The downside to this is that it would make your app somewhat server dependent. Another approach would be to replace your servlet mapping with a filter that tests for the *.jsp extension and forwards everything else to your servlet. Side note: The mapping "/*" would also catch all requests for static files. Are you handling those requests from your servlet as well?
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Servlet Mapping - WAS to JBOSS
|
|
|