Problems with Spring, Jetty and SimpleUrlHandlerMapping
After all the fuss I have heard about Spring, I decided I wanted to
check it out for myself.
My basic setup for running webapps is eclipse, using the jetty
launcher to start jetty applications (Basically, it just generates a
big command line that it uses to start jetty, including the classpath
from eclipse, and setting the webapp folder to where I choose).
Now, by now you might think that this belongs in the Spring framework
mailling list. The reason I post here is that when I examined the
code, I saw how Spring extracts the "hello.htm" part from the request
URI. Condensed, the code is something like this:
Note: this is a root webapp, springapp is the servlet.
So, the result of pathWithinApp and servletPath is the same, while I
suspect Spring expects servletPath to only contain the servlet part
("/springapp") of the URI. I was unsure wether this was Spring using
the servlet API wrong or Jetty implementing it wrong. But the JavaDoc
on the Servlet API says:
Returns the part of this request's URL that calls the servlet. This
includes either the servlet name or a path to the servlet, but does
not include any extra path information or a query string. Same as the
value of the CGI variable SCRIPT_NAME
Am I doing something wrong with Spring or Jetty? Or have I found a bug?
Tested with 4.2.24 and 5.1.3 version of Jetty, Spring framework 1.2.
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.<a href="http://ads.osdn.com/?ad_idt02&alloc_id135&op=click">http://ads.osdn.com/?ad_idt02&alloc_id135&op=click _______________________________________________
Jetty-support mailing list
[hidden email] https://lists.sourceforge.net/lists/listinfo/jetty-support