Greetings.
 
I currently have a distributed application that uses Session beans for most of its work. I am a cocoon user in that the session bean returns XML and then cocoon magically transforms it using XSL into the html that I want. In order to accomplish this, I have a servlet running that creates a DOM document, adds stuff to it, and spits it back out. So the user connects to the servlet, the action that they did is run on the session beans, then the data is returned from the session beans, including an xsl:stylesheet processing instruction, the data is transformed and the user gets a view.
 
What I'm wondering is if I could cut out the middleman and drop the servlet altogether. The problem I currently have is that the servlet is occasionally serving requests that return pages that are no more than placeholders. For example, if I have a point where the user needs to "add and entry" than the servlet returns an empty tagged XML document which cocoon transforms into the form. The form is submitted and then the servlet actually does some work, contacting the EJB and validating the changes and so on.
 
If I could have an alternative strategy, such as having XML documents for everything than things would go along much more swimmingly.
 
Ideally, the form would be generated and the user hits "submit" to add his new entry. Then the submit hits another XML page which somehow contacts the EJB server, negotiates with the session bean and gets data back. Then it spits out the XML which is again transformed via XSL. I am wondering if this is possible.
 
Comments ?
 
(Note: The beans are running on JBoss 3.0.4 currently as is cocoon and tomcat. Moving the logic of the application out of the session beans is just not an option. They do all the hard work and there is quite a bit of it. I'm looking to use cocoon for the entire PRESENTATION and client negotiating layer only.)
 
-- Robert

Reply via email to