On 7/13/05, suplizio <[EMAIL PROTECTED]> wrote:
> You did understand my question correctly: I want my servlet/jsp Tomcat web
> app to "call" Cocoon to perform presentation layer rendering.
[...]
> First of all, is there another way to communicate with cocoon rather than
> going through the Cocoon servlet? In other words, it sounds as if I can only
> use the http protocol to communicate with cocoon: the client request first
> travels through my servlet, which makes requests to cocoon servlet, which
> matches the URI pattern and does the appropriate processing, which returns
> the output back to my servlet who kindly renders it to the client. If this
> is correct, is there another way to do this? (I can do a URL.getContent() or
> something for testing but I don't know if my architects will approve of
> this).
You don't have to make another http connection to an external cocoon
app from your application. Simply include cocoon in your base
application and define a mapping for the cocoon servlet.
1) gather all required jar files from your cocoon build and copy them
intro your WEB-INF/lib directory
2) include the cocoon servlet in your web.xml settings (also see
cocoon build dir)
3) copy necessary *.xconf files to WEB-INF
After you're successfully configured cocoon to run as part of your
application, you should be able to simply pass the request on to the
cocoon servlet, which will share all request and session attributes:
ServletContext.getRequestDispatcher("/cocoon/tabreport").forward(request,
response)
If you have a Struts based application also concider the struts cocoon plugin:
http://struts.sourceforge.net/struts-cocoon/
HTH
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]