Hi all,
I spent a few hours this evening trying relieve us of the burden of having to register the mapping to the spring dispatcher servlet in web.xml every time we add a new service. The blocker before was that the routing from spring to struts was not working correctly. I managed to fix this problem... I think it may just be the upgrade to spring 2 that fixed it though.
Anyways, excited at this point I continued on and registered a single mapping to the spring dispatcher servlet, and kept all the service mappings in the applicationContext.xml files for each module. However this reared another ugly problem handling jsp's.
The short of it is that a "catch all" mapping overrides all the internal mappings that the servlet container uses. Or at least it does for Jetty. So what happens is that a request for .jsp files instead of going to the jsp compiler go to the spring dispatcher which coughs up a 404 naturally.
So... this leaves us where we started :(. I can think of perhaps a couple of ways to get around this... none particularly ideal though:
1. Always place services under a sub context path:
This would involve creating "sub contexts" for everything (similar to what we do with the ows mapping today):
/geoserver/ows -> OWS style services
/geoserver/rest -> REST apis
/geoserver/ui -> user interface
2. Choose a UI framework that does not jsp
This would cut down the ui list drastically. Although Wicket which is a top contender would still be in running. Perhaps this along with modular UI will make Wicket unbeatable.
I also think that Spring's MVC stuff would allow us to work around this.
3. Run the administration web app separate from geoserver services themselves.
The downside here is that all interaction with geoserver would have to be remote. Which has been done before by other apps so is definitely doable. It could also be a driver for a REST/Javascript based UI.
I do think it might be interesting to have the UI be able to remotely admin a Geoserver on a different machine. Could be useful for someone administrating a cluser of remote machines... I don't know.
4. Compile JSP files manually
I tried this one... registering the jasper compiler to handle .jsp mappings. It failed though and I did not take it much further.
Anyways... some ideas, not sure if any of them are good :). Feedback and comments welcome.
-Justin
--
Justin Deoliveira
The Open Planning Project
jdeolive@anonymised.com