Web tier: servlets, JSP, Web frameworks: Include "external" JSPs in a web application

  1. Include "external" JSPs in a web application (3 messages)

    Question to anyone who's seen/done this before. I have a web application that can be customised (wow! ;-), but I would like my customers to be able to place their JSPs in an external folder - not in the EAR/WAR file itself. That way they can easily add a new JSP just by putting it in the correct directory, and have the sever compile it. My problem is: how do I accomplish that?

    Previously we've used XML stylesheets, which we easily can read from an external path. JSPs however, needs to be compiled so the app server needs to know it's a JSP and handle it accordingly. I cannot make any assumption on the app server/container - this app is deployed on JBoss, WebSphere, WebLogic and Oracle AS so it would have to be a generic solution.

    Any thoughts on this?
  2. A generic solution may not be possible. The JSP spec says:
    "The JSP specification uniformly interprets paths in the context of the web container where the JSP page is deployed."
    WebSphere has a feature called extendedDocumentRoot that would enable you to do what you want. It's a configuration option; perhaps the other appservers have a similar option. Good luck!
  3. That's what I figured (that there is no good solution to this). I was hoping that there might be a way to dynamically load JSPs into the memory and have the container compile them on-the-fly, without having the written in the web app. There probably is (by using the JSP compiler of the various containers), but probably not in a generic way. Thanks for the info on WebSphere, didn't know about that one.

  4. Is there an equivalent feature in OracleAS?