On Mon, Sep 17, 2001 at 03:12:45PM +0800, [EMAIL PROTECTED] wrote:
>
> Hi,
> I can't seem to find much information on using JSPs with Cocoon -
> seems to me that this would be very useful since we already have a
> fair amount of JSPs, and it's an easier sell to management who is
> unwilling to commit to a relatively new technology (XSP).
> my questions is, are there any limitations with regards to using JSPs
> with Cocoon? e.g. will we be able to use all the JSP tag libraries we
> already have? and will there be any dependency/integration issues
> based on the app server we're using (we're using weblogic 6.1) ?
> finally, what are people's thoughts on the general issue of XSPs vs
> JSPs?
I use JSPs and XSPs in the same app all the time. You only want to call
a JSP through Cocoon if you are you generating XML with your JSP, which
you then want to style. Otherwise, you're giving up
platform-independence and performance for no good reason.
> From what I gathered, XSPs enforce a clean separation of
> presentation/content/logic by design, whereas for JSPs you can do that
> too but it's really up to developer discipline.
That's what the advertising leads one to believe, and that was the
original intention, but it's not true ;) XSP doesn't *enforce* clean
separation. Ideally, an XSP page contains content, and placeholders
where the logic should go. The logic is then isolated into logicsheets,
which are applied to the "content" XSP, replacing the placeholders with
generated content. But XSP still has a <xsp:logic> tag, where XSP
writers are free to mix content with logic, just like JSP's <% %> tags.
The developers are well aware of this, and there have been intermittent
discussions on cocoon-dev about replacing XSP with something better.
For now, I'd say stick to JSP, and only use XSP when you really need to.
Also consider the many excellent JSP taglibs available [1]. You might
also want to look at Struts [2], which has a "workflow" proposal, the
result of which will make the Struts' config file rather similar in
concept to Cocoon's sitemap.
--Jeff
[1] http://jakarta.apache.org/taglibs/
[2] http://jakarta.apache.org/struts/
> Damian
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>