Ok, I've found how to get the Container object for a web application using 3.2.4 or
4.0 and TC5. Here's a snippet:
| InitialContext ic = new InitialContext();
| RMIAdaptor rmiServer = (RMIAdaptor) ic.lookup("jmx/rmi/RMIAdaptor");
| ObjectName name = new
| ObjectName("jboss.web:j2eeType=WebModule,name=//localhost/<web app name here>,
| J2EEApplication=none,J2EEServer=none");
| org.apache.catalina.Manager manager = (org.apache.catalina.Manager)
| rmiServer.getAttribute(name, "manager");
| org.apache.catalina.core.StandardContext container =
| (org.apache.catalina.core.StandardContext) manager.getContainer();
|
That will give you the Container object that has the prized invoke(request, response)
method in it. However, I'm having a very hard time building my request; there doesn't
seem to be a easy way to build it so that TC5 will recognize it and call the
JSP/Servlet. In TC4, there was a base class for the Request objects, TC5 is full of
wrappers on wrappers.
So, this is a question for any TC5 gurus out there: how can I correctly build my
request object (and response for that matter) so that I can call Container.invoke(req,
resp)?
Thanks,
James
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3829718#3829718
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3829718
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user