cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Elhauge ...@uncanny.net>
Subject JSP in a box question (with POST)
Date Fri, 28 Mar 2003 06:58:52 GMT
I've got a question for the wizards on this list.

I've been working with Cocoon since last December and think it is pretty
nifty. I like it a lot better than working with JSP and Custom Tags
(which is what we were doing before).

We basically are deploying an Intranet Bioinformatic Portal with a lot
of content but also integrating some heavy duty Web Applications. I've
managed to get Cocoon to create the portal layout, create XSLT transforms
to generate layout and even have the one major Webapp running within the
portal (and no frames).

The problem is that I've managed to do all this without using the POST
method in my FORMs. I think there was discussion on the list that
requestQuery would only pass the URL parameters (GET params) and my
experience bears that out. Ideally I know we should move to XSP but
that isn't practical for social organization reasons, anyway I would like
to run legacy Webapps within my portal tables (including ones on the net
that I can't rewrite). So how do I get around the POST problem? I'm
using a sitemap like this:

<!-- ================================ -->
<!-- Portal Application Pipeline -->
<map:pipeline internal-only="true">

<map:match pattern="portalAppPipe/*.jsp">
  <map:act type="request">
    <map:parameter name="parameters" value="true" />

    <map:generate type="html"
        src="http://localhost:8080/bioinfo/jsp/{../1}.jsp{requestQuery}">
      <map:parameter name="xpath" value="/html/body/*" />
    </map:generate>
  </map:act>

    <map:serialize type="xml" />
</map:match>

</map:pipeline>
<!-- END: Portal Application Pipeline -->

<map:pipeline>
<map:match pattern="*.app">
  <map:aggregate element="portalPage">
    <map:part element="portalMenuElement" src="menus/home.xml" />
    <map:part element="aggregate1Element" src="cocoon:/portalAppPipe/{1}.jsp" />
  </map:aggregate>

  <map:transform src="xsl/portalAggregate.xsl" />
  <map:transform src="xsl/bioxmlexpand.xsl" />
  <!--
  -->

  <!-- debug view (enable for debug)
  <map:transform src="xsl/simple-xml2html.xsl"/>
  -->

  <map:serialize type="html" />
</map:match>

</map:pipeline>

to run our JSPs within the Portal. It works like a charm but now there
are some apps with large TEXTAREA fields that aren't practical to change
to GET. What can I do?

One way around the problem that I tried was to use something like this:

<map:pipeline>

<map:match pattern="result/*.jsp">
  <map:generate type="jsp" src="{1}.jsp" />

  <map:serialize type="xml" />
</map:match>

</map:pipeline>

to run the JSPs within Cocoon, but whenever I put in any real JSP code
into the servlet it barfs with a 'Not Well Formed' message; which must
mean the servlet isn't really being executed, but just copied.

Any hints would be greatly appreciated.
--
        Edward Elhauge <ee@uncanny.net> -- Uncanny, San Francisco
"The gods confound the man who first found out how to distinguish hours.
Confound him, too, who in this place set up a sundial,
To cut and hack my days so wretchedly into small portions!"
        -- Titus Maccius Plautus (254 - 184 BCE)

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message