See the invoker servlet.

-Tim

Ron Forrester wrote:

I am thinking this question walks the edge between tomcat-users and
tomcat-dev, so please forgive me if I have chosen unwisely...


Background:

We are wanting to add a capability to our webapp which requires that we
be able to reference precompiled jsp's from multiple jars discovered at
the time the webapp starts. Currently, we precompile all our core jsp's
into a jar, and get that to work by making sure the jar is in the
codebase for tomcat, and including a snippet (generated at build time)
into web.xml that looks like a series of these:

 <servlet>
   <servlet-name>com.tripwire.jsp.index_jsp</servlet-name>
   <servlet-class>com.tripwire.jsp.index_jsp</servlet-class>
</servlet>

One per compiled jsp. That is fine for our core jsp's which can be
mapped statically like this. But as I said, now were adding the ability
to add plugins into our webapp, which can contain their own UI elements
in the form of jsp's.


Requirement:

What I need is a way to dynamically add the mappings to tomcat while the
webapp starts. I have poked around in the code and discovered
JspRuntimeContext.addWrapper() which looks like what I'd want to use to
dynamically map the jsp's as our webapp starts up -- assuming I can
discover the mappings, which I will be able to. What I am not clear on
is precisely how to use this functionality, which appears to be somewhat
internal to tomcat, from my webapp -- i.e. would I need to override
JspServlet with my own?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to