This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Adam <br /> <br />Sun Certified Enterprise Architect for J2EE<br />IBM Certified for e-business - Solution Designer<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - XML and Related Technologies<br />IBM Enterprise Application Development with IBM WebSphere Studio, V5.0
It is possible, but it is oftemn seen as a security risk and is fraught with danger anyway. I know it's theoretically possible but it's quite server specific and I've never seen anyone get it right. It works like this: To include a JSP in a web app, you need access to a ReuqestDispatcher. RequestDispatchers are specific to a web app context. You can find another web application context if you know its name. Given the context of the other web app, you can get a RequestDispatcher from that web app. You can now get that RequestDispatcher to include the JSP in the current web app. Sounds like a lot of work, but it looks like this: (the current context is "/app1", the second context is "/app2", app2 contains the jsp "/app2/app2.jsp" that you want to include in app1.)
If you want to concatenate JSPs like this you're likely to fail. The last time I saw someone try to do it in WAS (4.0.3 from memory) the included jsp turned up at the end regardless of what we tried. My guess was that the remote RequestDispatcher was being managed by a separate thread and this was causing the problem, but we never tried to solve it. Hope it helps, give us feedback on how you go! Dave