Is there a way to create a "plug-in" framework for web applications that have these features:
Seemless for the developer - can use existing technologies
e.g.
- Spring MVC annotations (e.g. Request Mapping)
- Hibernate / JPA with annotations
- JSP, JSTL, and servlet views
Seperation - class loading, session, http context
e.g. each @RequestMapping is confined to a subset of the "main" URL (e.g. one "plugin" can't hijack the URL request of another "plugin" for example the URL
http://localhost/rootContext/plugin1/action1?param=value
will require a mapping that is relative to the "module" / "plugin" which is "plugin1" and not the root context, so if we have full seperation of http context, I expect the annotation to be@RequestMapping("action1"...)
also Parent Last classloading so each module can have it's own jars etc..
- also protection on the session object to avoid overwriting session keys accedently (and for security)
Supports plain old JSPs
- I'd like to have the view tehnology be JSPs, I find them much easier than Freemarker, or Vel开发者_JAVA百科ocity
I thought of Apache Felix, OSGI, Spring-OSGI MVC etc... but still need more information...
Take a closer look at Eclipse Virgo, possibly the best choice for greenfield projects for the moment which want to include Spring and JSP.
精彩评论